fabric-provision

fabric-provision is a tiny wrapper around Chef Solo. Use it for easy provisioning right out of your fabfile.py.

Have a look at the documentation.

Installation

pip install fabric-provision

Usage

  • Create a fabfile.py
from fabric.api import *
from provision import chef, provision

env.hosts = ['vagrant@localhost:2222']

chef.add_recipe('python')
  • Assuming you have a Vagrant machine running locally, you can provision it instantly:
$ fab provision

What it does

  • apt-get update
  • apt-get upgrade
  • Install a current version of Chef
  • Run your configured recipes

API

provision.chef.add_recipe(recipe)

Adds a recipe to run when provisioning. Alternatively you can just override provision.chef.recipes.

Settings

provision.chef.path
Default:'/var/chef'

Remote path to store cookbooks and cached files.

provision.chef.cookbooks
Default:'cookbooks/'

The local path to your recipes, relative to you fabfile.py.

provision.chef.log_level
Default:'info'

Chef’s log level.

provision.chef.gems
Default:'1.8.10'

Which version of gem to install.

provision.chef.recipes
Default:[]

The list of recipes to run.

provision.chef.json
Default:{}

Additional JSON information you’d like to transfer to the server.

provision.chef.use_omnibus_installer
Default:False

Whether to use the Opscode Omnibus Installer to load Chef.