stelligent / mu

A full-stack DevOps on AWS framework
https://getmu.io
MIT License
973 stars 135 forks source link

Issue-365: Use amazon linux 2 AMI for ECS (if none specified) #377

Open AndreyMarchuk opened 5 years ago

AndreyMarchuk commented 5 years ago

Issue https://github.com/stelligent/mu/issues/365

cplee commented 5 years ago

@AndreyMarchuk sorry for the lazy question...have you tested this? Curious how much testing i need to do.

I had assumed there would be work to update the UserData and CloudFormation::Init data in the template, but happy if this is all that was needed!

AndreyMarchuk commented 5 years ago

While testing and checking awslogs stumbled upon new recommended CloudWatch agent: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_GettingStarted.html

Pushed commit which includes new CloudWatch agent.

I've tested on existing environment which used amazon linux (v1) by running mu env up dev One thing I've noticed while testing is that sometimes Public IP is not assigned to instance and it fails to initialize in such case. Killing instance via ec2 console usually brings up another one with Public IP, seems random.

AndreyMarchuk commented 5 years ago

I don't think it's safe to merge without additional testing.

cplee commented 5 years ago

Awesome, i'll check it out. This looks great. One thought for you on the Public IP problem...are you allowing mu to manage the VPC or are you using a VPC target? If you are using a VPC target, then check if all the subnets you listed have Auto-assign public IPv4 address enabled.

AndreyMarchuk commented 5 years ago

Great pointer re: target subnets, indeed there was one with disabled IP auto-assign. On another note, new CloudWatch agent does not support %f (millisec) in timestamp. It was used for docker logs and now the parsed timestamp would not include millisecs.

cplee commented 5 years ago

RE: CloudWatch agent does not support %f (millisec) in timestamp...i'm fine if we lose millisecond in parsed timestamp.