Infrastructure Team/Zamboni

Install server
NOTE The followed instructions tested on Ubuntu 10.10(Maverick).

Install apache, mysql, and -dev packages. sudo aptitude install apache2 libapache2-mod-wsgi mysql-server python-dev libxml2-dev libxslt1-dev libmysqlclient-dev libmemcached-dev

Create user mkdir /srv/activities.sugarlabs.org sudo adduser --home /srv/activities.sugarlabs.org/aslo aslo

To check out sources you need git and subversion. sudo aptitude install git subversion

Checkout our fork. git clone --recursive git://github.com/jbalogh/zamboni.git /srv/activities.sugarlabs.org/zamboni

Fetch external dependencies: cd /srv/activities.sugarlabs.org/zamboni git clone --recursive git://github.com/jbalogh/zamboni-lib.git vendor

Set up server
Setup apache. Add followed lines to the end of VirtualHost section in /etc/apache2/sites-enabled file:  # ServerName aslo1.rit.edu WSGIScriptAlias / /srv/activities.sugarlabs.org/zamboni/wsgi/zamboni.wsgi WSGIDaemonProcess zamboni processes=8 threads=1 WSGIProcessGroup zamboni Alias /media "/srv/activities.sugarlabs.org/zamboni/media"  SetHandler None Order deny,allow Allow from all  Order deny,allow Allow from all  #
 * 1)  
 * 2)      SetHandler None

Setup mysql(you need to enter mysql root password for these commands). mysqladmin -u root password remora mysqladmin -u root -p create remora mysql -u root -p GRANT ALL ON *.* TO 'remora'@'localhost' IDENTIFIED BY 'remora'; exit;

To test server create /var/www/site/app/webroot/php.php:  Open http://a.sl.o/php in browser and make sure mysql is enabled.

Configure ASLO
settings_local.py

$#$#$#$#$#$#$#$#$# from settings import *

DEBUG = True TEMPLATE_DEBUG = DEBUG DEBUG_PROPAGATE_EXCEPTIONS = DEBUG

INSTALLED_APPS += (   'debug_toolbar',    'django_extensions',    'fixture_magic', )
 * 1) These apps are great during development.

CACHE_BACKEND = 'dummy://'
 * 1) You want one of the caching backends.  Dummy won't do any caching, locmem is
 * 2) cleared every time you restart the server, and memcached is what we run in
 * 3) production.
 * 4) CACHE_BACKEND = 'caching.backends.memcached://localhost:11211?timeout=500'
 * 5) CACHE_BACKEND = 'caching.backends.locmem://'

DATABASES = { 'default': { 'NAME': 'zamboni', 'ENGINE': 'django.db.backends.mysql', 'USER': 'zamboni', 'PASSWORD': 'remora', 'OPTIONS': {'init_command': 'SET storage_engine=InnoDB'}, 'TEST_CHARSET': 'utf8', 'TEST_COLLATION': 'utf8_general_ci', }, }

LOG_LEVEL = logging.DEBUG HAS_SYSLOG = False

if DEBUG: INTERNAL_IPS = ('127.0.0.1',) MIDDLEWARE_CLASSES += ('debug_toolbar.middleware.DebugToolbarMiddleware',) DEBUG_TOOLBAR_CONFIG = { 'HIDE_DJANGO_SQL': False, 'INTERCEPT_REDIRECTS': False, }
 * 1) For debug toolbar.

SESSION_COOKIE_SECURE = False
 * 1) If you're not running on SSL you'll want this to be False.

CELERY_ALWAYS_EAGER = True
 * 1) Run tasks immediately, don't try using the queue.



cd /var/www aslo/db-create-stub.sh

Open a.sl.o in browser. To login use: login admin@sugarlabs.org password test

Install php-memcache
You should add "extension=memcache.so" to php.ini