Exploring Ubuntu cloud tools

Cloudburst

The Web Interface

Eucalyptus provides a browser-based interface to manager a number of jobs you'll need to manage and launch virtual machines in your cloud. At this point, you should be able to access the web interface for the next steps. Point your browser to port 8443 on your Ubuntu Enterprise Cloud controller's secure web server port. On localhost, the URL would be:

https://localhost:8443

Because you will be using a self-generated certificate, expect a warning about your browser not being able to confirm that your connection is secure. Yes, you understand the risks and wish to proceed. Once there, you'll be looking at the Eucalyptus interface login screen (Figure 2). Log in with the admin username and password. If this is your first login, admin is the password as well.

Figure 2: Sign in to the Ubuntu Enterprise Cloud login screen.

Because this is the first time you're signing in, you don't have to concern yourself with additional accounts (Apply for account ), but you can request a login from the administrator if you have access to the UEC Web interface (Recover the Password ). Click Sign in to continue.

Once logged in, you will be prompted to change the password for subsequent logins and asked to supply an email address for the admin user and confirm the location of Walrus, the Eucalyptus storage component (for now, you can safely accept the URL provided). Follow the instructions to complete your login.

Once logged in, you'll be looking at a multi-tabbed interface. To do anything else of interest, you need to generate and install local security certificates and a small script file. Click the Credentials tab and click the Download Credentials button (Figure 3).

Figure 3: Your credentials, or access keys, are downloaded to a ZIP file.

The ZIP file euca2- admin- x509.zip for the admin user. The file for other users will have their username in place of admin . Now, open a terminal window and create a .euca folder in your home directory:

mkdir $HOME/.euca
cd .euca

Extract the certificate ZIP file to that folder. You should see five files in that folder: cloud- cert.pem, euca2- admin- ba25cbf5- pk.pem, euca2- admin- ba25cbf5- cert.pem, eucarc, and jssecacerts.

Pay special attention to the eucarc file, which contains environment variables with paths to the various services like Walrus and Eucalyptus, as well as the EC2 access and secret keys necessary to communicate with Eucalyptus. To use the commands, you must source the eucarc file:

. ~/.euca/eucarc

That's a dot with a space before the path to eucarc. This simple step is extremely important; forgetting to source the file will leave you scratching your head trying to figure out why so many things don't work.

The five files allow you to use your computer as a Eucalyptus client (including the cluster controller if you want to work at the command line), but they don't constitute everything you need. One additional package and the associated software let you use your computer as a Eucalyptus control client and make virtual machine images available to the Eucalyptus cloud. To install the packages, enter

apt- get install euca2ools

to satisfy prerequisites.

Working With Nodes

On each of the node machines, execute:

apt- get install eucalyptus- nc

Each node is part of a cluster of machines, and you must tell Eucalyptus about each cluster before continuing. The first cluster was created when you installed the eucalyptus-cloud programs on the cloud controller. Additional clusters can be added via the web interface (Figure 4) by clicking Configuration or by entering the following command:

euca_conf - - register- cluster your_clustername hostname_or_ip
Figure 4: Register or deregister clustersin the Web UI.

The euca_conf command can also be used to enable or disable nodes or the cluster controller: Run euca_conf - - help for details. Next, you need to register each and every node:

euca_conf - - register- nodes hostname_or_ip

Later, you can always add more machines to your cluster.

Gotcha!

If you see errors like

Warning: cannot file file node- cert.pem in //var/lib/eucalyptus/keys/

you've run into a rather annoying bug associated with cluster creation that can stop you in your tracks. To resolve the issue, change directory to /var/lib/eucalyptus/keys/cluster_name and copy the *.pem files back to /var/lib/eucalyptus/keys. As I understand it, this isn't supposed to happen or be needed, but many have reported the problem.

Keep in mind that the cloud controller needs to talk to and execute commands on the nodes using SSH, so you'll want to exchange SSH keys to eliminate password prompts at every turn. Your first step is to assign a password, if only temporarily, to the Eucalyptus user on each of the nodes. Once this is done, go back to the cloud controller and from the root prompt, type:

sudo - u eucalyptus ssh- copy- id - i /var/lib/eucalyptus/.ssh/id_rsa.pub eucalyptus@ip_addr

When asked for a password, the password of the Eucalyptus user on the node controller. To verify that all is well, try logging in:

sudo - u eucalyptus ssh eucalyptus@ip_addr

If you log in without a password and without an error, all is well.

Verify Your Configuration

The easiest way to verify you configuration is to check the local cluster availability information. If you see something like Listing 1, you're good to go. Incidentally, you can do this from either the cloud controller or the nodes. Doing it from the nodes verifies that the two sides are talking to each other.

Listing 1

Checking Local Cluster Availability

01 $ euca- describe- availability- zones verbose
02 AVAILABILITYZONE        cluster1        192.168.1.189
03 AVAILABILITYZONE        |-  vm types     free / max   cpu   ram  disk
04 AVAILABILITYZONE        |-  m1.small     0000 / 0000   1    192     2
05 AVAILABILITYZONE        |-  c1.medium    0000 / 0000   1    256     5
06 AVAILABILITYZONE        |-  m1.large     0000 / 0000   2    512    10
07 AVAILABILITYZONE        |-  m1.xlarge    0000 / 0000   2   1024    20
08 AVAILABILITYZONE        |-  c1.xlarge    0000 / 0000   4   2048    20

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus