capistrano-consul
Capistrano plugin to populate roles with hosts from consul
Installation
Add this line to your application's Gemfile:
gem 'capistrano-consul'
And then execute:
$ bundle
Usage
# config/deploy/<development|stage|prod>.rb
set :consul_url, 'http://192.168.22.30:8500'
set :ssl_options, { ssl: {
client_cert: OpenSSL::X509::Certificate.new(File.read('./cert.pem')),
client_key: OpenSSL::PKey::RSA.new(File.read('./key.pem'), '')
}
}
# Capfile or config/deploy.rb
require 'capistrano-consul'
# Give "cache" role to hosts publishing memcached service
service 'memcached', :cache
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request