简体   繁体   English

使用MacOSX将Rails应用程序推送到AWS Elastic Beanstalk

[英]Pushing Rails app to AWS Elastic Beanstalk with MacOSX

I'm currently going though Amazon's instructions to push a rails app up to a new EB instance: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html 我目前正在按照Amazon的说明将Rails应用程序推送到新的EB实例: http : //docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html

Every time i try, i get to step 14 and get show 每次尝试时,我都会进入步骤14并显示

Failed to update local Git configuration. 无法更新本地Git配置。 Follow the instructions at " http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/command-reference-get-started.html " to set up your Git repository, and then try again. 按照“ http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/command-reference-get-started.html ”中的说明设置Git存储库,然后重试。

I've also tried "git aws.push" but it's not going for it. 我也尝试过“ git aws.push”,但并非如此。

Is it likely that i have a permissions problem or that one of my paths is wrong? 我是否可能有权限问题,或者我的路径之一是错误的?

What's the best way to go about debugging this? 进行调试的最佳方法是什么?

Thanks 谢谢

ADDITIONAL INFO Here is the output when i do git aws.push 其他信息这是我执行git aws.push时的输出

$ git aws.push git: 'aws.push' is not a git command. $ git aws.push git:'aws.push'不是git命令。 See 'git --help'. 参见'git --help'。

also the .elasticbeanstalk directory is empty except for a config file .elasticbeanstalk目录也为空,除了配置文件

eb init returns this: eb init返回以下内容:

> $ eb init
To get your AWS Access Key ID and Secret Access Key, 
  visit "https://aws-portal.amazon.com/gp/aws/securityCredentials".
Enter your AWS Access Key ID (current value is "*****"): 
Enter your AWS Secret Access Key (current value is "*****"): 
Select an AWS Elastic Beanstalk service region (current value is "US East (Virginia)").
Available service regions are:
1) US East (Virginia)
2) US West (Oregon)
3) US West (North California)
4) EU West (Ireland)
5) Asia Pacific (Singapore)
6) Asia Pacific (Tokyo)
7) Asia Pacific (Sydney)
8) South America (Sao Paulo)
Select (1 to 8): 
Enter an AWS Elastic Beanstalk application name (current value is "fooapp3"): 
Enter an AWS Elastic Beanstalk environment name (current value is "fooapp3-env"): 
Select an environment tier (current value is "WebServer::Standard::1.0").
Available environment tiers are:
1) WebServer::Standard::1.0
2) Worker::SQS/HTTP::1.0
Select (1 to 2): 
Select a solution stack (current value is "32bit Amazon Linux 2014.03 v1.0.7 running Ruby 1.9.3").


Available solution stacks are:
1) 64bit Amazon Linux 2014.03 v1.0.7 running PHP 5.5
2) 32bit Amazon Linux 2014.03 v1.0.7 running PHP 5.5
3) 64bit Amazon Linux 2014.03 v1.0.7 running PHP 5.4
4) 32bit Amazon Linux 2014.03 v1.0.7 running PHP 5.4
5) 64bit Amazon Linux 2014.03 v1.0.6 running PHP 5.5
6) 64bit Amazon Linux 2014.03 v1.0.6 running PHP 5.4
7) 32bit Amazon Linux running PHP 5.3
8) 64bit Amazon Linux running PHP 5.3
9) 64bit Amazon Linux 2014.03 v1.0.7 running Node.js
10) 32bit Amazon Linux 2014.03 v1.0.7 running Node.js
11) 64bit Amazon Linux 2014.03 v1.0.6 running Node.js
12) 64bit Windows Server 2008 R2 running IIS 7.5
13) 64bit Windows Server 2012 running IIS 8
14) 64bit Windows Server 2012 R2 running IIS 8.5
15) 64bit Windows Server Core 2012 R2 running IIS 8.5
16) 64bit Amazon Linux 2014.03 v1.0.7 running Tomcat 7 Java 7
17) 32bit Amazon Linux 2014.03 v1.0.7 running Tomcat 7 Java 7
18) 64bit Amazon Linux 2014.03 v1.0.7 running Tomcat 7 Java 6
19) 32bit Amazon Linux 2014.03 v1.0.7 running Tomcat 7 Java 6
20) 64bit Amazon Linux 2014.03 v1.0.6 running Tomcat 7 Java 7
21) 64bit Amazon Linux 2014.03 v1.0.6 running Tomcat 7 Java 6
22) 32bit Amazon Linux running Tomcat 7
23) 64bit Amazon Linux running Tomcat 7
24) 32bit Amazon Linux running Tomcat 6
25) 64bit Amazon Linux running Tomcat 6
26) 64bit Amazon Linux 2014.03 v1.0.7 running Python 2.7
27) 32bit Amazon Linux 2014.03 v1.0.7 running Python 2.7
28) 64bit Amazon Linux 2014.03 v1.0.7 running Python
29) 32bit Amazon Linux 2014.03 v1.0.7 running Python
30) 64bit Amazon Linux 2014.03 v1.0.6 running Python 2.7
31) 64bit Amazon Linux 2014.03 v1.0.6 running Python
32) 32bit Amazon Linux running Python
33) 64bit Amazon Linux running Python
34) 64bit Amazon Linux 2014.03 v1.0.7 running Ruby 2.1 (Puma)
35) 64bit Amazon Linux 2014.03 v1.0.7 running Ruby 2.1 (Passenger Standalone)
36) 64bit Amazon Linux 2014.03 v1.0.7 running Ruby 2.0 (Puma)
37) 64bit Amazon Linux 2014.03 v1.0.7 running Ruby 2.0 (Passenger Standalone)
38) 64bit Amazon Linux 2014.03 v1.0.7 running Ruby 1.9.3
39) 32bit Amazon Linux 2014.03 v1.0.7 running Ruby 1.9.3
40) 64bit Amazon Linux 2014.03 v1.0.6 running Ruby 2.1 (Puma)
41) 64bit Amazon Linux 2014.03 v1.0.6 running Ruby 2.1 (Passenger Standalone)
42) 64bit Amazon Linux 2014.03 v1.0.6 running Ruby 2.0 (Puma)
43) 64bit Amazon Linux 2014.03 v1.0.6 running Ruby 2.0 (Passenger Standalone)
44) 64bit Amazon Linux 2014.03 v1.0.6 running Ruby 1.9.3
45) 64bit Amazon Linux 2014.03 v1.0.7 running Docker 1.0.0
46) 64bit Amazon Linux 2014.03 v1.0.6 running Docker 1.0.0
Select (1 to 46): 




Select an environment type (current value is "SingleInstance").
Available environment types are:
1) LoadBalanced
2) SingleInstance
Select (1 to 2): Create an RDS DB Instance? [y/n] (current value is "Yes"): Create an RDS BD Instance from (current value is "[No snapshot]"):



1) [No snapshot]
2) [Other snapshot]
Select (1 to 2): Enter an RDS DB master password (current value is "******"): 
If you terminate your environment, your RDS DB Instance will be deleted and you will lose your data.
Create snapshot? [y/n] (current value is "No"): 
Attach an instance profile (current value is "aws-elasticbeanstalk-ec2-role"):


1) [Create a default instance profile]
2) aws-elasticbeanstalk-ec2-role
3) admin_role
4) [Other instance profile]
Select (1 to 4): Failed to update local Git configuration. Follow the instructions at "http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/command-reference-get-started.html" to set up your Git repository, and then try again.

After a discussion , we were able to determine that the issue had to do with OS X putting a download quarantine on the executable. 经过讨论 ,我们能够确定问题与OS X造成了对可执行文件的下载隔离有关。

To confirm that this is the issue, run ls -al AWS-ElasticBeanstalk-CLI-2.6.3/AWSDevTools/Linux/ . 要确认这是问题所在,请运行ls -al AWS-ElasticBeanstalk-CLI-2.6.3/AWSDevTools/Linux/ If you see the @ next to the permissions like: 如果您在权限旁边看到@ ,例如:

-rwxrwxrwx@ 1 user staff 2134 22 Apr 00:17 AWSDevTools-RepositorySetup.sh 
drwxr-xr-x 7 user staff 238 25 Sep 14:51 scripts

then your executable is being quarantined. 那么您的可执行文件将被隔离。

The failure is because when eb init tried to execute it, the execution failed. 失败是因为当eb init尝试执行它时,执行失败。 Some more about the issue is documented here . 有关此问题的更多信息在此处记录

The fix is to run: 该修复程序将运行:

$ xattr -rd com.apple.quarantine AWS-ElasticBeanstalk-CLI-2.6.3/AWSDevTools/Linux/

Verify that it is no longer being quarantined with ls -al and then proceed with eb init to finish the setup. 验证它不再与ls -al隔离,然后继续进行eb init来完成设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM