diff --git a/templates/autospotting/0/README.md b/infra-templates/autospotting/0/README.md similarity index 100% rename from templates/autospotting/0/README.md rename to infra-templates/autospotting/0/README.md diff --git a/templates/autospotting/0/docker-compose.yml b/infra-templates/autospotting/0/docker-compose.yml similarity index 100% rename from templates/autospotting/0/docker-compose.yml rename to infra-templates/autospotting/0/docker-compose.yml diff --git a/templates/autospotting/0/rancher-compose.yml b/infra-templates/autospotting/0/rancher-compose.yml similarity index 100% rename from templates/autospotting/0/rancher-compose.yml rename to infra-templates/autospotting/0/rancher-compose.yml diff --git a/templates/autospotting/catalogIcon-autospotting.svg b/infra-templates/autospotting/catalogIcon-auttospotting.svg similarity index 100% rename from templates/autospotting/catalogIcon-autospotting.svg rename to infra-templates/autospotting/catalogIcon-auttospotting.svg diff --git a/templates/autospotting/config.yml b/infra-templates/autospotting/config.yml similarity index 100% rename from templates/autospotting/config.yml rename to infra-templates/autospotting/config.yml diff --git a/infra-templates/aws-spot-instance-helper/0/README.md b/infra-templates/aws-spot-instance-helper/0/README.md new file mode 100644 index 0000000..36f22f1 --- /dev/null +++ b/infra-templates/aws-spot-instance-helper/0/README.md @@ -0,0 +1,7 @@ +# 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) + diff --git a/infra-templates/aws-spot-instance-helper/0/docker-compose.yml b/infra-templates/aws-spot-instance-helper/0/docker-compose.yml new file mode 100644 index 0000000..d88c501 --- /dev/null +++ b/infra-templates/aws-spot-instance-helper/0/docker-compose.yml @@ -0,0 +1,8 @@ +aws-spot-instance-helper: + image: chrisurwin/aws-spot-instance-helper:v0.1.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' \ No newline at end of file diff --git a/infra-templates/aws-spot-instance-helper/0/rancher-compose.yml b/infra-templates/aws-spot-instance-helper/0/rancher-compose.yml new file mode 100644 index 0000000..a98b942 --- /dev/null +++ b/infra-templates/aws-spot-instance-helper/0/rancher-compose.yml @@ -0,0 +1,16 @@ +.catalog: + name: "AWS Spot Instance Helper" + version: "v0.1.0" + description: "AWS Spot Instance Helper" + minimum_rancher_version: v1.5.5 + + +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/catalogIcon-rahc.svg b/infra-templates/aws-spot-instance-helper/catalogIcon-rahc.svg new file mode 100644 index 0000000..b585445 --- /dev/null +++ b/infra-templates/aws-spot-instance-helper/catalogIcon-rahc.svg @@ -0,0 +1,25 @@ + + + + + + + + diff --git a/infra-templates/aws-spot-instance-helper/config.yml b/infra-templates/aws-spot-instance-helper/config.yml new file mode 100644 index 0000000..1457c2a --- /dev/null +++ b/infra-templates/aws-spot-instance-helper/config.yml @@ -0,0 +1,5 @@ +name: AWS Spot Instance Helper +description: | + Automatically evacuates spot instances that are marked for termination +version: v0.1.0 +category: Rancher Services \ No newline at end of file