EUCALYPTUS CLOUD SET UP-IMAGE CREATION

7 May

Installing the Eucalyptus Node Service on a running Ubuntu system consists of doing the following on one or more systems:

  1. Install Ubuntu 9.10 Server
  2. Update to the most current state in the Ubuntu archive:
    sudo apt-get update
    sudo apt-get dist-upgrade
  3. Install the eucalyptus-nc package
    sudo apt-get install eucalyptus-nc
  4. Configure the system’s primary ethernet interface as a bridge. The node controller will attach virtual network interfaces to this bridge for VM that is started before it to enable network connectivity.
    • Note: Remember the name of your node’s bridge device (we assume the name of your bridge device is “br0” for the rest of this document).
    • For details on configuring a bridge, see: http://doc.ubuntu.com/ubuntu/serverguide/C/network-configuration.html
    • The following script should configure your bridge correctly in most setups:
      interface=eth0
      bridge=br0
      sudo sed -i "s/^iface $interface inet \(.*\)$/iface $interface inet manual\n\nauto br0\niface $bridge inet \1/" /etc/network/interfaces
      sudo tee -a /etc/network/interfaces <<EOF
              bridge_ports $interface
              bridge_fd 9
              bridge_hello 2
              bridge_maxage 12
              bridge_stp off
      EOF
      sudo /etc/init.d/networking restart
  5. Configure /etc/eucalyptus/eucalyptus.conf with the name of the bridge, and restart the node controller:
    sudo sed -i "s/^VNET_BRIDGE=.*$/VNET_BRIDGE=$bridge/" /etc/eucalyptus/eucalyptus.conf
    sudo /etc/init.d/eucalyptus-nc restart
    • Note that there are several ways to configure a node to have a bridge as its primary interface, depending on the configuration of your machine. We show an example set of steps here but you will need to take care to ensure that this example configuration does not conflict with your local configuration if you wish to use it.
  6. Finally, you need to install the Cloud Controller’s eucalyptus user’s public ssh key into the Node Controller’s eucalyptus user’s authorized_keys file. The easiest way to do this:
    • On the Node Controller, temporarily set a password for the eucalyptus user:
      sudo passwd eucalyptus
    • Then, on the Cloud Controller:
      sudo -u eucalyptus ssh-copy-id -i ~eucalyptus/.ssh/id_rsa.pub eucalyptus@<IP_OF_NODE>
    • You can now remove the password of the eucalyptus account on the Node:
    sudo passwd -d eucalyptus
  • Run the ubuntu-vm-builder command:
    ubuntu-vm-builder xen karmic \
    --addpkg vim \
    --addpkg openssh-server \
    --rootsize 1024

    This will create a 1GB image based on Karmic Koala, adding the vim and openssh-server packages.
  • Bundle, upload, and register the resulting root.img file to Eucalyptus:
    euca-bundle-image -i ubuntu-xen/root.img
    euca-upload-bundle -b ubuntu -m /tmp/root.img.manifest.xml
    euca-register ubuntu/root.img.manifest.xml

Leave a comment