Skip to content

leadhub-code/spot-runner

Repository files navigation

Spot runner

CircleCI

Run stuff on AWS spot instances easily.

Usage

$ pip install https://github.com/leadhub-code/spot-runner/archive/master.zip
# Modify the blueprint file so it contains your KeyName and SecurityGroupIds:
$ vim examples/hello/blueprint.yaml 
$ spot-runner -v run_spot_instance --blueprint examples/hello/blueprint.yaml

Do not forget to terminate the instance :)

Screenshot

screenshot

The Blueprint file

spot_runner_blueprint:
    region: eu-west-1
    ami_owner_id_whitelist: ['379101102735']
    task_id_template: hello-{date}-{fqdn}
    spot_price: '1.50'
    upload:
        - setup.sh
    upload_preprocessed:
        - sample_conf.yaml
    remote_command: ['bash', 'uploaded/setup.sh']
    launch_specification:
        ImageId: ami-ce76a7b7
        KeyName: your-keyname-here
        SecurityGroupIds:
          - sg-123
        InstanceType: m4.large

Links

This Spot Runner is specialized on management and setup of EC2 instances. For general AWS resource management we recommend Terraform.

Leadhub Opensource

About

Script for automation of running stuff on AWS spot instances

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published