简体   繁体   English

AWS Elastic Beanstalk:更新平台版本和自定义AMI

[英]AWS Elastic Beanstalk: Update Platform Version & custom AMI

I'm using Elastic Beanstalk for a web app. 我正在将Elastic Beanstalk用于Web应用程序。 (Automatic set up of EC2, an RDS db, etc). (自动设置EC2,RDS数据库等)。

I've been using a custom AMI (based on the default Elastic Beanstalk) because of my need for some specific packages too large to install with a config file. 我一直在使用自定义AMI(基于默认的Elastic Beanstalk),因为我需要一些特定的软件包,这些软件包太大而无法与配置文件一起安装。

I noticed the other day that my dashboard shows an option to update platform version under configuration. 我注意到前几天,我的仪表板显示了一个选项,可以在配置下更新平台版本。 For example, from 64bit Amazon Linux 2015.03 to 64bit Amazon Linux 2015.09 . 例如,从64bit Amazon Linux 2015.0364bit Amazon Linux 2015.09 64bit Amazon Linux 2015.03

How will this affect my custom AMI? 这将如何影响我的自定义AMI? Will it overwrite it? 它会覆盖它吗?

What is the best way to update a custom AMI from, for example, 64bit Amazon Linux 2015.03 to 64bit Amazon Linux 2015.09 ? 将自定义AMI从例如64bit Amazon Linux 2015.0364bit Amazon Linux 2015.09 64bit Amazon Linux 2015.03的最佳方法是什么?

If you update the AMI to theirs, it won't contain your custom modifications. 如果将AMI更新为它们的AMI,它将不包含您的自定义修改。 You would need to make these modifications yourself to your base AMI. 您需要自己对基本AMI进行这些修改。

I've had success using CI (jenkins) to build my AMIs with Packer via puppet. 我已经成功使用CI(jenkins)通过via通过Packer构建了我的AMI。 This allows me to set the base AMI to the newer one and end up with an updated AMI automatically. 这使我可以将基本AMI设置为较新的AMI,并最终得到更新的AMI。 Jenkins then tells beanstalk to use the new AMI it built. 然后,Jenkins告诉beantalk使用其构建的新AMI。

If possible, I strongly suggest you'd stick with the default AMI provided by Amazon. 如果可能的话,我强烈建议您坚持使用Amazon提供的默认AMI。 It makes the whole OS maintenance a breeze and ensures that whenever peripheral chances are made (eg in the load balancer or beanstalk scripts) - you'd be safe. 它使整个操作系统的维护变得轻而易举,并确保只要有外围机会(例如,在负载平衡器或beantalk脚本中),就可以确保安全。
For that you'll have to solve the issue of installing your extra packages. 为此,您必须解决安装额外软件包的问题。 Consider using the Docker version of elastic beanstalk, which allows a great deal of flexibility in the OS level, alongside the benefits of beanstalk. 考虑使用Docker版本的Elastic beantalk,它在OS级别上具有很大的灵活性,并具有beantalk的优点。 The only downside is another layer of complexity. 唯一的缺点是另一层复杂性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM