1

我正在尝试使用橡胶将我的应用程序部署到 AWS。

但是 setup_remote_aliases 任务“卡住”了消息“sftp upload #StringIO:0x103bf1068 ->

在尝试橡胶帽:刷新时,它再次卡在同一点。我设置了一个微型实例 - 可能是因为这个吗?

以下是日志:

 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: ["23.20.223.139"]
 ** Can't connect as user ubuntu to 23.20.223.139, assuming root allowed
  * executing `rubber:_direct_connection_23.20.223.139_794'
  * executing "echo"
    servers: ["23.20.223.139"]
    [23.20.223.139] executing command
 ** [out :: 23.20.223.139] Please login as the ec2-user user rather than root user.
 ** [out :: 23.20.223.139] 
    command finished in 11086ms
  * 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:0x0000010477db48> -> /tmp/setup_remote_aliases
4

2 回答 2

0

Ubuntu Server 实例没问题。其他的可能有问题。试试看。

于 2014-06-26T22:58:56.470 回答
0

虽然我不知道确切的问题是什么,但我在使用橡胶时也遇到了这种问题。我发现向橡胶添加更多调试信息非常有用。

对于您的情况,您可以找到定义任务的位置并简单地记录一些消息。

grep -r setup_remote_aliases `bundle show rubber`

此外,您可能想尝试支持 Rails 应用程序部署的 Amazon Elastic Beanstalk:https ://forums.aws.amazon.com/ann.jspa?annID=1680

于 2012-11-10T20:36:31.217 回答