aws-samples / ecs-refarch-cloudformation

A reference architecture for deploying containerized microservices with Amazon ECS and AWS CloudFormation (YAML)
Apache License 2.0
1.69k stars 1.32k forks source link

Migrate to Amazon Linux 2 AMI #97

Open rania-chantz opened 5 years ago

rania-chantz commented 5 years ago

The use of the recommended ECS-Optimized AMIs is great, let's migrate it though to use the Amazon Linux 2 ones.

mrichman commented 5 years ago

What problem would migrating to Amazon Linux 2 solve for you?

rania-chantz commented 5 years ago

None actually. But according to this https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/amazon-linux-ami-basics.html

If you are migrating from another Linux distribution to Amazon Linux, we recommend that you migrate to Amazon Linux 2. If you are currently using the Amazon Linux AMI, we recommend that you migrate to Amazon Linux 2.

othercorey commented 5 years ago

There isn't support for sysvinit in Linux 2 so some of the LaunchConfiguration in ecs-cluster.yaml isn't supported if you switch to a Linux 2 AMI.

waynerobinson commented 5 years ago

I would also like to see this updated. I'd be happy to help and thought that by changing to the ECS-optimised Amazon Linux 2 AMIs that I'd at least get some useful error messages from this architecture to start debugging from, but the instances don't start at all and show no logs anywhere.

tfentonz commented 5 years ago

This will need updating at some point. From Amazon ECS Developer Guide

Amazon ECS-optimized Amazon Linux AMI – This AMI is based off of Amazon Linux 1. We recommend that you migrate your workloads to the Amazon ECS-optimized Amazon Linux 2 AMI. Support for the Amazon ECS-optimized Amazon Linux AMI ends no later than June 30, 2020.

But no rush 😁

briancaffey commented 5 years ago

Are there any plans to update this? I would like to use Amazon Linux 2 in a CloudFormation stack that I have adapted from this reference architecture. Has anyone successfully updated?

lodotek commented 5 years ago

bump

gabegorelick commented 4 years ago

I hate to pile on, but if the Amazon Linux AMI really won't be supported soon, then we really need the reference architecture to document how to use Amazon Linux 2 well before then.

krugermil commented 4 years ago

bump ;)

pgiu commented 4 years ago

How should we change the script to use Amazon Linux 2?

bs-thomas commented 3 years ago

I'm also wondering about this.

briancaffey commented 3 years ago

I have started using CDK instead of using CloudFormation directly. This CDK reference project uses Amazon Linux 2: https://github.com/aws-samples/aws-cdk-examples/blob/master/python/ecs/cluster/app.py#L22, hopefully this can be useful for anyone who needs to switch to Amazon Linux 2.