Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

AndreyMarchuk
Copy link
Contributor

Issue #365

@cplee
Copy link
Contributor

cplee commented Oct 24, 2018

@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
Copy link
Contributor Author

AndreyMarchuk commented Oct 25, 2018

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
Copy link
Contributor Author

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

@cplee
Copy link
Contributor

cplee commented Oct 25, 2018

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
Copy link
Contributor Author

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
Copy link
Contributor

cplee commented Oct 25, 2018

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

02_configure_cloudwatch_agent:
command: !Sub |
#!/bin/bash
sudo yum install -y https://s3.amazonaws.com/amazoncloudwatch-agent/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new CW agent is known to have issues with auto rotation of logs. Have you tested that ? The advantage of using the new unified agent is that it provides metrics and logging in one POST request, but are those metrics being used? It will just incur more cost in case it is left enabled without actually consuming them for alarms or monitoring.

Copy link
Contributor

@cplee cplee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you remove all the # commented out code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants