This document describes the steps for configuring Eucalyptus after the software has been installed on all nodes (either from source or using binary packages). Instructions below assume that you have variable $EUCALYPTUS set. For RPM-based installations, $EUCALYPTUS is /opt/eucalyptus/ while for DEB-based installations, $EUCALYPTUS is '/'. So set it appropriately:
export EUCALYPTUS=....
Eucalyptus comes with the euca_conf script for setting up the configuration file located in '$EUCALYPTUS/etc/eucalyptus/eucalyptus.conf'. Alternatively, you can change that file in a text editor instead of using 'euca_conf'.
Eucalyptus installation consists of three types of components: cloud controller (CLC), cluster controller (CC), and the node controller(s) (NCs). In following instructions we assume that CLC and CC are co-located on a machine that we will refer to as the front end and that NCs run on compute nodes. The instructions will also work if one physical machine fulfills the role of both the front end and a compute node.
IMPORTANT: Make sure that the cloud controller is up and running before going through the following steps.
To connect the Eucalyptus components together, you will need to register the Cluster with the Cloud, and register each Node with the Cluster. On the front-end, do:
$EUCALYPTUS/usr/sbin/euca_conf -addcluster <clustername> <clusterhost> $EUCALYPTUS/etc/eucalyptus/eucalyptus.conf
where <clustername> is the name your would like to attach to your Cluster, and <clusterhost> is the hostname of the machine or the IP where the Cluster Controller is running.
Also on the front-end, add the hostnames on which you plan to run node controllers one-by-one (this involves connecting to the node via SSH to propagate the cryptographic keys, so you may be prompted for a password):
$EUCALYPTUS/usr/sbin/euca_conf -addnode <nodehost> $EUCALYPTUS/etc/eucalyptus/eucalyptus.conf
where <nodehost> is the hostname or IP of your node.
Alternatively, you can add nodes all at once with the -nodes option, which requires you to explicitly propagate cryptographic keys afterwards:
$EUCALYPTUS/usr/sbin/euca_conf -nodes "<nodehost1> ... <nodehostN>" $EUCALYPTUS/etc/eucalyptus/eucalyptus.conf $EUCALYPTUS/usr/sbin/euca_sync_key -c $EUCALYPTUS/etc/eucalyptus/eucalyptus.conf
OPTIONAL: Eucalyptus provides some options when it comes to configuring your VM virtual network. By default, we enable the simplest but least feature-ful networking mode, called SYSTEM in the eucalyptus.conf file: Eucalyptus will assume that you already have a DHCP server configured to serve IP addresses to VMs that start on cluster nodes. Please consult the the brief explanation in the comments of the configuration file and the Eucalyptus Networking document if you wish to try other modes that will enable more features (security groups, elastic IPs, etc.).
If you installed from binary packages you can now skip to step 2 since the compute nodes should be appropriately configured. If you later decide to diverge from the default configuration, you might want to revisit these steps.
On each compute node, create a local directory where VM images are placed temporarily when VMs are running (images will be cached under the same path, too). Instruct the nodes to run the node controller, choose what hypervisor to use (xen or kvm), and specify the path for VM images. This path is used to store temporary VM images and it's important it's empty (everything in it will be removed!).
for x in hostname1 hostname2 ... hostnameN ; do \
ssh $x "mkdir -p /usr/local/instances/; $EUCALYPTUS/usr/sbin/euca_conf -hypervisor kvm -instances /usr/local/instances $EUCALYPTUS/etc/eucalyptus/eucalyptus.conf"
done
Make sure that the user you have decided to run eucalyptus as (username='eucalyptus' in the above example) has the ability to control VMs through the node controller machine's libvirt installation. A good test is to run the command virsh list as the eucalyptus user to see if that user has the appropriate rights.
Finally, ensure that the networking settings in 'eucalyptus.conf' on each of your nodes is configured properly. For instance, correct values for VNET_INTERFACE and VNET_BRIDGE may differ from your front-end. See Eucalyptus Networking for more details.
First, make sure that you have all of the runtime dependencies of Eucalyptus installed, based on your chosen set of configuration parameters. If there is a problem with runtime dependencies (for instance, if Eucalyptus cannot find/interact with them), all errors will be reported in log files located in $EUCALYPTUS/var/log/eucalyptus.
Use the init-scripts to start each component on the appropriate host. Most likely, on the front-end you would run:
$EUCALYPTUS/etc/init.d/eucalyptus-cloud start $EUCALYPTUS/etc/init.d/eucalyptus-cc start
And on each of the compute nodes you would run:
$EUCALYPTUS/etc/init.d/eucalyptus-nc start
To stop them you call the script with stop instead of start.
If you installed from binary packages you can now skip to step 3. If you installed from source and you want to have eucalyptus started automatically when your machines are (re)booted, you can add the following symlinks on the appropriate hosts
ln -sf $EUCALYPTUS/etc/init.d/eucalyptus-cloud /etc/init.d/eucalyptus-cloud ln -sf $EUCALYPTUS/etc/init.d/eucalyptus-cc /etc/init.d/eucalyptus-cc ln -sf $EUCALYPTUS/etc/init.d/eucalyptus-nc /etc/init.d/eucalyptus-nc
and then add the symlinks to the distribution's booting process. This process differs from distribution to distribution. For example if you have update-rc.d available you can run:
update-rc.d eucalyptus-cloud defaults
or if you have chkconfig available you can run:
chkconfig eucalyptus-cloud on
To configure eucalyptus, after you started all components, login to
where you should substitute localhost with the name of the host running the cloud controller. (WARNING: on some machines it may take few minutes after the starting of the Cloud Controller for the URL to be responsive the first time you run Eucalyptus.) You will be prompted for a user/password which are set to admin/admin. Upon logging in you will be guided through three first-time tasks:
After completing the first-time tasks, you will see the 'Configuration' tab. To use the system with the EC2 client tools, you must generate user credentials. Click the 'Credentials' tab and download your certificates via the 'Download certificates' button. You will be able to use these x509 certificates with Amazon EC2 tools and third-party tools like rightscale.com.
Create a directory, for example $HOME/.euca,
mkdir $HOME/.euca
unpack the credentials into it, and source the included 'eucarc':
. $HOME/.euca/eucarc
Note that you will have to source this file every time you intend to use the EC2 command-line tools, or you may add it to your local default environment.