2012-03-18 125 views

回答

5

我发现一些新鲜和热的题目是

Roundsman

Gemfile:

gem 'roundsman', :require => false 

Capfile:

require 'roundsman/capistrano' 

见自述的详细资料。

+0

谢谢!这是我需要的。 – 2012-05-04 01:36:49

0

我决定写一个Ruby宝石来解析文件nodes/*.json,并将其转化为Capistrano的友好地址:

gem "Chef_Solo_Nodes"

然后,在帽部署文件:

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

相当于:

role :app, "[email protected]:port", "xx.xx.xx.xx" 
role :db, "xx.xx.xx.xx" 

每个node/*.json文件可以任选地定义的属性:

  • IPADDRESS
  • 用户(或登录)
  • 端口