我正在尝试我的第一个Elastic Beanstalk配置,但它失败了 这就是我所做的:
mkdir .ebextensions
vi 01installation.config
配置:
packages:
apt:
apache2: []
libapache2-mod-wsgi: []
git: []
apache2-threaded-dev: []
commands:
01_download_apache_mod_dumpost:
command: sudo git clone https://github.com/danghvu/mod_dumpost.git
02_command:
command: alias apxs2=apxs
03_change_log_level:
command: sudo sed -i 's/LogLevel warn/LogLevel debug/' /etc/apache2/apache2.conf
04a_install_mod_dumpost:
command: sudo make
04b_install_mod_dumpost:
command: sudo make install
接下来,我下载了AWS-Elastic-Beanstalk-CLI
并创建了别名eb:
alias eb="python2.7 ~/AWS-ElasticBeanstalk-CLI-2.4.0/eb/linux/python2.7/eb"
比在我的工作目录中做了:
git init .
git add .
git commit -m "Initital setup"
比做了:
eb init
eb start
在我回答了CLI中的所有问题后,我得到了这个:
Waiting for environment "workerbeanstalk-env" to launch.
2013-07-31 10:25:27 INFO createEnvironment is starting.
2013-07-31 10:25:33 INFO Using elasticbeanstalk-us-east-xxxxxxxxxxx as Amazon S3 storage bucket for environment data.
2013-07-31 10:25:52 INFO Created load balancer named: xxxxxxxxxxxxxxxx
2013-07-31 10:26:13 INFO Created security group named: xxxxxxxxxxx4
2013-07-31 10:26:17 INFO Created Auto Scaling launch configuration named: xxxxxxxxxxxxxxx
2013-07-31 10:27:15 INFO Created Auto Scaling group named: xxxxxxxxxxxxxxxxx
2013-07-31 10:27:15 INFO Waiting for EC2 instances to launch. This may take a few minutes.
2013-07-31 10:27:19 INFO Created Auto Scaling group policy named: arn:aws:autoscaling:us-east-xxxxxxxxxxxxxxx:scalingPolicy:xxxxxxxxxxxxxxxxxx:autoScalingGroupName/xxxxxxxxxxxxxx-AWSEBAutoScalingGroup-xxxxxxxxxxxxx:policyName/xxxxxxxxxxxxk-AWSEBAutoScalingScaleDownPolicy-xxxxxxxxx
2013-07-31 10:27:19 INFO Created Auto Scaling group policy named: arn:aws:autoscaling:us-east-1:xxxxxxxxxx:scalingPolicy:xxxxxxxxxxxxxxx:autoScalingGroupName/xxxxxxxxxx-stack-AWSEBAutoScalingGroupxxxxxxxxxxxxxxxxx:policyName/awseb-xxxxxxxxxxx-stack-AWSEBAutoScalingScaleUpPolicyxxxxxxxxxxxxxxxx
2013-07-31 10:27:23 INFO Created CloudWatch alarm named: awsebxxxxxxxxxx-AWSEBCloudwatchAlarmLow-xxxxxxxxxxxx
2013-07-31 10:27:23 INFO Created CloudWatch alarm named: awseb-xxxxxxxxxxk-AWSEBCloudwatchAlarmHigh-xxxxxxxxxxxxxxxxxxx
2013-07-31 10:29:32 ERROR Responses from [i-32xxxxx3] were received, but the commands failed.
2013-07-31 10:30:39 INFO Successfully launched environment: workerbeanstalk-env
最后一行显示它已启动,但Helath检查显示为RED。 我尝试用SSH连接到实例来检查已安装或下载的内容,但显然没有运气,因为我没有提供密钥对,(如果有人可以帮我弄清楚在哪里指定密钥对也会很棒) 那么主要问题是我做错了什么,以及为什么它没有启动?
答案 0 :(得分:1)
重新提问 - 如果有人可以帮我弄清楚指定钥匙对的位置也会很棒
当您使用Elastic Beanstalk时,最简单的方法是通过EBS控制台 - “配置”屏幕。
在“Instances”的设置下(单击右侧的齿轮),显示“EC2 Key pair”字段。
如果没有列出,则必须在EC2菜单中创建一对 - Network&安全 - >密钥对