AWS Elastic Beanstalk-如何将现有环境从Ruby 2.1升级到Ruby 2.2 [英] AWS Elastic Beanstalk - How To Upgrade Existing Environment from Ruby 2.1 to Ruby 2.2

查看:90
本文介绍了AWS Elastic Beanstalk-如何将现有环境从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.看来我必须完全重新创建它们...这看起来很愚蠢吗?还有其他人遇到这种情况吗?我只是想念一些简单的东西吗?

I've been smashing my head on this one. Back in May, AWS announced that their Ruby Elastic Environments now offer Ruby-2.2 (e.g. ruby-2.2-(passenger-standalone) or ruby-2.2-(puma)). I can't upgrade my existing ruby-2.1 environments to ruby-2.2. It appears I have to recreate them completely...that seems silly? Anyone else out there experiencing this? Am I just missing something simple?

在我的 staging production 环境中,我已经愉快地使用ruby-2.1-(passenger-standalone)了几个月.现在,我想将它们升级到最新的ruby-2.2平台. AWS文档说这很简单,实际上它们的某些文档甚至表明可以使用eb clone <env-name> --update.该标志在我正在使用的EB CLI 3.4.5中不存在:(另外,Web控制台具有 Clone with Latest Platform 选项菜单项,但已被禁用.

I've been gleefully using ruby-2.1-(passenger-standalone) for several months in my staging and production environments. Now I'd like to upgrade them to the latest ruby-2.2 platform. The AWS documentation says this is pretty trivial, in fact some of their documentation even appear to state that you can use an eb clone <env-name> --update. That flag doesn't exist in the EB CLI 3.4.5 that I'm using :( Additionally, the web console has a Clone with Latest Platform option menu item, yet it is disabled.

看来,要获得最新的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.因此,让我们尝试升级:

Great, confirms I'm using Ruby 2.1. So let's try to upgrade:

$ eb upgrade
Environment already on most recent platform version.

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

Okay, that's nice, so what about the platform itself:

$ 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

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

So now, here's my platform settings:

$ 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版本?来吧?

So New environments will take advantage of the Ruby-2.2 editions. That's great, but do I seriously have to retire my already configured Ruby-2.1 editions in lieu of a newly created Ruby-2.1 edition? Come on?

推荐答案

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

I found a solution for this, by using the aws cli (NOT the 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可以通过自制软件安装:

The aws cli can be installed with homebrew:

brew install awscli

这篇关于AWS Elastic Beanstalk-如何将现有环境从Ruby 2.1升级到Ruby 2.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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