自定义 Elastic Beanstalk 实例 [英] customize Elastic Beanstalk instances

查看:21
本文介绍了自定义 Elastic Beanstalk 实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在 Elastic Beanstalk 中部署一个 Java Web 应用程序.Beanstalk 默认为 Redhat 实例提供 Tomcat7 &打开jdk.但我想自定义实例以便我可以使用 Sunjdk.遵循此处,我从 EC2 & 启动了一个新实例安装了 sun jdk、tomcat7 并创建了实例的自定义 AMI,并在 BeanStalk 的编辑环境配置中的自定义 AMI id 字段中提供了其 ID.但是我的 Environment Health 状态更改为 RED,并且未部署应用程序.你能给我建议一个解决方案吗.

We are deploying a java web application in Elastic Beanstalk. The Beanstalk by default provides Redhat instances with Tomcat7 & openjdk. But i want to customize the instances so that i can use Sunjdk. Followed the steps as mentioned here, I launched a new instance from EC2 & installed sun jdk, tomcat7 and created a custom AMI of the instance and provided its ID in Custom AMI id field in edit Environment configuration in BeanStalk. But my Environment Health status is changing to RED, and the application is not deployed. Can you please suggest me a solution for this.

推荐答案

我已经完成了你想做的事情,并且很高兴地报告它有效.在我的第一次尝试中,我遇到了同样的问题.确保您:

I have done exactly what you want to do, and am happy to report that it works. In my first attempts I encountered the same issue. Make sure that you:

  • 从运行中的 Amazon beanstalk AMI 实例创建您的自定义 AMI,该实例从 EC2 手动启动,而不是通过 beanstalk 启动应用程序启动的实例.这非常重要,因为刷入 beantalk 启动的 EC2 实例将不起作用!!
  • 按照这些说明安装 Sun 的 Java,以确保所有环境和符号链接都是正确的.https://forums.aws.amazon.com/message.jspa?messageID=251168#251168
  • 请耐心等待,因为我发现出于某种原因,与使用默认的 OpenJDK 配置相比,Tomcat 需要更长的时间才能启动.
  • Create your custom AMI from a running instance of Amazon's beanstalk AMI that you manually launch from EC2, NOT one that was launched from starting your application through beanstalk. This is very important, as Flashing a beanstalk launched EC2 instance won't work!!
  • install Sun's Java as per these instructions, to make sure all the environment and symbolic links are correct. https://forums.aws.amazon.com/message.jspa?messageID=251168#251168
  • be patient, as I found for some reason Tomcat takes longer to spin up than with the default OpenJDK config.

如果仍然无法获取,请确保检查/opt/tomcat7/logs/catalina.out 中的日志 - 我遇到了一个神秘的 VerifyException,该异常是通过将新的 .jar 上传到环境中解决的,然后我也几乎立即用完了 permgen 空间,这可以通过增加 beanstalk 'edit configuration' 的 'Container' 配置区域中的值来解决.

If you still can't get it, make sure you check the logs in /opt/tomcat7/logs/catalina.out - I hit a mysterious VerifyException that was resolved by uploading a new .jar to the environment, and I also ran out of permgen space almost immediately, which was resolved by upping the values in the 'Container' configuration area of the beanstalk 'edit configuration'.

这篇关于自定义 Elastic Beanstalk 实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆