Version 9 (modified by ibaldin, 9 years ago)

--

Using NEuca in Orca

Overview

This page contains notes about how NEuca is to be used in Orca.

NEuca Site Authority

To use NEuca, you need a NEuca-enabled Eucalyptus cluster and an Orca site authority actor configured to interact with NEuca.

To define an actor to interact with NEuca, you can use the following template:

    <actor>
            <type>site</type>
            <name>YOUR_ACTOR_NAME</name>
             <guid>GENERATE_YOUR_ACTOR_GUID</guid>
            <pools>
                <pool>
                    <type>YOUR_RESOURCE_TYPE_NAME</type>
                    <label>Eucalyptus Virtual Machine</label>
                    <description>A virtual machine</description>
                    <units>10</units>
                    <start>2010-01-30T00:00:00</start>
                    <end>2011-01-30T00:00:00</end>
                    <handler path="ec2/handler.xml">
                        <properties>
                            <!-- 
                            By default the handler assumes that the keys are under $ORCA_HOME/ec2. 
                            If you want the handler to use keys from a different location, specify it here.
                            Note: it must be an absolute path.
                            -->
                            <!-- <property name="ec2.keys" value="path_to_keys_dir" /> -->
                        </properties>
                    </handler>
                </pool>
            </pools>
            <controls>
                <control type="YOUR_RESOURCE_TYPE_NAME" class="orca.policy.core.SimpleVMControl" />
            </controls>
        </actor>

Please replace the text in caps with text appropriate for your setup. You probably also want to change the units and the start/end parameters for the resource type.

NEuca Handler

The NEuca handler supports creating VMs using the NEuca extension. The current version of the handler supports the following:

  • multiple network interfaces
  • ip addresses per network interface
  • an instance configuration script
  • user SSH public key

The support for these features is controlled by one or more properties, which are described below.

Network Interface Configuration

NEuca allows reservation requests to control any network interface other than eth0, which is reserved internally. Each network interface must at least be associated with a VLAN tag, and can optionally specify an IP address and a subnet mask (in / notation, e.g, 1.2.3.4/24).

NOTE: the support for specifying an IP address is still incomplete.

To specify configuration for eth1, the following properties must be passed to the site authority:

unit.eth1.vlan.tag= 20

If the VM should contain one more interface, then it can be specified by passing:

unit.eth2.vlan.tag=21

Instead of specifying interface-specific VLAN tag, the handler also supports specifying a VLAN tag using the unit.vlan.tag property. In this case the machine can have only one network interface (eth1):

unit.vlan.tag=20

Instance Configuration Script

To pass an instance configuration script pass the contents (not the location) of the script in the unit.instance.config property:

unit.instance.config=echo "hello world"

Guest SSH Public Key

By default all NEuca VMs are created to authorize SSH connections using the site authority's private key. To enable the guest to connect as root using its own key, pass the guest's SSH public key in config.ssh.key:

config.ssh.key=GUES_PUBLIC_SSH_KEY

Accessing VMs Created by NEuca

Each VM created by NEuca is represented as an Unit object in the ConcreteSet? of the VM reservation. The unit.manage.ip property can be used to access the management ip of the VM. If the guest specified an SSH key, then it can use it to connect to the machine at address unit.manage.ip.