我正在使用橡胶(建立在 capistrano 之上)部署到我的 ec2 实例。我基本上遵循了 Ryan bates http://railscasts.com/episodes/347-rubber-and-amazon-ec2?view=comments的铁路演员表。在那个铁路演员表中,他没有列出 ami,但配置确实要求我列出 ami,所以我做了。这是我的配置的链接。
http://www.text-upload.com/read,4081177118013
我也尝试过不同的ami。我还检查了每个 stackoverflow 问题,但没有答案。橡胶连接,我可以在 aws 控制台中检查实例已启动,但它卡在了那条线上。
我试过橡胶帽:引导。我还尝试了橡胶帽:destroy_all,然后是橡胶帽:create_staging
这就是它被卡住的地方。
* executing `rubber:create_staging'
Hostname to use for staging instance [production]:
Roles to use for staging instance [apache,app,collectd,common,db:primary=true,elasticsearch,examples,graphite_server,graphite_web,graylog_elasticsearch,graylog_mongodb,graylog_server,graylog_web,haproxy,mongodb,monit,passenger,postgresql,postgresql_master,web,web_tools]:
* executing `rubber:create'
* Security Group already in cloud, syncing rules: rubbertest_production_examples
* Security Group already in cloud, syncing rules: rubbertest_production_haproxy
* Security Group already in cloud, syncing rules: rubbertest_production_web
* Security Group already in cloud, syncing rules: rubbertest_production_monit
* Security Group already in cloud, syncing rules: rubbertest_production_graylog_elasticsearch
* Security Group already in cloud, syncing rules: rubbertest_production_mongodb
* Security Group already in cloud, syncing rules: rubbertest_production_db
* Security Group already in cloud, syncing rules: rubbertest_production_web_tools
* Security Group already in cloud, syncing rules: rubbertest_production_collectd
* Security Group already in cloud, syncing rules: rubbertest_production_common
* Security Group already in cloud, syncing rules: rubbertest_production_production
* Security Group already in cloud, syncing rules: rubbertest_production_default
* Security Group already in cloud, syncing rules: rubbertest_production_postgresql
* Security Group already in cloud, syncing rules: rubbertest_production_graylog_server
* Security Group already in cloud, syncing rules: rubbertest_production_elasticsearch
* Security Group already in cloud, syncing rules: rubbertest_production_passenger
* Security Group already in cloud, syncing rules: rubbertest_production_graphite_server
* Security Group already in cloud, syncing rules: rubbertest_production_graylog_web
* Security Group already in cloud, syncing rules: rubbertest_production_graylog_mongodb
* Security Group already in cloud, syncing rules: rubbertest_production_graphite_web
* Security Group already in cloud, syncing rules: rubbertest_production_apache
* Security Group already in cloud, syncing rules: rubbertest_production_postgresql_master
* Security Group already in cloud, syncing rules: rubbertest_production_app
** Creating instance ami-eafa77da/m1.small/rubbertest_production_default,rubbertest_production_web,rubbertest_production_web_tools,rubbertest_production_production,rubbertest_production_apache,rubbertest_production_app,rubbertest_production_passenger,rubbertest_production_collectd,rubbertest_production_common,rubbertest_production_monit,rubbertest_production_db,rubbertest_production_postgresql,rubbertest_production_postgresql_master,rubbertest_production_elasticsearch,rubbertest_production_examples,rubbertest_production_graphite_server,rubbertest_production_graphite_web,rubbertest_production_graylog_elasticsearch,rubbertest_production_graylog_mongodb,rubbertest_production_mongodb,rubbertest_production_graylog_server,rubbertest_production_graylog_web,rubbertest_production_haproxy/Default
** Instance production created: i-eb8717d8
Waiting for instances to start...........................................
** Instance running, fetching hostname/ip data
* executing `rubber:_allow_root_ssh'
* executing "sudo -p 'sudo password: ' bash -l -c 'cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/'"
servers: ["50.112.28.254"]
. ** Failed to connect to 50.112.28.254, retrying
* executing `rubber:_allow_root_ssh'
* executing "sudo -p 'sudo password: ' bash -l -c 'cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/'"
servers: ["50.112.28.254"]
.............. ** timeout in initial connect, retrying
* executing `rubber:_allow_root_ssh'
* executing "sudo -p 'sudo password: ' bash -l -c 'cp /home/ubuntu/.ssh/authorized_keys /root/.ssh/'"
servers: ["50.112.28.254"]
. ** Can't connect as user ubuntu to 50.112.28.254, assuming root allowed
* executing `rubber:_direct_connection_50.112.28.254_864'
* executing "echo"
servers: ["50.112.28.254"]
.. [50.112.28.254] executing command
** [out :: 50.112.28.254] Please login as the bitnami user rather than root user.
** [out :: 50.112.28.254]
..... command finished in 14009ms
* executing `rubber:setup_static_ips'
* executing `rubber:setup_local_aliases'
** Writing out aliases into local machines /etc/hosts, sudo access needed
Password:
** Auto role: apache => production.foo.com, {:platform=>"linux"}
** Auto role: app => production.foo.com, {:platform=>"linux"}
** Auto role: passenger => production.foo.com, {:platform=>"linux"}
** Auto role: collectd => production.foo.com, {:platform=>"linux"}
** Auto role: common => production.foo.com, {:platform=>"linux"}
** Auto role: monit => production.foo.com, {:platform=>"linux"}
** Auto role: db => production.foo.com, {:primary=>true, :platform=>"linux"}
** Auto role: postgresql => production.foo.com, {:platform=>"linux"}
** Auto role: postgresql_master => production.foo.com, {:platform=>"linux"}
** Auto role: elasticsearch => production.foo.com, {:platform=>"linux"}
** Auto role: examples => production.foo.com, {:platform=>"linux"}
** Auto role: graphite_server => production.foo.com, {:platform=>"linux"}
** Auto role: graphite_web => production.foo.com, {:platform=>"linux"}
** Auto role: graylog_elasticsearch => production.foo.com, {:platform=>"linux"}
** Auto role: graylog_mongodb => production.foo.com, {:platform=>"linux"}
** Auto role: mongodb => production.foo.com, {:platform=>"linux"}
** Auto role: graylog_server => production.foo.com, {:platform=>"linux"}
** Auto role: graylog_web => production.foo.com, {:platform=>"linux"}
** Auto role: haproxy => production.foo.com, {:platform=>"linux"}
** Auto role: web => production.foo.com, {:platform=>"linux"}
** Auto role: web_tools => production.foo.com, {:platform=>"linux"}
* executing `rubber:setup_remote_aliases'
servers: ["production.foo.com"]
** sftp upload #<StringIO:0x000001029984c0> -> /tmp/setup_remote_aliases