Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Polls Docker Cloud and EC2 for unreachable/terminated nodes and cleans them up.

Notifications You must be signed in to change notification settings

timehop/docker-cloud-terminator

Repository files navigation

Docker Cloud Terminator

What

This repo provides a Docker Cloud stack that helps manage the lifecycle of "Bring Your Own Host" nodes. Specifically, it keeps the state of an EC2 instance in sync with its representation as a node on Docker Cloud.

In other words, when a node become "Unreachable", this service terminates both it and the EC2 instance it represents. Likewise, if an EC2 instances shuts down, this service terminates the node on Docker Cloud.

Deploy to Docker Cloud

The "Deploy to Cloud" button above may be used to quickly get up and running. Refer to the comments in docker-cloud.yml for configuration details.

Prerequisites

This service expects EC2 instances to be tagged with UUID. To deploy BYOH nodes with this tag, we use docker-cloud-startup.

Note: Docker tags c5a1ec7 and prior search for tags of Docker-Cloud-UUID.

Why

When using BYOH nodes, Docker Cloud has no system for inspecting and terminating nodes that become "Unreachable". This is a solution for that problem.

AWS Credentials

The AWS credentials you configure the service with will need to have s3 write access to the bucket you configure, as well as access for creating CloudFormation stacks. Here is a sample policy you may use. Replace ${S3_BUCKET} with the configured bucket name:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "ec2:DescribeInstances",
        "ec2:TerminateInstances"
      ],
      "Resource": "*"
    }
  ]
}

About

Polls Docker Cloud and EC2 for unreachable/terminated nodes and cleans them up.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages