无法从 Amazon Beanstalk 示例应用程序生成工作自定义 EC2 AMI

发布于 2024-10-18 07:44:46 字数 1031 浏览 0 评论 0原文

由于我想安装 Jenkins(前 Hudson)来在 AWS Beanstalk 上运行我的持续集成流程,因此我需要一个自定义 AMI,因为 Tomcat 和 Tomcat 中的某些参数需要自定义 AMI。 Linux 必须针对 Jenkins 进行更改

我运行了最初由 Beanstalk 启动的安装和自定义实例的过程,直到最后,Jenkins 的工作就像一个魅力。

但是,我不能做的是重用在自定义结束时生成的 AMI:BeansTalk 完成的运行状况检查看不到 EC2 实例,尽管 Beanstalk 启动了它并且工作正常。

为了理解我的问题,我将失败过程简化为以下内容:

  • a)我根据 Amazon 提供的示例创建一个新的 BT 应用程序/环境(我拥有的唯一参数是 SSH 我的 EC2 实例的密钥对)
  • b)当EC2 实例已启动,我使用 EC2 刷新 AMI
  • c) 我通过将原始 AWS Ami(id:100fff79 - Tomcat 6 64 位)更改为我在 (b) 中生成的 1 来修改 BT 环境配置
  • d)当我更改 ami id 时,BT 会重建
  • e) 重建会重新启动 EC2 实例。
  • f) 启动正常(可以通过 ssh 连接),但运行状况检查失败,我的环境变为红色状态。

有人可以复制这个过程并告诉我我做错了什么吗? (我想使用 (b) 的 AMI 作为 Jenkins 定制的起点。?

我可以提供的其他信息: 当 ssh-ing 到 EC2 实例时,会出现一个针对 apache、java、thin & 的 grep。 bluepilld 如 https://forums.aws.amazon 底部所述.com/thread.jspa?threadID=59027&tstart=25显示4个预期进程消失了。因此,失败了。

请帮忙!

问候

迪迪埃

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 changed 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

≈。彩虹 2024-10-25 07:44:46

将回答我自己的问题:为 Beanstalk 获取工作自定义 ami 的正确方法不是尝试刷新由 Beanstalk 启动的正在运行的实例,而是启动 Beanstalk 的模板 ami(Tomcat 6 64 位的 ami-100fff79)我的案例)从 EC2 控制台并从那里自定义它,刷新它,然后就完成了。

然后,您可以通过将 ami 更改为新的 ami 来“编辑 BT 环境的配置”,并且它可以正常工作。

问候
迪迪埃

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

绾颜 2024-10-25 07:44:46

如果您提供更多详细信息,这是我计划在 Beanstalker 0.3.0 版本中添加的功能,这是我的一套 Maven 插件,用于自动将 Maven 部署到 Elastic Beanstalk 和 Elastic MapReduce。它位于 http://beanstalker.ingenieux.com.br/

实际上,占位符就在那里,但我还没有对此进行全面测试。您愿意尝试提供帮助和建议吗?

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?

惜醉颜 2024-10-25 07:44:46

只要在构建新 AMI 之前删除实例上的 /opt/elasticbeanstalk/srv/hostmanager/db/hostmanager.db,您就应该能够从正在运行的实例创建自定义 AMI。我经常看到人们说“这是不可能的,您需要在 Elastic Beanstalk 之外启动一个干净的实例”,这完全是废话。我已经做到了。

我为自定义安装所做的完整记录如下:http://stormerider.com/blog/2012/08/16/building-an-ubuntu-ami-with-elastic-beanstalk-support/ --其中一些可能不适用于您,另一些则可能适用。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文