gpt4 book ai didi

ruby - AWS Elastic Beanstalk - 如何将现有环境从 Ruby 2.1 升级到 Ruby 2.2

转载 作者:数据小太阳 更新时间:2023-10-29 06:27:38 25 4
gpt4 key购买 nike

AWS Elastic Beanstalk - 无法使用最新平台克隆eb upgrade从 Ruby 2.1 到 Ruby 2.2

我一直在为这个问题绞尽脑汁。早在 5 月份,AWS 就宣布他们的 Ruby Elastic Environments 现在提供 Ruby-2.2(例如 ruby-2.2-(passenger-standalone)ruby-2.2-(puma))。我无法将现有的 ruby​​-2.1 环境升级到 ruby​​-2.2。看来我必须完全重新创建它们……这看起来很傻吗?还有其他人遇到过这个吗?我只是错过了一些简单的东西吗?

额外信息

我一直在愉快地使用 ruby-2.1-(passenger-standalone)在我的暂存生产 环境中持续了几个月。现在我想将它们升级到最新的 ruby​​-2.2 平台。 AWS 文档说这很简单,事实上他们的一些文档甚至似乎声明您可以使用 eb clone <env-name> --update。 . EB CLI 3.4.5 中不存在该标志我正在使用 :( 此外,Web 控制台有一个Clone with Latest Platform 选项菜单项,但它被禁用了。

看来,要获得最新的 Ruby-2.2 实例,我所能做的就是从头开始创建一个全新的环境。这非常烦人。

所以这是我尝试过的...

$ eb status
Environment details for: staging
Application name: xyz
Region: us-west-2
Deployed Version: fbe7
Environment ID: someId
Platform: 64bit Amazon Linux 2015.03 v1.4.3 running Ruby 2.1 (Passenger Standalone)
Tier: WebServer-Standard
CNAME: bla.bla.bla.elasticbeanstalk.com
Updated: 2015-06-26 22:48:59.689000+00:00
Status: Ready
Health: Green

太好了,确认我使用的是 Ruby 2.1。所以让我们尝试升级:

$ eb upgrade
Environment already on most recent platform version.

好的,那很好,那么平台本身呢:

$ eb platform select
It appears you are using Ruby. Is this correct?
(y/n): y

Select a platform version.
1) Ruby 2.2 (Puma)
2) Ruby 2.2 (Passenger Standalone)
3) Ruby 2.1 (Puma)
4) Ruby 2.1 (Passenger Standalone)
5) Ruby 2.0 (Puma)
6) Ruby 2.0 (Passenger Standalone)
7) Ruby 1.9.3
(default is 1): 2

现在,这是我的平台设置:

$ eb platform show
Current default platform: Ruby 2.2 (Passenger Standalone)
New environments will be running: 64bit Amazon Linux 2015.03 v1.4.3 running Ruby 2.2 (Passenger Standalone)

Platform info for environment "staging":
Current: 64bit Amazon Linux 2015.03 v1.4.3 running Ruby 2.1 (Passenger Standalone)
Latest: 64bit Amazon Linux 2015.03 v1.4.3 running Ruby 2.1 (Passenger Standalone)

因此新环境将利用 Ruby-2.2 版本。这很好,但是我真的必须淘汰我已经配置的 Ruby-2.1 版本来代替新创建的 Ruby-2.1 版本吗?来吧?

最佳答案

我通过使用 aws cli(不是 eb cli)找到了解决方案:

aws elasticbeanstalk update-environment --solution-stack-name "64bit Amazon Linux 2016.03 v2.1.0 running Ruby 2.3 (Puma)" --environment-name "dev-bg-123456" --region "us-east-1"

aws cli 可以用 homebrew 安装:

brew install awscli

关于ruby - AWS Elastic Beanstalk - 如何将现有环境从 Ruby 2.1 升级到 Ruby 2.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31120676/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com