A tool to watch autoscaling groups and dispatch tasks to handle the events from them.
Ruby
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib
stock_scripts
.gitignore
.ruby-version
.yardopts
Gemfile
LICENSE.txt
README.md
Rakefile
asger.gemspec

README.md

asger

asger is a tool designed to field notifications from Amazon EC2 auto-scaling groups via a SNS topic subscribed to an SQS queue. (Which probably sounds alarmingly specific, but it's the most common way to do this!) Once a notification is fielded, the user can define Tasks that then perform actions on instance creation ("up" functions) and termination ("down" functions), as well as their associated failure events.

Important Notes

  • When multiple tasks are running in a single asger instance, they will be run in order on instance creation and in reverse order on instance termination.

Contributors

asger was built primarily at Leaf by Ed Ropple (twitter).

Standalone

asger is designed primarily to be run as a daemon, accepting "tasks" in the form of Ruby files. Tasks are fairly simple; more documentation will be forthcoming.

Sample usage:

gem install asger
asger --queue-url 'https://sqs.us-east-1.amazonaws.com/ACCOUNT_ID/QUEUE_NAME' --shared-credentials=CREDS --parameter-file /tmp/some_params.yaml --task-file %/echo.rb --task-file %/chef_deregister.rb

(Note: % is a special path character when passed to --task-file; it refers to the stock_scripts directory within the gem, so you can get started right away with the stock scripts.)

Embedded

Add this line to your application's Gemfile:

gem 'asger'

And then execute:

bundle

Or install it yourself as:

gem install asger

Yardocs are available with yard, though they aren't complete. Nothing in asger is particularly complicated, though, so I recommend just taking a look at the source.

Contributing

  1. Fork it ( https://github.com/[my-github-username]/asger/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request