您可能已经找到了解决方案,但我想我会回答以防万一。
几个月前,我启动了一个开源项目来帮助组织 EC2 基础架构。它将元数据存储在 SimpleDB 中。
您在 Ruby DSL 中创建机器配置,其中所有内容都组织成环境和角色。这是一个典型的配置:
env :stage do
size 'm1.small' # Default EC2 machine type for the 'stage'
role :app do
positions 1 # Only 1 machine
addresses '11.22.33.44' # Define an elastic IP
disks do # Define EBS volumes
path "/rudy/disk1" do # The path to mount
size 100 # The size in GB
device "/dev/sdr" # The unique disk device
end
end
end
role :db do
size 'm1.large' # Use more powerful machine for db
ami 'ami-dc1038a8' # A 64-bit debian
end
end
然后,您可以从命令行启动环境:
$ rudy startup
The following machines were started:
m-us-east-1b-stage-app-01 ec2-11-22-33-44.us-east-1.compute.amazonaws.com
$ rudy -r db startup
The following machines were started:
m-us-east-1b-stage-db-01 ec2-79-125-50-26.us-east-1.compute.amazonaws.com
$ rudy machines
m-us-east-1b-stage-app-01 ec2-11-22-33-44.us-east-1.compute.amazonaws.com
m-us-east-1b-stage-db-01 ec2-79-125-50-26.us-east-1.compute.amazonaws.com
$ rudy disks
disk-us-east-1b-stage-app-01-rudy-disk1 vol-eee10486; 100GB; /dev/sdr; mounted
您可以使用以下方式登录:
$ rudy -u root ssh
该项目称为鲁迪。以下是更多信息的几个链接,如果您有任何问题,请随时直接与我联系: