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

后端 未结 3 882
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-13 06:23

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. B

3条回答
  •  抹茶落季
    2020-12-13 07:10

    I found a different approach to this problem.

    The way I made it work is similar to the comment above but I managed to update the existing beanstalk environment and not deploy code to a completely new one.

    Steps I did:

    1. Launched a completely new environment on beanstalk running the ruby version that I need, 2.3 (in my case I needed an update from Ruby 2.2 to Ruby 2.3)
    2. SSH-ed into the new instance and installed all dependencies that my application needs (packages, dev tools etc.) - you can also do these in the .ebextensions directory
    3. Created a custom AMI from the instance running ruby 2.3 with everything installed
    4. Used the same command that Ralph posted but with some tweeks:
    aws elasticbeanstalk update-environment --region "REGION" --environment-name "ENV_NAME" --solution-stack-name "64bit Amazon Linux 2018.03 v2.8.1 running Ruby 2.3 (Puma)" --option-settings Namespace=aws:autoscaling:launchconfiguration,OptionName=ImageId,Value="ami- 
    xxxxxxxx"

    The AMI option-settings was key for me, as this helped me the AMI with ruby 2.3.7 installed to be used for launching the new instance on the existing environment. Previously just hitting Ralph's suggested command failed on every try.

提交回复
热议问题