• Stars
    star
    163
  • Rank 230,515 (Top 5 %)
  • Language
    Ruby
  • Created about 15 years ago
  • Updated over 14 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Launch ec2 instances, pronto

Tired of wrestling with server provisioning? Sumo!

Want to fire up a one-off EC2 instance, pronto? ec2-run-instances got you down? Try Sumo.

$ sumo launch
---> Launching instance...    i-4f809c26 (1.5s)
---> Acquiring hostname...    ec2-67-202-17-178.compute-1.amazonaws.com (26.7s)

Logging you in via ssh.  Type 'exit' or Ctrl-D to return to your local system.
------------------------------------------------------------------------------
Linux domU-12-31-39-04-31-37 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686
...
root@domU-12-31-39-04-31-37:~#

Later…

$ sumo terminate
ec2-67-202-17-178.compute-1.amazonaws.com scheduled for termination

You can manage multiple instances via “sumo list” and specifying hostname or instance id as arguments to the ssh or terminate commands.

Service installation with Chef

The launch command takes an argument, which is a server role (from roles/#{role}.json inside your cookbooks repo):

$ sumo launch redis
---> Launch instance...       i-b96c73d0 (1.3s)
---> Acquire hostname...      ec2-75-101-191-220.compute-1.amazonaws.com (36.1s)
---> Wait for ssh...          done (9.0s)
---> Bootstrap chef...        done (61.3s)
---> Setup redis...           done (11.9s)
---> Opening firewall...      ports 6379 (5.2s)

Your instance is exporting the following resources:
  Redis: redis://:[email protected]:6379/0

The instance can assume multiple roles if you like:

$ sumo launch redis,solr,couchdb

Setup

Dependencies:

$ sudo gem install amazon-ec2 thor

Then create ~/.sumo/config.yml containing:

---
access_id: <your amazon access key id>
access_secret: <your amazon secret access key>

Optional config you can include any of the following in your config.yml:

user: root
ami: ami-ed46a784
 availability_zone: us-east-1b
cookbooks_url: git://github.com/adamwiggins/chef-cookbooks.git

You’ll need Bacon and Mocha if you want to run the specs, and Jewler if you want to create gems.

Managing volumes

Create and attach a volume to your running instance:

$ sumo create_volume
---> Create 5MB volume...     vol-8a9c6ae3 (1.1s)
$ sumo volumes
vol-8a9c6ae3    5MB  available
$ sumo attach
---> Attach vol-8a9c6ae3 to i-bc32cbd4 as /dev/sdc1... done (0.6s)

Log in to format and mount the volume:

$ sumo ssh
root@ip-10-251-122-175:~# mkfs.ext3 /dev/sdc1
mke2fs 1.41.4 (27-Jan-2009)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
...
$ mkdir /myvol
$ mount /dev/sdc1 /myvol
$ echo "I'm going to persist to a volume" > /myvol/hello.txt

To detach from a running instance (perhaps so you can attach elsewhere):

$ sumo detatch
---> Detach vol-8a9c6ae3...   done (0.6s)

Destroy it if you no longer want the data stored on it:

$ sumo destroy_volume
---> Destroy volume...        done (0.8s)

Some details you might want to know

Sumo creates its own keypair named sumo, which is stored in ~/.ssh/keypair.pem. Amazon doesn’t let you upload your own ssh public key, which is lame, so this is the best option for making the launch-and-connect process a single step.

It will also create an Amazon security group called sumo, so that it can lower the firewall for services you configure via cookbook roles.

If you run any production machines from your EC2 account, I recommend setting up a separate account for use with Sumo. It does not prompt for confirmation when terminating an instance or differentiate between instances started by it vs. instances started by other tools.

Anti-features

Sumo is not a cloud management tool, a monitor tool, or anything more than a way to get an instance up right quick. If you’re looking for a way to manage a cluster of production instances, try one of these fine tools.

  • Pool Party

  • RightScale

  • Engine Yard Cloud

  • Cloudkick

Meta

Created by Adam Wiggins

Patches contributed by Orion Henry, Blake Mizerany, Jesse Newland, Gert Goet, and Tim Lossen

Released under the MIT License: www.opensource.org/licenses/mit-license.php

github.com/adamwiggins/sumo

More Repositories

1

clockwork

A scheduler process to replace cron
Ruby
659
star
2

rush

Ruby replacement for bash+ssh
Ruby
517
star
3

rest-client

Simple REST client for Ruby, inspired by microframework syntax for specifying actions. Official fork is now at:
Ruby
480
star
4

scanty

The blog that's almost nothing
Ruby
430
star
5

12factor

Official fork now at: https://github.com/heroku/12factor
Ruby
403
star
6

pony

The official fork is now maintained by benprew in http://github.com/benprew/pony
Ruby
233
star
7

yaml_db

Rails plugin for a database-independent dump format, data.yml. This fork no longer maintained, please see:
Ruby
219
star
8

stalker

A minimalist queueing DSL for Beanstalk.
Ruby
166
star
9

rifgraf

Fire-and-forget data collection and graphing service
JavaScript
141
star
10

clockwork-sinatra-beanstalk

A sample app using Clockwork with a Sinatra/Beanstalk app to fetch market prices periodically
Ruby
46
star
11

lua-pong

Very simple example of a game engine written in C and game logic written in Lua.
C
38
star
12

qfeedreader

A web-based feed reader, comparing queueing with Delayed::Job, Minion, and Stalker
Ruby
38
star
13

gmail_smtp

rails plugin to send email via gmail smtp
Ruby
35
star
14

scanty-redis

The blog that's almost nothing - now on Redis
Ruby
31
star
15

bitswiki

A sweet wiki written in Rails.
Ruby
31
star
16

clockwork-rails-dj

A sample app using Clockwork with a Rails/DJ app to fetch market prices periodically
Ruby
28
star
17

heroku-client

This fork is not maintained, please see: http://github.com/heroku/heroku
Ruby
25
star
18

cachemanifest

simple example of an html5 cache manifest, deployable to heroku
Ruby
22
star
19

nginx-as-heroku-app

Runing Nginx as a Heroku app with the C buildpack
C
15
star
20

example-nested-resources

An example of nested resources in Rails 2
14
star
21

peruse

Ruby
11
star
22

cocos2d

Python 2D game library, unofficial import from svn
Python
11
star
23

wordpress-cleardb

Wordpress on Heroku, using the ClearDB MySQL add-on free plan.
PHP
10
star
24

postgres-app

C
9
star
25

chef-cookbooks

Ruby
8
star
26

sigterm

Demonstration of graceful shutdown on SIGTERM
Ruby
7
star
27

erowid-mobile

Mobile site prototype for erowid.org
Ruby
7
star
28

sampleapp-sms

JavaScript
6
star
29

s5

S3 slide show
Ruby
6
star
30

merb-on-heroku

Blank Merb app with tweaks for Heroku deployment
Ruby
5
star
31

rack-maintenance

Ruby
5
star
32

ramaze-on-heroku

Ruby
4
star
33

qfeedreader-minion

Ruby
3
star
34

whatswrong

Ruby
3
star
35

redx-dashboard

Example dashboard which consumes event stream from redx-backend
JavaScript
3
star
36

queuedist

Ruby
3
star
37

blendproof

Python
3
star
38

heroku_suspenders

thoughtbot's Suspenders modified for Heroku.
Ruby
3
star
39

redx-backend

Example of Redis backend which forwards events vis https
JavaScript
3
star
40

heroku-branch-app

Heroku client plugin that picks app to use based on branch == remote
Ruby
2
star
41

tinkerdb

Ruby
2
star
42

wedgeguard

Rack middleware for request timeouts
Ruby
2
star
43

hello-node

JavaScript
2
star
44

trydjango

Python
2
star
45

heroku-releases

Ruby
2
star
46

hoptoad_notifier

Reports exceptions to Hoptoad
Ruby
2
star
47

hello-world

JavaScript
1
star
48

cacheit

Ruby
1
star
49

app-with-bundler-0.8-bundled

Ruby
1
star
50

ey-cloud-recipes

A starter repo for custom chef recipes on EY's cloud platform
Ruby
1
star
51

rails31-asset-sync

Ruby
1
star
52

lang-test-case

1
star
53

lumberjack

Ruby
1
star
54

assetbench

Ruby
1
star
55

logarchive

Ruby
1
star
56

psmanage

Ruby
1
star
57

churner

Ruby
1
star
58

nav-ruby19

Ruby
1
star
59

memcache-auth-test

Ruby
1
star
60

sampletest

1
star
61

heroku-devclouds

Ruby
1
star