Flexible LAVA deployment

Registered by Zygmunt Krynicki on 2011-09-02

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

Paul Larson
Zygmunt Krynicki
Zygmunt Krynicki
Series goal:
Accepted for linaro-11.11
Milestone target:
milestone icon 2011.11
Started by
Zygmunt Krynicki on 2011-09-02
Completed by
Fathi Boudra on 2011-11-28

Related branches



[asac, Oct 25, 2011]: not milestoned blueprints and blueprints in the backlog must not be worked on except in spare time maybe. Please focus on what is important this month; PM/TL are the ones that coordinate the plan and align with linaro priority.
[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] Mark this blueprint implemented and split remaining items to a separate blueprint: https://blueprints.launchpad.net/lava-lab/+spec/flexible-lava-deployment-11.12.

Headline: LAVA deployment untangled from debian packaging, works across larger selection of systems

Acceptance: Production LAVA instance is deployed. Test instances work on lucid and oneiric. Scheduler and dispatcher confirmed to work.


Work Items

Work items:
Experiment with lava-dev-tool as a deployment tool: DONE
Request edge.validation.linaro.org: DONE
Request staging.validation.linaro.org: DONE
Write scripts that encapsulate deploying all the code for LAVA in an isolated container: DONE
Write scripts that create edge-like deployment (new code, production data): DONE
Write scripts that create production database snapshot: DONE
Write scripts that create staging-like deployment (new code, snapshot of data): DONE
Write upstart job for LAVA on top of uWSGI: DONE
Make upstart script capable of multiple instances: DONE
Build uWSGI from source upon installation: DONE
Install postgresql and setup locale properly: DONE
Put code from lp:~zkrynicki/+junk/edge to lp:lava-deployment-tool: DONE
Write documentation on how to use the script, document the script well: DONE

This blueprint contains Public information 
Everyone can see this information.