README.rdoc
README.rdoc
Last Update: 2011-02-11 05:34:34 -0500

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).

Get-Started with Rudy now.

Configuration

Rudy is configured via several Ruby-based domain specific languages.

Machines

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 '11.22.33.44'     # Use elastic IPs

      disks do                    # Define EBS volumes
        path "/rudy/disk1" do
          size 100
          device "/dev/sdr"
        end
      end
    end

  end
end

Routines

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.

Running Commands

Rudy comes with a command-line tool called rudy. It provides commands for describing the infrastructures you’ve built with Rudy.

$ 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.

Features

  • 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.

Project Status

This is a BETA release. That means Rudy is not ready for production use! See Project-Status.

Installation

Via Rubygems:

$ 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.

Pre-Requisites

More Info

Contributions

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)

Thanks

  • 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

Credits

Related Projects

License

See: LICENSE.txt