Rain Toolkit For the Amazon Cloud
Join the DZone community and get the full member experience.Join For Free
Download the Essential Cloud Buyer’s Guide to learn important factors to consider before selecting a provider as well as buying criteria to help you make the best decision for your infrastructure needs, brought to you in partnership with Internap.
DZone: What is Rain Toolkit and what was your motivation for writing it?
Juliano Viana: Rain Toolkit is a set of command line tools for managing Amazon EC2 resources. I have been a big fan of virtualization technologies, and was one of the beta testers of the first VMWare version and also a beta tester of Amazon EC2. One of the central concepts of most virtualization technologies is the Virtual Machine - a piece of software that behaves more or less like a real machine but is totally under software control.
When I started working with EC2 I was surprised to notice that it doesn't have the concept of a Virtual Machine natively - instead EC2 has the concept of instances, which are similar to Virtual Machines but instances are ephemeral. An instance must be "assembled" before being used, and by assembled I mean some person (or tool) needs to put the instance's low-level components together: CPU, disks, IP addresses, etc.
Amazon provides a set of command line tools that enables developers and administrators to manage these low-level components, but these tools don't allow these low-level components to be grouped together in the form of a Virtual Machine like in other virtualization environments. Rain Toolkit solves that problem by allowing the creation and maintenance of Virtual Machines which are in essence groups of related EC2 low-level objects. Once these objects are put together the low-level components can be managed as a single unit.
To give an example, starting a machine using the Amazon EC2 tools usually involves:
- Run ec2-run-instances with a selected machine image
- Wait for the instance to start running
- Attach EBS volumes (disks) to the machine
- Wait for the volumes to finish attaching
- Mount the volumes
- Associate an elastic IP address with the instance
- Start services in the instance
Each of these actions is a separate script to run. With Rain Toolkit, all you need to do is:
start-virtual-machine -n <machine name>
DZone: What features does Rain Toolkit provide in dealing with day-to-day administration tasks - beyond what you can do with the EC2 command line?
Juliano: Rain Toolkit allows one to manage virtual machine using commands more friendly to anyone who already uses a traditional virtualization solution.
You can start/stop virtual machines and manage EBS volumes using friendly names instead of the not-so-friendly object ids ( things like i-c4c026ac ).
DZone: How is Rain Toolkit installed/deployed and used?
Juliano: You need Java 6 installed and also an AWS Services account with the EC2 service enabled. Start by downloading Rain Toolkit from logicstyle.com. Unpack the distribution in a directory of your choice and set a few environment variables:
export RAIN_HOME=<install dir>
export AWS_ACCESS_ID=<your aws access id>
export AWS_SECRET_KEY=<your aws secret key>
Once that is done you can start creating your virtual machines:
./bin/create-virtual-machine -n <machine name> -i <machine image id> ....
Creating a Virtual Machine involves setting the machine parameters. At the minimum you need to specify an AMI id. You can also specify a lot of other parameters (elastic IP address, kernel id, ramdisk id, availability zone , instance type, etc).
Once you define a VM you can start it by simply typing:
start-virtual-machine -n <machine name>
You can stop it with:
terminate-virtual-machine -n <machine name>
You can also have a quick overview of all running virtual machines in a given moment:
You can also create (or give a name to) EBS volumes :
create-volume -n <volume name > [-i <existing volume id>]...
Once you have created a volume you can attach it to a Virtual Machine:
attach-volume -v <volume name> -n <virtual machine name> -d <attachment device> [-m <mount point]
During VM startup Rain Toolkit will automatically perform all the adequate startup actions so that once the command is finished the Virtual Machine is ready to use.
For a detailed usage documentation please see the Rain Toolkit Manual.
DZone: Are there any other tools available that are similar to RainToolkit? Is it comparable to and/or based on any other technologies?
Juliano: There are many GUI tools for managing EC2 resources such as ElasticFox and the AWS Console, but as far as I know Rain Toolkit is the only tool focused on command line usage.
Most experienced system administrators prefer command line tools over GUI tools, and command-line tools are also very useful for scripting (Rain Toolkit commands are also designed to be scripting-friendly).
DZone: Which capabilities did Rain Toolkit gain in version 1.0?
Juliano: Version 1.0 contains support for managing the traditional (AMI based) EC2 instances with all its associated objects: IP addresses, volumes, kernels, ramdisks, etc.
DZone: What features can we expect in upcoming releases?
Juliano: In the next (1.1) release we plan to add support for EBS based instances, and also for Spot instances.
DZone: What are some of your thoughts on cloud computing presently and for the future?
Juliano: I think cloud computing is here to stay, and we will see more and more deployments moving from traditional data centers to cloud data centers (or conversions from traditional data centers to private clouds) as the related technologies mature.
DZone: What do you see in the future of cloud deployment technology?
Juliano: I believe we will see the emergence of a standards-based cloud API which will facilitate the deployment of cross-cloud applications as well as migration of applications between different clouds.
DZone: Is there anything else you'd like to mention?
Juliano: I'd like to mention that Logicstyle provides commercial support for Amazon EC2 deployments (with or without Rain Toolkit).
Opinions expressed by DZone contributors are their own.