= Rudy - v0.6 ALPHA
Rudy is a command-line development and deployment tool for Amazon Web Services. It helps you build and manage machines in EC2 by organizing them into groups of _environments_ and _roles_. These are called _machine_ _groups_. stage is the default environment and app is the default role. You can run multiple machines with the same role. These are called _positions_. Rudy also supports running machine groups across availability _zones_.
When you put all this together, you have a unique name for every machine. The default machine is:
zone env role
v v v
m-us-east-1b-stage-app-01
^ ^
"machine" position
All configuration is organized into the zones, environments, and roles that you specify (Rudy assumes positions are identical which is important for backups and scaling). And as you'd expect, the defaults can be changed too (in ~/.rudy/config). See below for usage examples.
NOTE: This is an ALPHA release. That means Rudy's not ready for production use! See Alpha Warning.
== Features
* Single command startup and shutdown
* Automatic disk creation. Define disks with a DSL and Rudy does the dirty work (creates EBS volume, attach to instance, format, and mount).
* Supports any Amazon machine image (AMI) (Windows images should work but need more testing)
* Complete command-line interface for EC2 (a replacement for Amazon's API tools). See bin/rudy-ec2.
* Basic command-line interface for SDB and S3 (create and delete buckets and volumes). See bin/rudy-sdb and bin/rudy-s3.
== Installation
=== Step 1 of 2 (get Rudy on to your machine):
Via Rubygems, one of:
$ sudo gem install rudy
$ sudo gem install solutious-rudy --source http://gems.github.com/
or via download:
* rudy-0.6.0.tar.gz[http://github.com/solutious/rudy/tarball/rudy-0.6.0]
* rudy-0.6.0.zip[http://github.com/solutious/rudy/zipball/rudy-0.6.0]
NOTE: If you are not installing via RubyGems, you need to make sure the dependencies are in your LOAD_PATH ($:). Ryan Tomayko wrote a gist[http://gist.github.com/54177] about it.
=== Step 2 of 2 (initialize your configuration):
$ rudy generate-config
[edit ~/.rudy/config with your Amazon Web Services credentials]
$ rudy init
NOTE: You need an Amazon[http://aws.amazon.com/] account to use Rudy. Sign up for EC2[http://aws.amazon.com/ec2/], SimpleDB[http://aws.amazon.com/simpledb/], and S3[http://aws.amazon.com/s3/]
== Example -- Launch a Machine Group
Machine groups are named after the current environment and role. The default machine group is stage-app. In this example, Rudy will create the default machine group from scratch.
Note: Make sure your ~/.rudy/config contains your AWS credentials
We need to tell Rudy what this machine group should look like. We can generate a default machine configuration with this command:
$ rudy config --rudy > Rudyfile
This will generate a config file called Rudyfile which contains a default machines and routines configuration. The machine configuration describes the "physical" characteristics of your machine groups. The routine configuration describes what happens when you startup and shutdown a machine group (Rudy refers to these as _routines_).
We can launch the default machine group (stage-app) with this command:
$ rudy startup
You now have a new EC2 instance called m-us-east-1b-stage-app-01 to work with. You can log into it with:
$ rudy -u root ssh
The -u root tells Rudy to open a connection as the root user. If you create an account on that instance, you can login as that user too. When you don't feel like paying for the instance you can run the following command to destroy it forever:
$ rudy shutdown
== Dependencies:
* OpenSSH[http://www.openssh.com/]
* Net::SSH[http://net-ssh.rubyforge.org/]
* Net::SCP[http://net-ssh.rubyforge.org/]
* amazon-ec2[http://github.com/grempe/amazon-ec2]
* Rye[http://github.com/delano/rye]
* Drydock[http://github.com/delano/drydock]
* Caesars[http://github.com/delano/caesars]
== Common Errors
* "`require': no such file to load -- amazon-ec2 (LoadError)"
* You're probably running a mix of Rubygem and non-Rubygem libraries. Ryan Tomayko has you covered: http://gist.github.com/54177
* "The request signature we calculated does not match the signature you provided."
* Check that your Amazon Web Service access key and secret key are correct
* "AWS was not able to validate the provided access credentials"
* If it's a new Amazon Account, you need to sign up for EC2, SDB, and S3.
== Alpha Warning
Although Rudy has been well tested and is currently being used in production in a private beta, it's not ready for general production use. There are a few things to keep in mind while Rudy is in alpha status.
* If you already have private SSH keys, back them up. Rudy is quite safe but hasn't been audited so backup your keys as a precaution.
* If you're running EC2 instances in production, create a new set of AWS credentials (access key and secret key) to use with Rudy. This will ensure that Rudy has no access to your production instances.
* Rudy commands and APIs may change in later releases. This means that if you create an environment with an alpha release and later upgrade Rudy, some things may not work as expected.
== More Info
* GitHub[http://github.com/solutious/rudy]
* Issues[http://github.com/solutious/rudy/issues]
* RubyForge[http://rubyforge.org/projects/rudy]
* Inspiration[http://www.youtube.com/watch?v=CgaiIW5Rzes]
== Thanks
* The Rilli.com[http://rilli.com] team -- for the initial use case, the ongoing feedback and support, and the good times!
* Adam Bognar
* Andrew Simpson
* Caleb Buxton
* Colin Brumelle
* Everyone at Utrecht.rb[http://groups.google.com/group/utrecht-rb]
* Jamis Buck for writing Net::SSH and friends.
== Credits
* Rudy::AWS::SDB adapted from aws_sdb by Tim Dysinger (http://dysinger.net)
* Escape, Copyright (C) 2006,2007 Tanaka Akira
* Keshia Knight Pulliam (rudy@solutious.com)
* Delano Mandelbaum (delano@solutious.com)
== License
See: LICENSE.txt