Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

masterless puppet using capistrano

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 lib
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile extracted rsync class, only using ssh keys that exist May 21, 2011
Octocat-spinner-32 supply_drop.gemspec
README.md

supply_drop

supply_drop is a capistrano plugin to facitiate provisioning servers with puppet, without using the puppet server. It works by simply rsyncing your puppet configuration files to your servers and running puppet apply. It strives to allow you to write idiomatic puppet scripts while being as lightweight as possible.

Installation

gem install supply_drop

or with Bundler

gem 'supply_drop'

then at the top of your deploy.rb

require 'rubygems'
require 'supply_drop'

Tasks

cap puppet:bootstrap:ubuntu
cap puppet:bootstrap:osx

This does a simple apt-get install of puppet on the target servers.

cap puppet:noop

This will show you a list of the pending changes to be applied server-by-server.

cap puppet:apply

Applies the pending changes to all the servers.

You can specify that one of your servers should not be puppeted by setting the :nopuppet flag to true, like so. It will then be skipped by all the above commands.

role :weird_thing, '33.33.33.33', :nopuppet => true

Variables

There are several variables that can be overriden to change how supply_drop works:

set :puppet_source, '.'

defines the base directory containing your puppet configs that will be rsynced to the servers.

set :puppet_destination, '/tmp/supply_drop'

defines where on the server the puppet configuration files are synced to.

set :puppet_command, 'puppet apply'

allows you to override the puppet command that is run if puppet is not on the path.

set :puppet_lib, "#{puppet_destination}/modules"

the value of the PUPPETLIB environment variable, the location of your puppet modules.

set :puppet_parameters, 'puppet.pp'

the parameters that are passed to the puppet call.

set :puppet_excludes, %w(.git .svn)

these are patterns that are passed as rsync --exclude flags when pushing your puppet configs to the box.

set :puppet_parallel_rsync, true

determines whether the rsync commands for multiple servers are run in parallel threads or serially

Handling Legacy Puppet

Puppet deprecated the implicit invocation of apply in the 2.6.x series.

The default behavior of supply_drop includes apply keyword in its commands, but if you need compatibility with older versions of puppet, set the puppet_command variable to omit it.

You'll need to do this if you see errors like this:

Could not parse for environment production: Could not find file /home/.../supply_drop/apply.pp

How to contribute

If you write anything complicated, write a test for it. Test that your changes work using vagrant. Send a pull request. Easy peezy.

Contributors

Something went wrong with that request. Please try again.