Version 39 (modified by Fran Boon, 13 years ago) ( diff )



We can always use SysAdmin support to help out with our infrastructure: developing tools & maintaining sites.

Deployment Cycle

Setting up a New Instance

Eden project have 2 servers kindly donated by Zen Internet.
These run KVM to provide different virtual machines.
We use Proxmox to manage these VMs:

  • Type: Fully Virtualized (KVM)
  • Installation media: Debian-507-amd64-netinst.iso (if not using the template)
  • Disk Storage: Images (Host1) data (Host2)
  • Start at Boot: tick
  • Disk type: VIRTIO
  • Disk size: 22GB
  • Guest Type: Linux-2.6
  • Network Card: virtio
  • Bridge: vmbr0

These documents are secured - ask for access if you are going to contribute:

Copy from Template

We normally copy an instance from a predefined template rather than starting with a fresh OS build.

  • consider changing this with scripts similar to ISO/VM builds?

Instances run WSGI & MySQL.

  1. Turn off template VM instance if on
  2. SSH into the host machine

If using Host1:

  1. cd /spare/images/images
  2. cp 106/vm-106-disk-1.raw 1xx/vm-1xx-disk-1.raw

If using Host2:


#zcat /spare/template/vm_release.gz | dd of=/dev/data/vm-1xx-disk-1 bs=8M
dd if=/dev/data/vm-106-disk-1 of=/dev/data/vm-1xx-disk-1 bs=8M
  1. That'll take a while. You can get it to notify progress by doing a kill -USR1 {process id of the dd}
  1. start your VM after the copy is complete
  2. Open VNC Console
  3. read /home/INSTALL in the vm
  4. Set the IP (using the spreadsheet)

Upgrading an Instance

Need to decide whether the site will be upgraded straight from Trunk, or whether upgrades are staged via a Test server.

Simple upgrades can be done using the aliases:

We manage complex upgrades using Fabric:

  1. Add the site to
  2. If no keys generated yet, then generate some:
    fab generate_keys
  3. deploy keys
    fab <site> distribute_keys
  4. Run the upgrade (as/when required)
    fab <site> deploy

Trac Maintenance

To reset tickets which have been assigned to nobody:

apache2ctl stop
sqlite3 /home/sahana/trac/db/trac.db
  SET status = 'new'
  WHERE owner = '' and status = 'assigned';
apache2ctl start

To clear blocks from MathCaptcha failures:



Windows Installer

See if we can upgrade to Python 2.7 to have Foreign-Key support (#900)

Infrastructure Virtual Machine Template

  • /root/
    apt-get upgrade -y
    cp /home/web2py/applications/eden/deployment-templates/models/ /home/web2py/applications/eden/models
  • /home/INSTALL
    mysqladmin -u root create sahana -p
    vim /home/web2py/applications/eden/models/
    cd /home/web2py
    sudo -H -u web2py python -N -S eden -M -R applications/eden/static/scripts/tools/
    cd applications/eden
    sed -i 's/deployment_settings.base.migrate = True/deployment_settings.base.migrate = False/g' models/
    sed -i 's/deployment_settings.base.prepopulate = True/deployment_settings.base.prepopulate = False/g' models/
  • Update shell aliases
    alias pull="cd ~web2py/applications/eden;sed -i 's/deployment_settings.base.migrate = False/deployment_settings.base.migrate = True/g' models/;bzr pull;rm -rf compiled;cd ~web2py;sudo -H -u web2py python -S eden -M -R applications/eden/static/scripts/tools/;/etc/init.d/apache2 force-reload"
    alias migrateoff="sed -i 's/deployment_settings.base.migrate = True/deployment_settings.base.migrate = False/g' ~web2py/applications/eden/models/"
    • convert to scripts in /usr/local/bin (as per ISO/VM)
  • Change permissions on languages files (we don't want these being updated live by the server)
  • Add maintenance site & HTML
  • Rename site as
    • To work with fabfile
  • Provide a script to manage the MySQL root pw change
    • change the password
    • edit Eden's
    • edit /root/.my.cnf
  • Convert to PostgreSQL? (for PostGIS)
  • Update Eden
  • Update Web2Py (as-required)
  • Update OS (to Squeeze & then maintain patches)
  • Increase swap to 2048Mb (from 750Mb)
    • can we do this in image? Add an emergency swapfile?
    • Add extra disk for those instances which need extra capacity


  • SQL indexes need restoring after DB upgrades


  • Set up an instance of Hudson to automatically run through our Selenium tests


  • Have a set of reference data available





/usr/local/lib/python2.6/dist-packages/TracScreenshots-0.8dev-py2.6.egg/tracscreenshots/ DeprecationWarning: the sets module is deprecated
  import sets
Traceback (most recent call last):
  File "./sqlite2pg", line 335, in <module>
  File "./sqlite2pg", line 331, in main
  File "./sqlite2pg", line 250, in Main
    rc = tmigration.migrateTable(tname) or rc
  File "./sqlite2pg", line 72, in migrateTable
    rc = self.default_copy(table)
  File "./sqlite2pg", line 93, in default_copy
    pgcur.execute(insert_into, row)
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/trac/db/", line 65, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
psycopg2.InternalError: current transaction is aborted, commands ignored until end of transaction block
  • Add Timing & Estmation Plugin
  • Investigate a fix or alternative to for allowing Trac users to register bugs anonymously whilst not locking out our testing team.
  • See if we can not send emails out to users for the updates they make themselves (maybe fixed in 0.12.x?)
  • Investigate a fix for the last section edit doubling-up the footers (maybe fixed in 0.12.x?)

Release Process

Translation Process

  • Bzr start-commit hook to update all languages (need a script rather than the current appadmin UI method)
    cd web2py
    python -S eden -R applications/eden/static/scripts/tools/
  • Scripts to automate the conversion 2 PO & upload/download to/from Pootle: UserGuidelinesLocalisation
Note: See TracWiki for help on using the wiki.