Quantcast
Channel: Curious » grid
Viewing all articles
Browse latest Browse all 7

Eucalyptus: Euca2ools

$
0
0

In this series of posts on “Building an on-premise private cloud” we have so far:

Before we jump into bundling, uploading, and registering images, let’s first download and install Euca2ools.



Euca2ools

Euca2ools are command-line utilities to help:

  • Manage Images (bundle, upload, register, delete, etc.)
  • Manage Instances (start, reboot, terminate, list, etc.)
  • Manage Volumes & Snapshots (attach, detach, list, create, delete, etc.)
  • Manage IP addresses (associate, disassociate, list, etc.)
  • Manage SSH key pairs (add, delete, list)
  • Manage Security groups (add, delete, list, add rules)
  • Query availability zones (clusters)

Euca2ools is compatible with Amazon EC2 and S3 web services. In fact, Euca2ools is modeled after Amazon EC2 API and EC2 AMI tools.



Download & Install

Since I have been using CentOS 5 32-bit, I’ll describe the tar ball install process for CentOS 5. Also, in my case I’ll install euca2ools on my front-end machine (192.168.0.114)

Note: You may choose to go the yum (you will need to add the http://www.eucalyptussoftware.com/downloads/repo/euca2ools/$VERSION/yum/centos/ repo first) route instead of the tar ball.

Note: If you are using a Debian-based distro, feel free to install using apt-get (apt-get install euca2ools)

First download the tar.gz package for CentOS 5 32-bit – in this case, euca2ools-1.2-centos-i386.tar.gz

Next un-tar the above package

tar zxvf euca2ools-1.2-centos-i386.tar.gz

Before you install the rpm packages in the euca2ools-1.2-centos-i386 directory, you need to install swig as follows:

yum update
yum install swig

Next, go into euca2ools-1.2-centos-i386 directory and install the rpm packages as follows:

cd euca2ools-1.2-centos-i386
rpm -Uvh python25-2.5.1-bashton1.i386.rpm python25-libs-2.5.1-bashton1.i386.rpm euca2ools-1.2-1.i386.rpm

Confirm that euca2ools is install as follows:

rpm -qa euca2ools
euca2ools-1.2-1



Testing Euca2ools

In the first post I used Amazon EC2 API tools to test the Eucalyptus install. To be precise I had used the ec2-describe-availability-zones command.

Now that we have Euca2ools installed we can use the euca-describe-availability-zones command instead. Remember to source in the eucarc file first.

cd .euca
source eucarc
euca-describe-availability-zones verbose
AVAILABILITYZONE rosh-cluster1 192.168.0.114
AVAILABILITYZONE |- vm types free / max cpu ram disk
AVAILABILITYZONE |- m1.small 0004 / 0004 1 128 2
AVAILABILITYZONE |- c1.medium 0004 / 0004 1 256 5
AVAILABILITYZONE |- m1.large 0002 / 0002 2 512 10
AVAILABILITYZONE |- m1.xlarge 0000 / 0000 2 1024 20
AVAILABILITYZONE |- c1.xlarge 0000 / 0000 4 2048 20

Nice!

Feel free to play around with some of the other commands. You can get a list of commands by typing “euca” and pressing the TAB button twice. You could also run the command ls /usr/bin | grep euca

euca-add-group
euca_conf
euca-delete-volume
euca-describe-keypairs
euca_killall
euca-run-instances
euca-add-keypair
euca-confirm-product-instance
euca-deregister
euca-describe-regions
eucalyptus-cloud
euca_sync_key
euca-allocate-address
euca-create-snapshot
euca-describe-addresses
euca-describe-snapshots
euca-modify-image-attribute
euca-terminate-instances
euca-associate-address
euca-create-volume
euca-describe-availability-zones
euca-describe-volumes
euca-reboot-instances
euca-unbundle
euca-attach-volume
euca-delete-bundle
euca-describe-groups
euca-detach-volume
euca-register
euca-upload-bundle
euca-authorize
euca-delete-group
euca-describe-image-attribute
euca-disassociate-address
euca-release-address
euca-version
euca-bundle-image
euca-delete-keypair
euca-describe-images
euca-download-bundle
euca-reset-image-attribute
euca-bundle-vol
euca-delete-snapshot
euca-describe-instances
euca-get-console-output
euca-revoke

To get more information on a particular command, type in the command name following by the argument –help. For instance:

euca-describe-availability-zones --help

Shows information about availability zones.

euca-describe-availability-zones [--region region] [-h, --help] [--version] [--debug] [zone1 zone2...zoneN]

OPTIONAL PARAMETERS

–region region to describe availability zones for

zone1 zone2…zoneN zones to describe.

-a, –access-key User’s Access Key ID.

-s, –secret-key User’s Secret Key.

-U, –url URL of the Cloud to connect to.

–config Read credentials and cloud settings from the
specified config file (defaults to $HOME/.eucarc or /etc/euca2ools/eucarc).

-h, –help Display this help message.

–version Display the version of this tool.

–debug Turn on debugging.

Euca2ools will use the environment variables EC2_URL, EC2_ACCESS_KEY, EC2_SECRET_KEY, EC2_CERT, EC2_PRIVATE_KEY, S3_URL, EUCALYPTUS_CERT by default.

As we continue these series, we will see more and more of the Euca2ools commands.


Viewing all articles
Browse latest Browse all 7

Trending Articles