Bug 1146184 - Use virtualenv and peep for stage/prod package management
Bug 1146184 - Use virtualenv and peep for stage/prod package management

Prior to this change, on stage/production we didn't use virtualenvs
(unlike dev/the local Vagrant project) and instead pip installed
packages globally (when puppet ran periodically), using requirements
files that are not in the repo.

Now during deployment, a virtualenv is created and then populated using
peep (which uses hashes to verify the contents of packages before pip
installing them). The virtualenv is then made relocatable (as best as it
can, the feature isn't perfect), the lib64 symlinks are made relative,
and then the virtualenv is rsynced to all nodes, along with the source.

The one main remaining limitation of --relocatable is that the bash
activate script will not work on the other nodes - however the wrapper
scripts under treeherder-service/bin/ add venv/bin/ to PATH so using the
activate script is unnecessary for them. This just leaves running
manage.py commands locally on a node, for we can use:
|../venv/bin/python manage.py foo|, an alias or else we can fix up the
activate scripts in a follow-up bug.

sylvestre/treeherder,jgraham/treeherder,gbrmachado/treeherder,sylvestre/treeherder,parkouss/treeherder,deathping1994/treeherder,glenn124f/treeherder,akhileshpillai/treeherder,avih/treeherder,jgraham/treeherder,kapy2010/treeherder,deathping1994/treeherder,adusca/treeherder,tojon/treeherder,wlach/treeherder,adusca/treeherder,parkouss/treeherder,gbrmachado/treeherder,moijes12/treeherder,deathping1994/treeherder,parkouss/treeherder,wlach/treeherder,moijes12/treeherder,KWierso/treeherder,vaishalitekale/treeherder,vaishalitekale/treeherder,glenn124f/treeherder,gbrmachado/treeherder,tojonmz/treeherder,deathping1994/treeherder,rail/treeherder,wlach/treeherder,avih/treeherder,adusca/treeherder,akhileshpillai/treeherder,moijes12/treeherder,moijes12/treeherder,glenn124f/treeherder,avih/treeherder,edmorley/treeherder,gbrmachado/treeherder,tojon/treeherder,vaishalitekale/treeherder,tojon/treeherder,kapy2010/treeherder,KWierso/treeherder,rail/treeherder,sylvestre/treeherder,tojonmz/treeherder,adusca/treeherder,vaishalitekale/treeherder,rail/treeherder,edmorley/treeherder,gbrmachado/treeherder,kapy2010/treeherder,KWierso/treeherder,parkouss/treeherder,adusca/treeherder,moijes12/treeherder,tojon/treeherder,vaishalitekale/treeherder,avih/treeherder,sylvestre/treeherder,kapy2010/treeherder,jgraham/treeherder,glenn124f/treeherder,glenn124f/treeherder,edmorley/treeherder,rail/treeherder,parkouss/treeherder,jgraham/treeherder,vaishalitekale/treeherder,sylvestre/treeherder,sylvestre/treeherder,akhileshpillai/treeherder,wlach/treeherder,rail/treeherder,avih/treeherder,adusca/treeherder,parkouss/treeherder,tojonmz/treeherder,akhileshpillai/treeherder,rail/treeherder,kapy2010/treeherder,wlach/treeherder,deathping1994/treeherder,moijes12/treeherder,tojonmz/treeherder,akhileshpillai/treeherder,tojonmz/treeherder,edmorley/treeherder,akhileshpillai/treeherder,gbrmachado/treeherder,jgraham/treeherder,KWierso/treeherder,jgraham/treeherder,glenn124f/treeherder,wlach/treeherder,deathping1994/treeherder,tojonmz/treeherder,avih/treeherder