NOTE: This repo contains only the documentation for the private BoltsOps Pro repo code. Original file: https://github.com/boltopspro/ecs-spot-termination/blob/master/README.md The docs are publish so they are available for interested customers. For access to the source code, you must be a paying BoltOps Pro subscriber. If are interested, you can contact us at contact@boltops.com or https://www.boltops.com
This configset installs a spot termination script that will continuously run and monitor for the spot two-minute warning. Upon seeing the two-minute warning, it will drain the instance from the ECS Cluster.
Lono configsets allow CloudFormation cfn-init configsets that are typically embedded in the template to be reusable. More info: Lono Configsets docs.
Add to project Gemfile:
git "ecs-spot-termination", git: "git@github.com:boltopspro/ecs-spot-termination"
Use configset
to enable the configset for the blueprint. Example:
configs/demo/configsets/base.rb:
configset("ecs-spot-termination", resource: "SpotFleet")
This adds the configset to the resource
with the logical id SpotFleet
in your CloudFormation template. The configset is added to the Resources["SpotFleet"].Metadata.AWS::CloudFormation::Init attribute of the SpotFleet
resource. You can confirm that it'll be used with the lono configsets BLUEPRINT command.
lono configsets demo