Buildout recipe making versioned remote deploys trivial.
Creates a bin/ script with which you can easily deploy buildouts to remote servers. Uses Fabric to communicate and run commands on remote servers.
NOTE: This recipe is under active development and has not been fully tested in a production environment. Use at your own risk.
The deploy process proceeds as follows:
Add a part in buildout.cfg like so:
[buildout] parts = deploy [deploy] recipe = praekelt.recipe.deploy git_url = email@example.com:me/projectx.git host = www.protectx.com root_path = /var/www/projectx
Running the buildout will add a deploy script with the same name as your deploy part in the bin/ directory. In this case bin/deploy. The resulting script will deploy firstname.lastname@example.org:me/projectx.git to www.projectx.com's /var/www/projectx path.
The following example illustrates all available options:
[buildout] parts = deploy [deploy] recipe = praekelt.recipe.deploy as_user = www-data conf_file = production.cfg deploy_key_path = /var/www/.ssh/projectx_deploy_key deploy_latest_tag=True git_branch = production git_url = email@example.com:me/projectx.git host = www.protectx.com initd_commands = nginx restart puppet_manifest = provision.pp python_exec = python2.5 root_path = /var/www/projectx shared_resources = eggs downloads log media update_supervisor = True supervisorctl_commands = restart all cron_commands = * * * * * echo foobar
The resulting script will deploy the latest tag found for firstname.lastname@example.org:me/projectx.git's production branch to www.projectx.com's /var/www/projectx path as user www-data. The git repo will be cloned using /var/www/.ssh/projectx_deploy_key as ssh key. The Puppet manifest provision.pp will be applied. The eggs, downloads, log and media paths will be copied from the current release to this new release. The buildout environment will be created using python2.5 and run using production.cfg as configuration file. After the buildout completes supervisor will be updated and supervisorctl restart all will be run as well as /etc/init.d/nginx restart. * * * * * echo foobar will be added to www-data user's crontab.
|File||Type||Python Version||Uploaded On||Downloads|
|praekelt.recipe.deploy-0.1.3.tar.gz||Source||June 29, 2011||1,800|
|praekelt.recipe.deploy-0.1.3-py2.7.egg||Egg||2.7||June 29, 2011||1,704|
|praekelt.recipe.deploy-0.1.3-py2.6.egg||Egg||2.6||June 29, 2011||1,877|
|0.1.3||June 29, 2011|
|0.1.2||June 28, 2011|
|0.1.1||June 20, 2011|
|0.1.0||June 9, 2011|
|0.0.9||June 8, 2011|
|0.0.8||June 8, 2011|
|0.0.7||May 9, 2011|
|0.0.6||March 22, 2011|
|0.0.5||March 17, 2011|
|0.0.4||March 9, 2011|
|0.0.3||Jan. 27, 2011|
|0.0.2||Jan. 11, 2011|
|0.0.1||Jan. 11, 2011|
|April 18, 2015, 8:06 p.m.||praekelt.recipe.deploy||0.1.3||Release Created|
|April 18, 2015, 8:06 p.m.||praekelt.recipe.deploy||0.1.2||Release Created|
|April 18, 2015, 8:06 p.m.||praekelt.recipe.deploy||0.1.1||Release Created|
|April 18, 2015, 8:06 p.m.||praekelt.recipe.deploy||0.1.0||Release Created|
|April 18, 2015, 8:06 p.m.||praekelt.recipe.deploy||0.0.8||Release Created|
|April 18, 2015, 8:06 p.m.||praekelt.recipe.deploy||0.0.9||Release Created|
|April 18, 2015, 8:06 p.m.||praekelt.recipe.deploy||0.0.2||Release Created|
|April 18, 2015, 8:06 p.m.||praekelt.recipe.deploy||0.0.3||Release Created|
|April 18, 2015, 8:06 p.m.||praekelt.recipe.deploy||0.0.1||Release Created|
|April 18, 2015, 8:06 p.m.||praekelt.recipe.deploy||0.0.6||Release Created|
|April 18, 2015, 8:06 p.m.||praekelt.recipe.deploy||0.0.7||Release Created|
|April 18, 2015, 8:06 p.m.||praekelt.recipe.deploy||0.0.4||Release Created|
|April 18, 2015, 8:06 p.m.||praekelt.recipe.deploy||0.0.5||Release Created|
|April 18, 2015, 8:06 p.m.||praekelt.recipe.deploy||Package Created|