问题描述
由于我想安装 Jenkins(前 Hudson)以在 AWS Beanstalk 上运行我的持续集成流程,我需要一个自定义 AMI,因为 Tomcat 和 & 中的一些参数;Linux 必须为 Jenkins 更改
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
我运行了最初由 Beanstalk 启动的安装和自定义实例的过程,直到最后,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.
但是,我不能做的是重用我在自定义结束时生成的 AMI:虽然 Beanstalk 启动了 EC2 实例并且它工作正常,但 BeansTalk 完成的运行状况检查没有看到 EC2 实例.
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) 我根据 Amazon 提供的示例创建了一个新的 BT 应用程序/环境(我拥有的唯一参数是通过 SSH 连接我的 EC2 实例的密钥对)
- b) 当 EC2 实例启动时,我使用 EC2 刷写 AMI
- c) 我通过在 (b) 中生成的 1 更改原始 AWS Ami(ID:100fff79 - Tomcat 6 64 位)来修改 BT 环境配置
- d) 当我更改 ami id 时,BT 会重建
- e) 重建会重新启动 EC2 实例.
- f) 它开始正常(可以 ssh 到它)但健康检查失败,我的 env 变成红色状态.
有人可以复制这个过程并告诉我我做错了什么吗?(我想使用 (b) 的 AMI 作为我的 Jenkins 自定义的起点.?
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.?
我可以提供的其他信息:当通过 ssh-ing 连接到 EC2 实例时,一个用于 apache、java、thin & 的 grepbluepilld 如https://forums.aws.amazon 底部所述.com/thread.jspa?threadID=59027&tstart=25 显示 4 个预期的进程消失了.因此,失败.
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.
请帮忙!
问候
迪迪尔
推荐答案
将回答我自己的问题:为 Beanstalk 获取可工作的自定义 ami 的正确方法不是尝试刷新由 Beanstalk 启动的正在运行的实例,而是 从 EC2 控制台启动 Beanstalk 的模板 ami(在我的例子中为 Tomcat 6 64 位的 ami-100fff79) 并从那里自定义它,刷写它,你就完成了.
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.
然后,您可以通过将 ami 更改为新的 ami 来为您的 BT 环境编辑配置",并且它工作正常.
You can then "edit configuration" for your BT environment by changing the ami to the new one and it works fine.
问候迪迪尔
这篇关于无法从 Amazon Beanstalk 示例应用程序生成工作的自定义 EC2 AMI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!