Added autospotting catalog entry (#601)
This commit is contained in:
parent
13b75d349e
commit
400c9d4ada
11
templates/autospotting/0/README.md
Normal file
11
templates/autospotting/0/README.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Autospotting
|
||||||
|
|
||||||
|
### Info
|
||||||
|
This service builds upon the open source autospotting at [https://github.com/cristim/autospotting](https://github.com/cristim/autospotting)
|
||||||
|
|
||||||
|
This has been turned into a Rancher catalog entry with a couple of minor tweaks and the removal of the requirement to run it as a lambda function, it now runs as a docker container.
|
||||||
|
|
||||||
|
Autospotting works by taking a tag that you specify and adding it to an AWS Auto-Scaling Group with a value of true.
|
||||||
|
|
||||||
|
The container will then run and check for on-demand instances and replace them with cheap spot instances. This is a gradual process and will only replace one host in an ASG at a time.
|
||||||
|
|
13
templates/autospotting/0/docker-compose.yml
Normal file
13
templates/autospotting/0/docker-compose.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
aws-spot-instance-helper:
|
||||||
|
image: chrisurwin/autospotting:v0.1.0
|
||||||
|
tty: true
|
||||||
|
labels:
|
||||||
|
io.rancher.container.pull_image: always
|
||||||
|
environment:
|
||||||
|
AWS_ACCESS_KEY_ID: "${AWS_ACCESS_KEY_ID}"
|
||||||
|
AWS_SECRET_ACCESS_KEY: "${AWS_SECRET_ACCESS_KEY}"
|
||||||
|
regions: "${regions}"
|
||||||
|
min_on_demand_number: "${min_on_demand_number}"
|
||||||
|
min_on_demand_percentage: "${min_on_demand_percentage}"
|
||||||
|
allowed_instance_types: "${allowed_instance_types}"
|
||||||
|
tag_name: "${tag_name}"
|
51
templates/autospotting/0/rancher-compose.yml
Normal file
51
templates/autospotting/0/rancher-compose.yml
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
.catalog:
|
||||||
|
name: "Autospotting"
|
||||||
|
version: "v0.1.0"
|
||||||
|
description: "Autospotting"
|
||||||
|
minimum_rancher_version: v1.0.0
|
||||||
|
questions:
|
||||||
|
- variable: "AWS_ACCESS_KEY_ID"
|
||||||
|
description: "AWS Access Key"
|
||||||
|
label: "AWS Access Key"
|
||||||
|
required: true
|
||||||
|
type: "string"
|
||||||
|
- variable: "AWS_SECRET_ACCESS_KEY"
|
||||||
|
description: "AWS Secret Key"
|
||||||
|
label: "Access Secret"
|
||||||
|
required: true
|
||||||
|
type: "string"
|
||||||
|
- variable: "regions"
|
||||||
|
description: "Regions where it should be activated (comma or whitespace separated list, also supports globs), by default it runs on all regions. Example: 'eu-*,us-east-1"
|
||||||
|
label: "AWS Regions"
|
||||||
|
required: false
|
||||||
|
type: "string"
|
||||||
|
- variable: "min_on_demand_number"
|
||||||
|
description: "On-demand capacity (as absolute number) ensured to be running in each of your groups"
|
||||||
|
label: "Minimum on demand number"
|
||||||
|
required: false
|
||||||
|
type: "string"
|
||||||
|
- variable: "min_on_demand_percentage"
|
||||||
|
description: "On-demand capacity (percentage of the total number of instances in the group) ensured to be running in each of your groups. Defaults to 0"
|
||||||
|
label: "Minimum on demand percentage"
|
||||||
|
required: false
|
||||||
|
type: "string"
|
||||||
|
- variable: "allowed_instance_types"
|
||||||
|
description: "If specified, the spot instances will have a specific instance type"
|
||||||
|
label: "Allowed instance types"
|
||||||
|
required: false
|
||||||
|
type: "string"
|
||||||
|
- variable: "tag_name"
|
||||||
|
description: "If specified you can tag instances with a specific tag to process, default is spot-enabled"
|
||||||
|
label: "Tag name"
|
||||||
|
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
|
1
templates/autospotting/catalogIcon-autospotting.svg
Normal file
1
templates/autospotting/catalogIcon-autospotting.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 29 KiB |
5
templates/autospotting/config.yml
Normal file
5
templates/autospotting/config.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
name: AutoSpotting
|
||||||
|
description: |
|
||||||
|
Replaces AWS On-Demand instances with cheaper Spot-Instances where possible
|
||||||
|
version: v0.1.0
|
||||||
|
category: Infrastructure Services
|
Loading…
x
Reference in New Issue
Block a user