[[TOC]] = !SysAdmins = We can always use !SysAdmin support to help out with our infrastructure: developing tools & maintaining sites. == Deployment Cycle == * InstallationGuidelines * MaintenanceGuidelines * UserGuidelinesUpgrade * BluePrintUpgrades * PakistanDeploymentCycle == Setting up a New Instance == Eden project have 2 servers kindly donated by [http://zen.co.uk Zen Internet].[[BR]] These run KVM to provide different virtual machines.[[BR]] We use [http://pve.proxmox.com/wiki/Installation#Fully_virtualized_Machines_.28KVM.29 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: * [https://spreadsheets.google.com/ccc?key=0AgESuewSG-wodHJTUEp1eGUzODY0bkg3aEhldllxMnc&hl=en_GB&pli=1#gid=0 IP Addresses/RAM Allocations for Eden Infrastructure] * [https://docs.google.com/Doc?docid=0Ac-Y6NVjUsjiZGN4a2s1Y3RfMTRkc2c0Y2djYw&hl=en_GB Setting up a new VM instance on Eden Infrastructure] === 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 [wiki:InstallationGuidelinesApacheModWSGI WSGI] & [wiki:InstallationGuidelinesMySQL MySQL]. 1. Turn off template VM instance if on 2. SSH into the host machine If using Host1: 3. {{{cd /spare/images/images}}} 4. {{{cp 106/vm-106-disk-1.raw 1xx/vm-1xx-disk-1.raw}}} If using Host2: 3. {{{ 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 }}} 4. That'll take a while. You can get it to notify progress by doing a kill -USR1 {process id of the dd} 5. start your VM after the copy is complete 6. Open VNC Console 7. read /home/INSTALL in the vm 8. 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. We manage upgrades using Fabfile. 1. Add the site to fabile.py 2. If no keys generated yet, then generate some: {{{ fab generate_keys }}} 3. deploy keys {{{ fab distribute_keys }}} 4. Run the upgrade (as/when required) {{{ fab deploy }}} == Trac Maintenance == To reset tickets which have been assigned to nobody: {{{ apache2ctl stop sqlite3 /home/sahana/trac/db/trac.db UPDATE ticket SET status = 'new' WHERE owner = '' and status = 'assigned'; .q apache2ctl start }}} == References == * [https://docs.google.com/Doc?docid=0Ac-Y6NVjUsjiZGN4a2s1Y3RfMTNnNXZjbnpoZA&hl=en_GB SysAdmin notes for Eden Infrastructure] * [https://docs.google.com/Doc?docid=0ASR82JeFPTCOZGNicWQ2cl80N2c3Y21jcGdu&hl=en_GB Foundation Infrastructure] * [https://docs.google.com/Doc?docid=0Ac-Y6NVjUsjiZGN4a2s1Y3RfMTJjdjJ3MjNnZg&hl=en_GB Contacts] == !ToDo == === Windows Installer === See if we can upgrade to Python 2.7 to have Foreign-Key support (#900) === Infrastructure Virtual Machine Template === * Update shell aliases: compile/pull * 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 xxxx.sahanafoundation.org * To work with fabfile * Provide a script to manage the MySQL root pw change * change the password * edit Eden's {{{000_config.py}}} * 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 [MaintenanceGuidelinesTips#Addingaswapfile emergency swapfile]? * Add extra disk for those instances which need extra capacity === Fabfile === * SQL indexes need restoring after DB upgrades === Test === * Set up an instance of Hudson to automatically run through our [DeveloperGuidelinesTesting#FunctionalTests Selenium tests] === Demo === * Have a set of reference data available === Pootle === * n/a currently :) === Trac === * http://eden.sahanafoundation.org/wiki/BluePrintTrac * TracUpgrade to 0.12.1 * Check Plugin Dependencies: * http://trac-hacks.org/wiki/AccountManagerPlugin * OK: {{{svn co http://trac-hacks.org/svn/accountmanagerplugin/trunk accountmanagerplugin}}} * http://trac-hacks.org/wiki/RecaptchaRegisterPlugin * No official support: {{{svn co http://trac-hacks.org/svn/recaptcharegisterplugin/0.11/ recaptcharegisterplugin}}} * https://launchpad.net/trac-bzr * ok: {{{bzr branch https://code.launchpad.net/~trac-bzr-team/trac-bzr/trunk trac-bzr}}} * http://trac-hacks.org/wiki/MathCaptchaPlugin * ok: {{{svn co http://trac-hacks.org/svn/mathcaptchaplugin/0.12/ mathcaptchaplugin}}} * http://trac-hacks.org/wiki/SectionEditPlugin * ok: {{{svn co http://trac-hacks.org/svn/sectioneditplugin/0.12/ sectioneditplugin}}} * http://trac-hacks.org/wiki/TranslatedPagesMacro * No official support: {{{svn co http://trac-hacks.org/svn/translatedpagesmacro/0.11/ translatedpagesmacro}}} * http://trac-hacks.org/wiki/TocMacro * ok (despite name): {{{svn co http://trac-hacks.org/svn/tocmacro/0.11/ tocmacro}}} * http://trac-hacks.org/wiki/ExternalLinksNewWindowPlugin * No official support: {{{svn co http://trac-hacks.org/svn/externallinksnewwindowplugin/0.11/ externallinksnewwindowplugin}}} * http://trac-hacks.org/wiki/ScreenshotsPlugin * ok: {{{svn co http://trac-hacks.org/svn/screenshotsplugin/0.12/ screenshotsplugin}}} * Convert from sqlite to PostgreSQL (or MySQL) to improve performance * http://trac-hacks.org/wiki/SqliteToPgScript * Add Timing & Estmation Plugin * Investigate a fix or alternative to http://trac-hacks.org/wiki/MathCaptchaPlugin 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 === * [wiki:DeveloperGuidelinesReleaseProcess#ExportApplication] * Bzr start-commit hook to [wiki:DeveloperGuidelinesBzr#ToolsfordirectcommitterstoTrunk check for existence of 'compiled' folder] === Translation Process === * Bzr start-commit hook to update all languages (need a script rather than the current appadmin UI method) {{{ cd web2py python web2py.py -S eden -R applications/eden/static/scripts/tools/languages.py }}} * Scripts to automate the conversion 2 PO & upload/download to/from Pootle: UserGuidelinesLocalisation