Deltacloud adaptor for Hybrid Cloud

A Hybrid Cloud is an extension of a Private Cloud to combine local resources with resources from one or several remote Cloud providers. The remote provider could be a commercial Cloud service or a partner private infrastructure running a different OpenNebula instance. Hybrid Cloud computing functionality enables the building of cloudbursting and cloud federation scenarios.

OpenNebula provides support for building Hybrid Clouds with Amazon EC2 and ElasticHost, and with this new adaptor in the ecosystem, OpenNebula leverages RedHat Deltacloud to access any major public cloud, such as GoGrid, Rackspace, Terremark or RimuHosting and Private clouds running OpenNebula or RHEV-M. A single OpenNebula management instance can be used to combine local infrastructure with multiple remote clouds, so building a highly scalable hosting environments.

Requirements & Installation

  1. You must have an OpenNebula site properly configured and running to install the Deltacloud adaptor. This guide also assumes that you are familiar with the configuration and use of OpenNebula.
  2. Also, you must have a working Deltacloud Server (deltacloud-core (0.0.1)) with a known url and configured with the desired cloud provider. For more information about configuring a Deltacloud server [1]
  3. Then you can install the adaptor that enables OpenNebula to connect to the Deltacloud Server:
    • Download the source:
      $ git clone git://opennebula.org/deltacloud-adaptor.git
      
    • Install:
      $ ./install.sh
      
    • You just need to install the following packages to meet the runtime dependencies:
      • deltacloud-client (0.0.3)
        $ gem install deltacloud-client
        

Adaptor Files

The driver consists of the following files:

  • $ONE_LOCATION/lib/mads/one_vmm_dc : Shell script wrapper to the virtualization Deltacloud driver. Sets the environment and other bootstrap tasks.
  • $ONE_LOCATION/lib/mads/one_vmm_dc.rb : The actual Deltacloud virtualization driver.
  • $ONE_LOCATION/etc/vmm_dc/vmm_dc.conf : set here default values for Deltacloud domain definitions, useful for the Deltacloud virtualization driver.
    <!-- Url and credentials for Deltacloud -->
    
    <CONFIG>
      <DC>
        <API_URL>http://cloud.server:3001/api</API_URL>
        <USER>user</USER>
        <PASSWORD>password</PASSWORD>
      </DC>
    </CONFIG>
    
  • $ONE_LOCATION/lib/mads/one_im_dc : Shell script wrapper to the Deltacloud information driver. Sets the environment and other bootstrap tasks.
  • $ONE_LOCATION/lib/mads/one_im_dc.rb : The actual Deltacloud information driver.
  • $ONE_LOCATION/etc/im_dc/im_dc.conf : set here default values for Deltacloud domain definitions, useful for the Deltacloud information driver.
    # Max number of instances that can be launched into Deltacloud
    
    INSTANCES=20
    

Note: If OpenNebula was installed in system wide mode these directories become /usr/lib/one/mads and /etc/one, respectively. The rest of this guide refers to the $ONE_LOCATION paths (corresponding to self contained mode) and omits the equivalent system wide locations.

Configuration

OpenNebula Configuration

Two lines must be added to the $ONE_LOCATION/etc/oned.conf file in order to use the driver.

#-------------------------------------------------------------------------------
#  Configuration added by the DeltaCloud-Plugin installer
#-------------------------------------------------------------------------------

IM_MAD = [
    name       = "im_dc",
    executable = "one_im_dc",
    arguments  = "im_dc/im_dc.conf",
    default    = "im_dc/im_dc.conf"]

VM_MAD = [ 
    name       = "vmm_dc",
    executable = "one_vmm_dc",
    arguments  = "vmm_dc/vmm_dc.conf",
    type       = "xml" ]
  • The name of the driver needs to be provided at the time of adding a new host to OpenNebula.
  • executable points to the path of the driver executable file. It can be an absolute path or relative to $ONE_LOCATION/lib/mads.
  • arguments points to the configuration file for the driver. It can be an absolute path or relative to $ONE_LOCATION/etc.
  • type identifies this driver as using XML messages.

Additionally, the tm_dummy section needs to be uncommented.

Note: if you use the installer included in the source, this 2 lines will be added automatically to the $ONE_LOCATION/etc/oned.conf

Adaptor Configuration

You must configure the url and credentials for Deltacloud, for this edit the file $ONE_LOCATION/etc/mad/vmm_dc.conf

<!-- Url and credentials for Deltacloud -->

<CONFIG>
  <DC>
    <API_URL>http://cloud.server:3001/api</API_URL>
    <USER>user</USER>
    <PASSWORD>password</PASSWORD>
  </DC>
</CONFIG>

Also you must configure the maximum capacity that you want OpenNebula to deploy on Deltacloud, for this edit the file $ONE_LOCATION/etc/im_dc/im_dc.conf.

# Max number of instances that can be launched into Deltacloud

INSTANCES=20

After configuring everything when you start ONE, you need to add the Deltacloud host to the host list to be able to submit virtual machines, like the following:

$ onehost create dc im_dc vmm_dc tm_dummy

Deltacloud Specific Template Attributes

  • NAME: A short label to identify the instance
  • IMAGE_ID: The identifier (not URL) of the image from which to base the instance
    An image is a platonic form of a machine. Images are not directly executable, but are a template for creating actual instances of machines.
  • HARDWARE_PROFILE: The hardware profile upon which to launch the instance
    Within a cloud provider a hardware profile represents a configuration of resources upon which a machine may be deployed. A hardware profile defines aspects such as local disk storage, available RAM, and architecture
  • REALM: The realm in which to launch the instance
    Within a cloud provider a realm represents a boundary containing resources.

Testing

In order to test the Deltacloud adaptor, the following template can be instantiated with appropriate values and sent to a Deltacloud resource:

CPU    = 1
MEMORY = 1024

DC = [ NAME="name",
       IMAGE_ID=1,
       REALM="realm",
       HARDWARE_PROFILE="hwp"]

REQUIREMENTS = "HYPERVISOR=dc" 

[1] Deltacloud Server

ONE-DELTA.jpg (44.3 kB) Daniel Molina, 06/11/2010 04:03 pm