Flexible LAVA deployment for 2011.12 cycle

Registered by Fathi Boudra

We need to improve application deployment. For that we want to minimize the time required to push now code to testing (staging) and production (either edge or normal) sites.

Blueprint information

Status:
Complete
Approver:
Paul Larson
Priority:
High
Drafter:
Zygmunt Krynicki
Direction:
Approved
Assignee:
Zygmunt Krynicki
Definition:
Approved
Series goal:
Accepted for trunk
Implementation:
Implemented
Milestone target:
milestone icon 2011.12
Started by
Fathi Boudra
Completed by
Fathi Boudra

Related branches

Sprints

Whiteboard

[zkrynicki, 2011-11-23]: Droping some tasks that are not sensible in practice (database snapshot takes too long), rollbacks == installing another requirements file with explicit versions. Migrations bite, sorry.
In general deployment is based on keeping _all_ the code inside virtualenv and using lava-dev-tool coupled with lp:lava-project to get all the right code. Actual hosting is done by apache with uwsgi and uwsgi server running our application. Restarting any of the production/development sites does not affect other sites nor regular apache.
Note: this does not include edge deployment anymore, for simplicity it is being left out. This also affects deployment straight from bzr. It needs more consideration and work items to include in this already bigger bp.
[fboudra, 2011-11-28] Initial work started during 2011.11 cycle: https://blueprints.launchpad.net/lava-lab/+spec/other-o-linaro-flexible-lava-deployment.
[zkrynicki, 2011-12-06] Lucid is broken due to old upstart version. There is no easy fix. We may need to chase upstart developers for workarounds. Right now Lucid is _NOT_ supported.
[fboudra, 2011-12-06] Please, open a bug report against upstart and link to the blueprint.
[zkrynicki, 2012-12-15] I did some testing on Fedora 16 a few days ago, it actually works after doing a few small changes. I publish my changes (script changes, initial systemd support) when I'm back in spain. That VM was on my external disk.
[fboudra, 2011-12-16] Convert last work item to LP: #905465

Meta:
Headline: LAVA deployment tool assists with the deployment of LAVA components. It is suitable for production deployments as well as development/evaluation environments.
Acceptance: Production LAVA instance is deployed. Test instances on Oneiric. Scheduler and dispatcher confirmed to work.

(?)

Work Items

Work items:
Convert lava-scheduler daemon to django management commands to get common config management: DONE
[mwhudson] Convert lava-scheduler monitor to django management commands to get common config management: DONE
Make scheduler upstart job instance aware: DONE
Make scheduler upstart job start with the rest of lava: DONE
Add support for installing OS-specific packages (lucid vs oneiric): DONE
Work around missing features in lucid's version of upstart: DONE
Add support for backup and restore: DONE
Make the scheduler use lava-dispatch from the instance, not the global one: DONE
[mwhudson] Make the dispatcher use explicit configuration: DONE
Do a sample run on some boards (borrowed from production): DONE
Stop production, snapshot DB and restore on new-style production: DONE
Install staging instance with lava-deployment-tool: DONE
Import some data to check that lava-deployment-tool + staging works: DONE
Add option to roll back to previous point lava releases: DONE
Remove lava deb packages usage from Validation server: DONE
Install lava-dispatcher in the instance: DONE
[pwlars] Remove lava-dispatcher packages: DONE

This blueprint contains Public information 
Everyone can see this information.