Skip to main content

Chef Cookbook Wizardry

Project description

latest pypi release Build Status on Travis for 'master' branch Requirements Status from

Helps build cookbooks faster by pre-templating parts and exposing
options in a command line and config friendly way.


The latest release of fastfood can be installed via pip:

pip install fastfood
An alternative install method would be manually installing it leveraging
git clone
cd fastfood
python install

Command Line Usage


Shows a list of available stencils in your template pack.


$ fastfood list
Available Stencil Sets:
       varnish - Creates a recipe for installing Varnish
      ha-redis - Creates a highly available Redis and HAProxy recipe
          java - Installs Java JRE


Shows more information about a stencil, including available options.

$ fastfood show nginx
Stencil Set nginx:
    name - Name of the recipe to create
    example - Various premade Nginx examples


Generates a new cookbook or updates an existing cookbook from a fastfood.json

Example Template:

  "name": "mycookbook",
  "stencils": [
      "stencil_set": "base"
      "stencil_set": "rabbitmq",
      "openfor": "myapp"
      "stencil_set": "rails",
      "stencil": "nginx",
      "name": "myapp",
      "tag": "myapp"


fastfood build fastfood.json

Template Notes

Fastfood uses the Jinja2 templating engine with
2 modifications.


There is a helper method added to jinja2 for fastfood called qstring, it
takes in an argument and if that argument does not match a Chef node
attributes (node[‘mysomething’] | node.chef_environment) it will wrap that argument
in a string otherwise it just returns the argument.

renders as




renders as


jinja variable

Because the traditional jinja2 variable start and end strings can conflict
with Ruby code fastfood uses ‘|{‘ and ‘}|’ to represent a jinja2 variable.
|{ options['name'] }|

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for fastfood, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size fastfood-1.1.0-py2.py3-none-any.whl (22.9 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size fastfood-1.1.0.tar.gz (14.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page