🙈 A first try to curate Auto Scaling with CoreOS in AWS.
We will curate many things in the months to come, but right now, there are these things.
- etcd
- EC2 Peers
We curate the etcd cluster members, but removing members that are unreachable, because related AutoScaling instances have vanished.
Please, keep in mind the (N+1)/2 limit of scaling members of an etcd cluster
Setting up the needed deps and restore the relevant dependencies.
make deps && make restore
Build the project and see view the produced binaries.
make build && ls -l ./bin
There is also a
Dockerfile
included, which allows to runkombinat
in a container with Supervisord
The docker has to be on the host net
docker run --rm --network host -d pixelmilk/kombinat
We may mention the ec2-metadata project, which allows to test the Instance Metadata and User Data Service 😁
Beside the need to access the to Instance Metadata and User Data Service we need an IAM Role with the following IAM Policy for the EC2 Instances in the AutoScaling Groups.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "ec2:Describe*",
"Resource": "*"
},
{
"Effect": "Allow",
"Action": "elasticloadbalancing:Describe*",
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"cloudwatch:ListMetrics",
"cloudwatch:GetMetricStatistics",
"cloudwatch:Describe*"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": "autoscaling:Describe*",
"Resource": "*"
}
]
}
This policy allows to read the state of the AutoScaling Groups and the related EC2 instances.