Skip to content

halcyonCorsair/fabric-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Conventions / Assumptions:

  • user/group deploy exist and have correct ssh/key setup
  • /var/lib/sitedata/<apptype> exists
  • /var/lib/sitedata/<apptype>/<sitename> exists
  • /var/lib/sitedata/<apptype>/<sitename>/files exists and is writable by deploy
  • /var/www/<apptype> exists
  • /var/www/<apptype>/<sitename> exists and is writable by deploy
  • /var/www/<apptype>/<sitename>/settings.php exists
  • /var/www/<apptype>/<sitename>/releases exists and is writable by deploy
  • Git tags do NOT contain slashes

Getting started:

See the fabric documentation at: http://docs.fabfile.org

Install fabric:

$ sudo pip install fabric

Copy exampleconfig.py to siteconfig.py in a handy location.

Update siteconfig.py as required.

Alias fabric call, add to your ~/.bashrc:

  alias deploy="fab -f /path/to/deploy.py"

Example usage:

  deploy --set stage=dev deploy:'mytag-20120307-1'

Explicitly specify the directory containing your siteconfig recipe:

  deploy --set stage=dev,siteconfig_dir=/path/to/your/siteconfig deploy:'mytag-20120307-1'

Deploy to an arbitrary server (as long as env.hosts isn't getting overridden):

  deploy --set stage=dev -H user@hostname.com deploy:'mytag-20120307-1'

To run an arbitrary command you must first load config:

  deploy --set stage=dev load_config build_release:'mytag-20120307-1'
  deploy --set stage=dev load_config build_release:tag='mytag-20120307-1',site='sitename'

To list the default deployment tasks:

  deploy list_deploy_tasks

To list the deployment tasks for your site:

  deploy --set stage=dev load_config list_deploy_tasks

Get information about the available commands:

  deploy -l

Get information about a command:

  deploy -d load_config

To show debugging information (see fabric's documentation on output levels):

  deploy --show=debug

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages