我有以下设置:
我做了以下步骤
AWS EB控制台工具已添加到我的路径
export PATH=$PATH:~/amazon-eb/eb/linux/python2.7/
export AWS_ACCESS_KEY_ID=xxx
export AWS_SECRET_KEY=xxx
export AWS_CREDENTIALS_PATH=~/.aws/credentials
~/.aws/credentials
[default]
AWSAccessKeyId=xxx
AWSSecretKey=xxx
使用.elasticbeanstalk/config
文件
[global]
ApplicationName=Oselot Wordpress Blog
DevToolsEndpoint=git.elasticbeanstalk.us-east-1.amazonaws.com
EnvironmentName=oselotWordpressBlog-env
Region=us-east-1
当我尝试运行eb status
时,它会询问我的凭据(不知道为什么......)。所以我进入他们。好像它有效
Anatoliys-MBP:oselot-blog toli$ eb status
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: xxx
Enter your AWS Secret Access Key: xxx
URL : xxx.elasticbeanstalk.com
Status : Ready
Health : Green
RDS Database: AWSEBRDSDatabase | xxx.xxx.us-east-1.rds.amazonaws.com:3306
我运行git aws.push
并收到错误:
git: 'aws.push' is not a git command. See 'git --help'.
答案 0 :(得分:3)
我跑了eb init
,结果我问了很多我已经在Beanstalk GUI中设置的问题。我不明白为什么这是必要的......
Anatoliys-MBP:oselot-blog toli$ 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: xxx
Enter your AWS Secret Access Key: xxx
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): 1
Enter an AWS Elastic Beanstalk application name (current value is "Oselot Wordpress Blog"):
Enter an AWS Elastic Beanstalk environment name (current value is "oselotWordpressBlog-env"):
Select an environment tier.
Available environment tiers are:
1) WebServer::Standard::1.0
2) Worker::SQS/HTTP::1.0
Select (1 to 2): 1
Select a solution stack.
Available solution stacks are:
1) 64bit Amazon Linux 2014.03 v1.0.3 running PHP 5.5
2) 32bit Amazon Linux 2014.03 v1.0.3 running PHP 5.5
3) 64bit Amazon Linux 2014.03 v1.0.3 running PHP 5.4
4) 32bit Amazon Linux 2014.03 v1.0.3 running PHP 5.4
5) 32bit Amazon Linux running PHP 5.3
6) 64bit Amazon Linux running PHP 5.3
7) 64bit Amazon Linux 2014.03 v1.0.3 running Node.js
8) 32bit Amazon Linux 2014.03 v1.0.3 running Node.js
9) 64bit Windows Server 2008 R2 running IIS 7.5
10) 64bit Windows Server 2012 running IIS 8
11) 64bit Amazon Linux 2014.03 v1.0.3 running Tomcat 7 Java 7
12) 32bit Amazon Linux 2014.03 v1.0.3 running Tomcat 7 Java 7
13) 64bit Amazon Linux 2014.03 v1.0.3 running Tomcat 7 Java 6
14) 32bit Amazon Linux 2014.03 v1.0.3 running Tomcat 7 Java 6
15) 32bit Amazon Linux running Tomcat 7
16) 64bit Amazon Linux running Tomcat 7
17) 32bit Amazon Linux running Tomcat 6
18) 64bit Amazon Linux running Tomcat 6
19) 64bit Amazon Linux 2014.03 v1.0.3 running Python 2.7
20) 32bit Amazon Linux 2014.03 v1.0.3 running Python 2.7
21) 32bit Amazon Linux 2014.03 v1.0.3 running Python
22) 64bit Amazon Linux 2014.03 v1.0.3 running Python
23) 32bit Amazon Linux running Python
24) 64bit Amazon Linux running Python
25) 64bit Amazon Linux 2014.03 v1.0.4 running Ruby 2.0 (Puma)
26) 64bit Amazon Linux 2014.03 v1.0.3 running Ruby 2.0 (Passenger Standalone)
27) 64bit Amazon Linux 2014.03 v1.0.3 running Ruby 1.9.3
28) 32bit Amazon Linux 2014.03 v1.0.3 running Ruby 1.9.3
29) 32bit Amazon Linux 2014.02 v1.0.1 running Ruby 1.8.7
30) 64bit Amazon Linux 2014.02 v1.0.1 running Ruby 1.8.7
31) 64bit Amazon Linux 2014.03 v1.0.0 running Docker 1.0.0
32) 64bit Amazon Linux 2014.03 v1.0.4 running Python 2.7
33) 64bit Amazon Linux 2014.03 v1.0.4 running PHP 5.5
34) 64bit Amazon Linux 2014.03 v1.0.4 running Node.js
35) 64bit Amazon Linux 2014.03 v1.0.4 running Ruby 1.9.3
36) 64bit Amazon Linux 2014.03 v1.0.4 running PHP 5.4
37) 64bit Amazon Linux 2014.03 v1.0.4 running Ruby 2.0 (Passenger Standalone)
38) 64bit Amazon Linux 2014.03 v1.0.4 running Tomcat 7 Java 6
39) 64bit Amazon Linux 2014.03 v1.0.4 running Python
40) 64bit Amazon Linux 2014.03 v1.0.1 running Docker 1.0.0
41) 64bit Amazon Linux 2014.03 v1.0.5 running Ruby 2.0 (Puma)
42) 64bit Amazon Linux 2014.03 v1.0.4 running Tomcat 7 Java 7
Select (1 to 42): 1
Select an environment type.
Available environment types are:
1) LoadBalanced
2) SingleInstance
Select (1 to 2): 1
Create an RDS DB Instance? [y/n]: n
Attach an instance profile (current value is "[Create a default instance profile]"):
1) [Create a default instance profile]
2) aws-opsworks-ec2-role.1405096101659
3) aws-opsworks-ec2-role.1405096100907
4) aws-opsworks-ec2-role.1405096100282
5) aws-opsworks-ec2-role.1405096099782
6) aws-opsworks-ec2-role.1405096099019
7) aws-opsworks-ec2-role
8) [Other instance profile]
Select (1 to 8):
Updated AWS Credential file at "/Users/toli/.elasticbeanstalk/aws_credential_file".
出现此错误:
Traceback (most recent call last):
File ".git/AWSDevTools/aws.elasticbeanstalk.push", line 21, in <module>
from aws.dev_tools import *
File "/Users/toli/Sites/oselot-blog/.git/AWSDevTools/aws/dev_tools.py", line 5, in <module>
import boto
ImportError: No module named boto
所以我实际上通过做
获得了botocurl -O https://bootstrap.pypa.io/get-pip.py
sudo get-pip.py
sudo pip install boto
它有效......