Rudy - v0.9 BETA
Not your grandparents’ EC2 deployment tool.
Rudy is a development and deployment tool for EC2. It helps you build and maintain infrastructures by organizing them into groups of zones, environments, and roles. By making it quick and easy to build infrastructures, Rudy makes it feasible to run environments only for the time that you need them.
All configuration is organized into this hierarchy so you can define properties (machine image, machine type, IP address, etc...) by role, by environment, or by zone. You can also define routines for running shell commands and scripts, uploading files, creating disks and backups, etc... Routines are organized by hierarchy too so a “startup” routine can run one thing for your database machines and another thing for your application machines.
Rudy helps with other stuff too. Every machine can be given a hostname based on its zone, environment, role, and position (you can run multiple machines with the same role). These names look like this: m-us-east-1b-stage-app-01, but you can also assign your own names. Rudy also automatically creates a private keypair and security for each machine group (e.g. key-us-east-1b-stage-app and grp-us-east-1b-stage-app).
Rudy is configured via several Ruby-based domain specific languages.
The machines configuration describes the “physical” characteristics of your infrastructure.
machines do env :stage do # Define an environment ami 'ami-e348af8a' # Specify a machine image role :app do # Define a role addresses '220.127.116.11' # Use elastic IPs disks do # Define EBS volumes path "/rudy/disk1" do size 100 device "/dev/sdr" end end end end end
The routines configuration describes repeatable processes that you can execute on your machines.
routines do startup do # $ rudy startup adduser :rudy authorize :rudy # Enable passwordless login disks do create "/rudy/disk1" # Create, format, and mount a volume end remote :rudy do # Run remote commands via SSH mkdir :p, "great" # $ mkdir -p great mysql_init :start your_script 'arg1', 'arg2' # Call your own scripts end end end
See Rudyfile for a complete configuration example.
$ rudy machines m-us-east-1d-stage-app-01: ec2-67-202-0-112.compute-1.amazonaws.com m-us-east-1d-stage-app-02: ec2-174-129-117-30.compute-1.amazonaws.com $ rudy disks disk-us-east-1d-stage-app-01-rudy-disk1 disk-us-east-1d-stage-app-02-rudy-disk1 $ rudy backups back-us-east-1d-stage-app-01-rudy-disk1-20090803-1857-49 back-us-east-1d-stage-app-01-rudy-disk1-20090803-1858-36 back-us-east-1d-stage-app-02-rudy-disk1-20090803-1911-05
See rudy -h for more info.
- Create complex IT infrastructures from a simple configuration
- Launch multiple instances
- Assign elastic IP addresses
- Create EBS volumes, attach to instances, format, and mount
- Run SSH commands on machine groups in parallel
- Organize instances into environments and roles
- Powerful command-line tools
- $ rudy -u root ssh
- $ rudy -e testing -r database backup-mysql
- Use _any Linux_ Amazon machine image (AMI) (partial Windows and Solaris support)
- Complete command-line interface for EC2. See bin/rudy-ec2.
$ sudo gem install rudy
or via download:
or via git:
$ git clone git://github.com/solutious/rudy.git
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 about it.
See Getting-Started for more info.
- Amazon AWS Account
- Ruby 1.8.x, 1.9.x, or JRuby 1.3
- Supported Platforms
- Linux: Ruby 1.8, 1.9, and JRuby 1.3+
- Windows: Ruby 1.8 and JRuby 1.3+ (Net::SSH does not run under Ruby 1.9)
- BSD: Needs testing (any takers?)
- Fork at GitHub
- Read the Documentation
- Submit issues to the IssueTracker
- Start a discussion on the GoogleGroup
- Find some Inspiration
- For all other inquires, email me directly: delano (@solutious.com)
We encourage people to find unique and interesting ways to break and extend rudy.
- For bigger features please fork the git repo and send me a pull request.
- For small or single file changes, send an email with details to: delano (@solutious.com)
- Evgeniy Tsvigun
- Kalin Harvey for all the feedback
- The Rilli.com team
- Adam Bognar
- Andrew Simpson
- Caleb Buxton
- Colin Brumelle
- Sam Aaron
- Everyone at Utrecht.rb
- Steve Abatangle
- Mathias Monnerville
- Jamis Buck for Net::SSH and friends
- Glenn Rempe for amazon-ec2
- Marcel Molina Jr. for aws-s3
- Keshia Knight Pulliam
- Delano Mandelbaum ( solutious.com/ )
- Rudy::AWS::SDB adapted from aws_sdb by Tim Dysinger (dysinger.net)
- Rake — rake.rubyforge.org/
- Moonshine — github.com/railsmachine/moonshine/tree/
- Boto — code.google.com/p/boto/
- Fabric — www.nongnu.org/fab/