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.
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:
NOTE: If you are not installing via RubyGems, you need to make sure the Ruby dependencies are installed and in your LOAD_PATH. Ryan Tomayko wrote a gist about it.
Step 2 of 2 (initialize your configuration):
$ rudy generate-config [edit ~/.rudy/config with your Amazon Web Services credentials] $ rudy init
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
"`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: 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.
Although Rudy has been pretty 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.
The Rilli.com team – for the initial use case, the ongoing feedback and support, and the good times!
Everyone at Utrecht.rb
Jamis Buck for writing Net::SSH and friends.
Rudy::AWS::SDB adapted from aws_sdb by Tim Dysinger (dysinger.net)
Escape, Copyright (C) 2006,2007 Tanaka Akira <firstname.lastname@example.org>
Keshia Knight Pulliam (email@example.com)
Delano Mandelbaum (firstname.lastname@example.org)