Giter Club home page Giter Club logo

aws-starter's Introduction

Automation tool for Amazon AWS

Join the chat at https://gitter.im/tuxofil/aws-starter

Purpose:

  • start one or more Amazon instances;
  • configure each started instance;
  • run some code, using access to the instances via SSH;
  • terminate the instances

Synopsis

To show usage help:

aws-starter -h

To start instances:

aws-starter [options] config_path

Positional arguments:

  • config_path - Path to configuration file.

Optional arguments:

  • -h, --help - Show this help message and exit.
  • -p, --pause - Wait until user press the ENTER key after the super script and before termination of the instances. In case of an error no pause will be made.
  • --pause-on-error - Wait until user press the ENTER key before termination of the instances when an error occurs.
  • --no-terminate - Do not terminate the instances after the work is done. The instances WILL be terminated when an error occurs.
  • --no-terminate-on-error - Do not terminate the instances after an error has been occured. This is useful to make able the user to investigate the problem on the instances.
  • --stop - do not start any instances. Read instance IDs from a local file, defined in a 'instance_ids_path' configuration option, terminate them all and exit. See description of 'instance_ids_path' configuration option for more details;
  • -v VERBOSITY, --verbosity VERBOSITY - Verbosity level. Default is "info". Possible values are: "debug", "info", "warning", "error", "critical".

Instance features

Each instance started with aws-starter have the following features:

  • instance_initiated_shutdown_behaviour option is set to terminate which means the instance will be terminated after a shutdown initiated within the instance (i.e. by poweroff command line tool);
  • a set of standard tags will be set, e.g.
    • Name - instance name defined in the aws-starter.cfg file;
    • StartedBy - effective user name and short hostname where the aws-starter tool was launched;
    • StarterProg - 'aws-starter';
    • StarterHost - uname -a string.

aws-starter's People

Contributors

gitter-badger avatar tuxofil avatar

Watchers

 avatar  avatar  avatar

aws-starter's Issues

Race condition during instance launch

How it looks:

2015-07-07 00:48:59 aws-starter I node1: launched i-44739b8d at us-west-2. Wait until it starts...
2015-07-07 00:49:04 boto E 400 Bad Request
2015-07-07 00:49:04 boto E <?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>InvalidInstanceID.NotFound</Code><Message>The instance ID 'i-44739b8d' does not exist</Message></Error></Errors><RequestID>aae8e674-5adc-4500-8bb4-cde6eff3e5b7</RequestID></Response>
2015-07-07 00:49:04 aws-starter E EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>InvalidInstanceID.NotFound</Code><Message>The instance ID 'i-44739b8d' does not exist</Message></Error></Errors><RequestID>aae8e674-5adc-4500-8bb4-cde6eff3e5b7</RequestID></Response>
Traceback (most recent call last):
  File "/usr/bin/aws-starter", line 82, in launch_catched
    launch(*args)
  File "/usr/bin/aws-starter", line 158, in launch
    if not wait_for_instance(instance, max_wait_time):
  File "/usr/bin/aws-starter", line 277, in wait_for_instance
    if instance.update() == 'running':
  File "/usr/lib/python2.7/dist-packages/boto/ec2/instance.py", line 413, in update
    rs = self.connection.get_all_reservations([self.id], dry_run=dry_run)
  File "/usr/lib/python2.7/dist-packages/boto/ec2/connection.py", line 682, in get_all_reservations
    [('item', Reservation)], verb='POST')
  File "/usr/lib/python2.7/dist-packages/boto/connection.py", line 1182, in get_list
    raise self.ResponseError(response.status, response.reason, body)
EC2ResponseError: EC2ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>InvalidInstanceID.NotFound</Code><Message>The instance ID 'i-44739b8d' does not exist</Message></Error></Errors><RequestID>aae8e674-5adc-4500-8bb4-cde6eff3e5b7</RequestID></Response>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.