rubyamazon-elastic-beanstalkruby-2.1ruby-2.2

AWS Elastic Beanstalk - How To Upgrade Existing Environment from Ruby 2.1 to Ruby 2.2


AWS Elastic Beanstalk - Cannot Clone With Latest Platform or eb upgrade from Ruby 2.1 to 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?

Extra Information

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.

It appears that all I can do to get to the latest Ruby-2.2 instances is to create a brand new environment from scratch. That's tremendously annoying.

So here's what I've tried...

$ 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

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)

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?


Solution

  • 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"
    

    The aws cli can be installed with homebrew:

    brew install awscli