简体   繁体   中英

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

Every time i try, i get to step 14 and get show

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.

I've also tried "git aws.push" but it's not going for it.

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' is not a git command. See 'git --help'.

also the .elasticbeanstalk directory is empty except for a config file

eb init returns this:

> $ 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.

To confirm that this is the issue, run 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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