Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
capistrano + chef-solo == more complete rails deployment solution
branch: master

This branch is 43 commits behind Casecommons:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
chef
fixtures
lib
recipes
spec
.gitignore
.rspec
.rvmrc
Capfile
Gemfile
LICENSE
README.rdoc
Rakefile
chef_cap.gemspec
init.rb

README.rdoc

Chef Cap

DESCRIPTION

capistrano + chef-solo == deployment + server automation

Using chef's JSON configuration format to drive capistrano and chef-solo so you can use both to not only deploy your application but also completely automate the configuration of your servers.

INSTALL

Add chef_cap to your Gemfile

gem 'chef_cap'

Then run:

$ bundle install

Rails 3

$ rails generate chef_cap:install

Rails 2

Edit your Rakefile and add:

require 'chef_cap/tasks'

Then run:

$ bundle exec rake chef_cap:install

Which will overwrite your Capfile and create a chef directory with sample files unless one already exists.

Tasks

Remove all chef-cap files from /tmp

$ cap <environment> chef:cleanup

Run chef-solo on the server(s)

$ cap <environment> chef:deploy

Setup chef solo on the server(s)

$ cap <environment> chef:setup

Run chef without deploy

$ cap <environment> cook

Deploy a particular Git branch, tag, or revision (overriding the default)

$ cap <environment> deploy BRANCH=my_branch
$ cap <environment> deploy TAG=my_tag
$ cap <environment> deploy REVISION=abc1234

chef/node.json

The following JSON keys are required in your node.json file:

{ "application": { "name": NAME } }
{ "application": { "repository": REPOSITORY } }
{ "environments": { ENVIRONMENT: { "rails_env": RAILS_ENV } } }
{ "roles": { ROLE: { "run_list": [] } } }
{ "run_list": [] }

Optional JSON keys:

{ "environments": { ENVIRONMENT: { "role_order": { FIRST_ROLE: [OTHER_ROLES] } } } }
{ "environments": { ENVIRONMENT: { "environment_settings": ENV_HASH } } }

REQUIREMENTS

  • Capistrano 2.x

LICENSE

MIT

NOTICE

Chef and chef-solo are © 2010 Opscode (www.opscode.com/)

Something went wrong with that request. Please try again.