Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/garethr/capistrano-puppet
Get capistrano hosts from puppet
https://github.com/garethr/capistrano-puppet
Last synced: 2 months ago
JSON representation
Get capistrano hosts from puppet
- Host: GitHub
- URL: https://github.com/garethr/capistrano-puppet
- Owner: garethr
- Created: 2011-11-05T17:52:24.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2011-11-06T22:04:51.000Z (about 13 years ago)
- Last Synced: 2024-10-04T13:25:31.873Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 89.8 KB
- Stars: 20
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
If you're using Puppet you already have a list of the hosts and types of hosts under your control. So why duplicate this information in your capistrano configuration? Every time you provision or destroy a new machine you have to remember to update your deployment configuration and that's just an error waiting to happen.
This requires you to be running my web-puppet service to get at the relevant host and tag information. https://github.com/garethr/web-puppet
A sample capistrano configuration might look like the following. The only important parts are the require, creating a new server instance and the calls to get_servers to return a list of hosts.
require 'capistrano-puppet'
web_puppet = CapistranoPuppet::Server.new('http://username:password@localhost:9295')
set :application, "test"
set :repository, "."
set :scm, :none
set :deploy_via, :copydefault_run_options[:pty] = true
set :deploy_to, '/server/path/'
set :user, 'deploy'
set :use_sudo, falserole :web do
web_puppet.get_servers('webserver')
endrole :app do
web_puppet.get_servers('appserver')
endNote that this is the first release as is really just a proof of concept. Running web-puppet in environments with lots of hosts will likely be very slow.
The code was inspired by capistrano-cobbler, which uses Cobbler rather than web-puppet to get the host information. https://github.com/proffalken/capistrano-cobbler