Pre-requisites

You need to have a local copy of our Comodit Bootstrap image. You can retrieve it here: Comodit Bootstrap image

Import Comodit Bootstrap image

To import the Comodit Bootstrap image, you need to create a new machine with an existing Eucalyptus image machine. Then, you need to create and attach a volume on it. After that, you need to copy the Comodit Bootstrap image into the attached volume. Finally, you can detach the volume, create a snapshot and register the new Comodit Bootstrap image.

Create the new machine with an existing Eucalyptus image

euca-run-instances <image_id> -k <key_pair>

Where:

  • \<image_id> is the ID of an EMI.
  • \<key_pair> is the name of the SS key to inject into the instance.

Example

euca-run-instances emi-F4E33814

Create a new volume

euca-create-volume -z <zone> -s <size>

Where:

  • \<zone> is the name of a zone.
  • \<size> is the size in GBs of the volume.

Example

euca-create-volume -z cluster01 -s 10

Attach the volume to the new machine

euca-attach-volume <volume_id> -i <instance_id> -d <device_name>

Where:

  • \<volume_id> is the ID of the new volume.
  • \<instance_id> is the ID of the new machine.
  • \<device_name> is the local device name (inside the guest VM) to use.

Example

euca-attach-volume vol-DF9642BD -i i-C39843F9 -d vdb

Copy our Comodit Bootstrap image into the new volume

First of all, you need to retrieve the device name of the new volume on the new machine. This information can be retrieved using the fdisk command.

fdisk -l

Now, you can copy the Comodit Bootstrap image into the good device given by the fdisk command.

dd if=cirros.img.gz bs=1M | ssh root@\<instance_ip\> -i \<key\> "gunzip - | dd of=/dev/\<device\> bs=1M"

Where:

  • \<instance_ip> is the ip of the new Eucalyptus machine.
  • \<key> is the SSH private key file of the key pair associated to the instance.
  • \<device> is the destination device path.

Example

dd if=cirros.img.gz bs=1M | ssh root@37.58.66.209 -i gerard_dethier.pem "gunzip - | dd of=/dev/vdb bs=1M"

Detach the volume

Once the copy of the Comodit Bootstrap is complete, you can detach the volume.

euca-detach-volume <volume_id>

Where:

  • \<volume_id> is the ID of the new volume.

Example

euca-detach-volume vol-DF9642BD

Create a snapshot of your volume

When the volume is completely detached, you have to create a snapshot.

euca-create-snapshot <volume_id>

Where:

  • \<volume_id> is the ID of the new volume.

Example

euca-create-snapshot vol-DF9642BD

Register the Comodit Bootstrap image

Finally, you are ready to register the Comodit Bootstrap image!

euca-register -n <image_name> --root-device-name /dev/vda -b /dev/vda=<snapshot_id>

Where:

  • \<image_name> is the name you want for your Comodit Bootstrap image.
  • \<snapshot_id> is the ID of the created snapshot.

Example:

euca-register -n comodit-bootstrap --root-device-name /dev/vda -b /dev/vda=snap-1EDC42CF