Chef Integration with Capistrano

Is there an alternative to capistrano-chef gem for a chef? Basically, to avoid double-defining server information.

+5
source share
2 answers

I found something new and hot on the topic:

Roundsman

Gemfile:

gem 'roundsman', :require => false

Capfile:

require 'roundsman/capistrano'

See readme for more details.

+5
source

I decided to write a ruby ​​pearl to parse the files in nodes/*.jsonand convert them to Capistrano's welcome addresses:

gem "Chef_Solo_Nodes"

Then in the cover deployment file:

require "Chef_Solo_Nodes"
role :app, *Chef_Solo_IPs('app')
role :db, *Chef_Solo_IPs('db')

Which is equivalent:

role :app, "user@host:port", "xx.xx.xx.xx"
role :db, "xx.xx.xx.xx"

Each file node/*.jsoncan optionally define attributes:

  • IPAddress
  • user (or login)
  • Port
0
source

All Articles