Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 729
Dan Avatar asked Jun 29 '15 16:06

Dan


People also ask

What two types of environments can be created when using Elastic Beanstalk?

In AWS Elastic Beanstalk, you can create a load-balanced, scalable environment or a single-instance environment. The type of environment that you require depends on the application that you deploy.

What is AWS Elastic Beanstalk for Ruby?

AWS Elastic Beanstalk for Ruby makes it easy to deploy, manage, and scale your Ruby web applications using Amazon Web Services. Elastic Beanstalk is available to anyone developing or hosting a web application using Ruby.

How do I update my Elastic Beanstalk platform version?

You can use the Elastic Beanstalk console or the EB CLI to update your environment's platform version. Depending on the platform version you'd like to update to, Elastic Beanstalk recommends one of two methods for performing platform updates. Method 1 – Update your environment's platform version.

How do I update or Delete my AWS Elastic Beanstalk application?

You have successfully updated your AWS Elastic Beanstalk application. a. To delete your application (and stop using the AWS resources associated with your application), access your Elastic Beanstalk application dashboard, click on Actions in the top right-hand corner, then select Terminate Environment. b.

Who can use addelastic Beanstalk?

Elastic Beanstalk is available to anyone developing or hosting a web application using Ruby.


1 Answers

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 
like image 53
Ralph von der Heyden Avatar answered Sep 30 '22 03:09

Ralph von der Heyden