diff --git a/infra-templates/aws-spot-instance-helper/1/README.md b/infra-templates/aws-spot-instance-helper/1/README.md new file mode 100644 index 0000000..8451599 --- /dev/null +++ b/infra-templates/aws-spot-instance-helper/1/README.md @@ -0,0 +1,9 @@ +# AWS Spot Instance Helper + +### Info +This is a simple service that runs globally. It monitors the state of the host, if the host is running on a spot instance it will check to see if the host is scheduled for termination then it will automatically deactive the host and evaculate the containers. + +The source code is available at [https://www.github.com/chrisurwin/aws-spot-instance-helper](https://www.github.com/chrisurwin/aws-spot-instance-helper) + +This version support notification to slack. + diff --git a/infra-templates/aws-spot-instance-helper/1/docker-compose.yml b/infra-templates/aws-spot-instance-helper/1/docker-compose.yml new file mode 100644 index 0000000..b84671c --- /dev/null +++ b/infra-templates/aws-spot-instance-helper/1/docker-compose.yml @@ -0,0 +1,10 @@ +aws-spot-instance-helper: + image: chrisurwin/aws-spot-instance-helper:v0.2.0 + tty: true + labels: + io.rancher.container.create_agent: 'true' + io.rancher.container.agent.role: environment + io.rancher.container.pull_image: always + io.rancher.scheduler.global: 'true' + environment: + SLACK_WEBHOOK: "${SLACK_WEBHOOK}" \ No newline at end of file diff --git a/infra-templates/aws-spot-instance-helper/1/rancher-compose.yml b/infra-templates/aws-spot-instance-helper/1/rancher-compose.yml new file mode 100644 index 0000000..044feb9 --- /dev/null +++ b/infra-templates/aws-spot-instance-helper/1/rancher-compose.yml @@ -0,0 +1,21 @@ +.catalog: + name: "AWS Spot Instance Helper" + version: "v0.2.0" + description: "AWS Spot Instance Helper" + minimum_rancher_version: v1.5.5 + questions: + - variable: "SLACK_WEBHOOK" + description: "Slack Webhook" + label: "Slack Webhook" + required: false + type: "string" + +aws-spot-instance-helper: + health_check: + port: 9777 + interval: 2000 + unhealthy_threshold: 3 + strategy: recreate + response_timeout: 2000 + request_line: GET /ping HTTP/1.0 + healthy_threshold: 2 \ No newline at end of file diff --git a/infra-templates/aws-spot-instance-helper/config.yml b/infra-templates/aws-spot-instance-helper/config.yml index 1457c2a..f010504 100644 --- a/infra-templates/aws-spot-instance-helper/config.yml +++ b/infra-templates/aws-spot-instance-helper/config.yml @@ -1,5 +1,5 @@ name: AWS Spot Instance Helper description: | Automatically evacuates spot instances that are marked for termination -version: v0.1.0 +version: v0.2.0 category: Rancher Services \ No newline at end of file