Eucalyptus is open source software for building AWS-compatible private and hybrid clouds. As an Infrastructure as a Service product, Eucalyptus allows you to flexibly provision your own collections of resources (both compute and storage), on an as-needed basis. It provides many AWS-compatible services including EC2, S3, IAM, ELB, Auto Scaling and CloudWatch. In this series of exercises you will use the User Console to gain familiarity and basic experience using many of these services.
A Eucalyptus cloud is very similar to the AWS cloud you are already working with. You can easily launch instances within customized security groups. You can create and attach storage volumes and make snapshots of volumes for backup or reuse. The most significant difference from AWS is Eucalyptus runs on your own equipment and can be customized to suit your unique needs.
Eucalyptus often makes use of AWS terminology and service names, but there are a few key differences worth noting:
The exercise begins with setting up basic security then launching a Eucalyptus instance store backed machine image (see below for more info). We will then create and attach an additional Eucalyptus volume. To complete this exercise, you will perform the following tasks:
Instance store images the root (/) disk of the instance is a copy of the Eucalyptus Machine Image. This instance type is recommended for stateless VMs because changes made the instance are not retained when the instance is terminated. EBS backed images, by contrast, are persistent. You can stop the instance when you are not using it and start it again without losing changes. You can also take a snapshot of the root volume and register it as a new image.
Readers already familiar with AWS may also want to try the optional tasks, which include connecting to an instance and mounting a volume. These tasks are not required to successfully complete this exercise.
Before using the Eucalyptus cloud you will need to perform the following tasks:
Eucalyptus uses cryptographic key pairs for access to instances. Before you can run an instance, you must create a key pair. Creating a key pair generates two keys: a public key (saved within your Eucalyptus cloud) and a corresponding private key (automatically downloaded by your browser). To enable this private key you must save it to a file and set appropriate access permissions (using the chmod command), as shown in the example below. When attempting to login to the VM instance using SSH, the public key is checked against your private key to verify access.
Use chmod to restrict access to the file (Linux and Mac users only)
chmod 400 ~/path/demo-key.pem
Keep your private key file in a safe place. If you lose it, you will be unable to access instances created with the key pair.
Security groups let you control network access to instances by applying firewall rules to instances associated with a group. To create a security group do the following:
You are now ready to launch an instance.
This step will show you how to use the User Console to select a Eucalyptus Machine Image (EMI) and launch an instance. The EMI contains a standard CentOS 6 operating system.
To launch an instance:
You will now provision and attach storage to your instance as shown in the next step: Add a Volume
As an optional task you may connect to your instance.
The steps below will guide you through creating and attaching a volume to your instance using the User Console. Similar to Amazon EBS volume's, Eucalyptus volumes are network-attached storage for your instance.
ecc-cluster-1in the Availability zone
Volumes are analogous to a hard drive. It can only connect it to one Instance and when new it must be formatted with an acceptable file system. To learn more about this, try the optional task: Mount and Format the Volume.
You have now successfully provisioned both compute and storage.
Finish the exercise by releasing the resources in the next step: Clean up.
Although we often think of cloud resources as infinite, there are good reasons to clean up resources that are no longer in use. On a public cloud you are charged for the time or provisioned capacity, cleaning up resources will reduce unnecessary charges that can easily add up. On a private cloud the available capacity is limited by datacenter resources allocated to the cloud. Cleaning up unused resources makes them available to other innovative cloud users in your company. The following steps will demonstrate how to free the compute and storage resources allocated in this exercise.
Verify the instance has terminated before continuing. Note that terminating an instance may take a couple moments.
Terminating the instance will automatically detach the volume, leaving it available for later use. When you no longer need the volume you can remove it with these steps: