This how-to has been kindly contributed by Andrei Lapin, PhD student at the IIUN.
The EC2 interface in OpenNebula can be used in two different ways.
The preferred way is through Command Line Tools (Eucalyptus).
Required environmental variables:
- EC2_URL=
- EC2_SECRET_KEY=
- EC2_ACCESS_KEY=
Or mandatory command parameters:
- –url
- –access-key-id
- –secret-key
where the access-key is user’s login and the secret-key is the SHA1 hash value of user’s password.
Alternatively, the EC2 interface can be used via the Boto Python library (tested with version 2.20.1).
IMAGE
In order to be able to use an OpenNebula image through the EC2 interface, the image must contain an additional parameter:
- EC2_AMI = YES
Moreover, the image cannot be set in persistent mode.
TEMPLATE
In order to be able to use an OpenNebula template through the EC2 interface, the template must contain an additional parameter:
- EC2_INSTANCE_TYPE = <name>,
where <name> is the template name shown through the EC2 interface.