Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Launch ec2 instances, pronto
Ruby
Branch: master
Pull request Compare This branch is 110 commits ahead of adamwiggins:master.

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
cookbooks
lib
roles
spec
.gitignore
README.rdoc
Rakefile
VERSION
config.json

README.rdoc

Tired of wrestling with server provisioning?[*] Sumo!

* Currently only Ubuntu on EC2 is implemented.

Sumo's focus is on launching and working with one cloud computing node/instance.

Configure multiple Chef roles (ooh, aah, wow) defined in multiple Chef (version 0.8) repositories (mine, yours, local (Sumo's)). Example:

$ sumo launch mine:ooh,yours:aah,wow

Sumo comes packaged with ony one Chef recipe - openvpn. For those unfortunate to have a “big-brother” snooping, the following should just-work:

$ sumo launch openvpn --access_key_id: <aws_id> --access_secret_key: <aws_key>

# TODO Then what do you do if you are on linux, Mac, Windows?

You can manage multiple instances via by running sumo multiple times. Please log reproducible bugs in the github TODO {issue tracker}[url]

Features

Commands

# TODO sumo help

# TODO Instance management commands

sumo launch [ --config </path/config.json> ]
sumo terminate [ <fqdn> | <instance_id> ]
sumo role [ <instance_id> ] [ role_a,role_b,... ]

# TODO Storage management commands

sumo attach
sumo create
sumo delete
sumo detach

# TODO Network management commands

sumo network <dns>,<ip>,<hostname>
sumo hostname <fqdn-text> 
sumo ip <ipv4-address> 
sumo dns <dns-ipv4 | dns-fqdn>,...

# TODO Interaction commands

sumo shell [ <fqdn> | <instance_id> ]

# TODO Reporting commands

sumo describe [ all | [ volumes, instances, network ] ]
sumo log [ all | [ volumes, instances, network ] ]

Default Chef repositories

~/.sumo/cookbook git://github.com/opscode/cookbooks.git git://github.com/37signals/37s_cookbooks.git

Additional default repositories can be added to ~/.sumo/config.yaml

Example:

myrepo: git://github.com/myaccount/mycookbook.git

A role, say ubeauty, from this repository is passed to Sumo as:

sumo launch myrepo:ubeauty

If instead you had added the ubeauty Chef recipe to ~/.sumo/cookbooks:

sumo launch ubeauty

Setup

User

You should install from Github until the 1.0 release.

sudo gem install adamwiggins-sumo --source http://gems.github.com

# TODO $ sudo gem install sumo –source=gemcutter.org

Or

# TODO $ sudo rip install sumo

Dependencies:


* amazon-ec2
* thor

Sumo Configuration:

Amazon Web Services

$ rake sumo:config:aws  # default vendor

Edit generated defaults in, ~/.sumo/config_aws.yml:

---
os_vendor: ubuntu | ...                                          # TODO required
access_key_id: <access_key_id>                                   # required
access_secret_key: <secret_access_key>                           # required
launch_count: 1                                                  # TODO default
ami: ami-ed46a784                                                # default
user: root                                                       # default
availability_zone: us-east-1b                                    # default
file: "~/.sumo/cookbook"                                         # TODO default
37s: git://github.com/37signals/37s-cookbooks.git                # TODO default
opscode: git://github.com/opscode/cookbooks.git                  # TODO default
enable_submodules: true                                          # TODO redundant if we can access multiple Chef repos
private_chef_repo: true                                          # TODO redundant if we fall back to private connection once public fails

Developer

# TODO $ sudo gem install sumo –source=gemcutter.org Or # TODO $ sudo rip install sumo

Dependencies:


* amazon-ec2
* thor
* rr
* diff-lcs

# TODO Package Manager Agnostic:

sudo gem install
sudo rip
sudo gem bundler

# TODO Load Path Manager Agnostic:

Details

Chef Features

AWS Features

Implemented operating system vendor values (case insensitive):

* Until the 1.0 release, see this {listing}[wiki_url_here].

Implemented AMI values

* Until the 1.0 release, see this {listing}[wiki_url_here].

Sumo creates its own keypair named sumo, which is stored in ~/.sumo/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.

Eatures[*]

  • An eature is a feature with an f-off ;)

Sumo is not a cloud management tool, a cluster 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 services and tools.

Cloud Management Service Providers

  • Engine Yard Cloud

  • RightScale

  • Ylastic

Cloud Management Libraries

  • Cloudkick

  • Fog

  • Pool Party

Note on Patches/Pull Requests

  • Fork the project on Github:

    git clone git://github.com/adamwiggins/sumo.git
  • Make your feature addition or bug fix.

  • Add tests for it. This is important. Feature tests/specs help alert us if we break the expected behavior in a future version. Buggy behavior tests/specs help guard against the same buggy behavior being reintroduced.

  • Commit, do not mess with the rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)

  • Send in a pull request with your commits. Bonus points for topic branches.

Examples

Role 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 (979.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://:8452cdd98f428c972f08@ec2-75-101-191-220.compute-1.amazonaws.com:6379/0

Managing volumes

Create and attach a volume to your running instance:

$ sumo create_volume
---> Create 5GB volume...     vol-8a9c6ae3 (1.1s)
$ sumo volumes
vol-8a9c6ae3    5GB  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 detach
---> 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)

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

Something went wrong with that request. Please try again.