开发者

Can't generate a working customized EC2 AMI from Amazon Beanstalk sample appl

As I want to install Jenkins (ex-Hudson) to operate my continuous integration processes on AWS Beanstalk, I need a custom AMI because some parameters in Tomcat & Linux have to be c开发者_JAVA技巧hanged for Jenkins

I run the process of installing and customizing the instance started initially by Beanstalk until the end and Jenkins works like a charm on it.

But, what I can't do is reuse the AMI that I generated at the end of my customization: the health check done by BeansTalk doesn't see the EC2 instance although Beanstalk started it and it works fine.

In order to understand my issue, I reduced my failing process to the following:

  • a) I create a new BT application / environment based on sample provided by Amazon (only parameter that I had is a keypair to SSH my EC2 instance)
  • b) when the EC2 instance is started, I use the EC2 to flash the AMI
  • c) I modify the BT env config by changing the original AWS Ami (id: 100fff79 - Tomcat 6 64 bits) by the 1 that I genrated in (b)
  • d) the BT rebuilds when I change the ami id
  • e) the rebuild restarts the EC2 instance.
  • f) It starts fine (can ssh to it) but the health checking fails and my env turns to red status.

Can somebody replicate this process and tell me what I am doing wrong ? (I would like to use the AMI of (b) as starting point for my Jenkins customization.?

Additional info that I can provide: when ssh-ing to the EC2 instance, a grep for apache, java, thin & bluepilld as described at bottom of https://forums.aws.amazon.com/thread.jspa?threadID=59027&tstart=25 shows that the 4 expected processes disappeared. Hence, the failure.

Please, help !

regards

didier


will answer my own question: the right way to obtain a working customized ami for Beanstalk is not to try to flash a running instance launched by Beanstalk but rather start the template ami for Beanstalk (ami-100fff79 for Tomcat 6 64 bits in my case) from EC2 console and customize it from there, flash it and you're done.

You can then "edit configuration" for your BT environment by changing the ami to the new one and it works fine.

regards didier


If you give more details, this is a feature I'm planning for version 0.3.0 of Beanstalker, my set of Maven plugins for automating maven deployments to Elastic Beanstalk and Elastic MapReduce. It is available at http://beanstalker.ingenieux.com.br/

Actually, the placeholders are there, but I haven't still done full testing of that. Are you willing to try and give help and advice?


You should be able to create a customized AMI from a running instance as long as you delete /opt/elasticbeanstalk/srv/hostmanager/db/hostmanager.db on the instance before building the new AMI. I keep seeing people say "it can't be done, you need to start a clean instance outside of Elastic Beanstalk" and that's bunk. I've done it.

A full write-up of what I've done to customize my install is here: http://stormerider.com/blog/2012/08/16/building-an-ubuntu-ami-with-elastic-beanstalk-support/ -- some of it may not apply to you, some of it may.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜