Logilab logo

Table Of Contents

Previous topic

Test your AMI

Next topic

Example variations

This Page

Manual upload to openstack (glance)

This procedure should not be necessary, the openstack client is functionnal and will be run, provided you include the relevant user data.

After the end of the creation process (nothing is mounted in /mnt/variation and you can see a .img, a kernel and a ramdisk in /mnt/output), you can upload your image to glance manually, provided you have credentials as a openrc.sh file downloaded from openstack.

  1. First, add your credentials to path (change ):
root@machine~# . /${correct_path}/openrc.sh
  1. Then, if necessary, define a name for your ami:
root@machine~# export ami_name=variation
  1. And change to the correct directory:
root@machine~# cd /mnt/output
  1. If necessary, upload the kernel and the ramdisk:
root@machine~# glance add is_public=false disk_format=aki container_format=aki \
name=${ami_name}_kernel < kernel_variation
root@machine~# glance add is_public=false disk_format=ari container_format=ari \
name=${ami_name}_ramdisk < ramdisk_variation
  1. Finally, upload the image after replacing the kernel_id and ramdisk_id according to the previous uploads:
root@machine~# glance add disk_format=ami container_format=ami name="${ami_name}" \
kernel_id=278de93c-5276-410f-a221-667cc1443cf8 \
ramdisk_id=b953e40a-2605-402b-8663-c8556a5899f2 < /mnt/variation.img

Manual upload to ec2

This procedure should not be necessary, the amazon ec2 client is functionnal and will be run, provided you include the relevant user data.

How to upload the ami you created on amazon manually (from):

  1. Create an EBS volume of the minimal size to host the disk image
  2. attach the created volume to salt-ami-cloud-builder:
  3. transfer the content of the image to the EBS volume (replace xvdf by correct device name):
ubuntu@machine:~$ sudo dd bs=16M if=/mnt/output/variation.img of=/dev/xvdf
  1. Detach the volume, take a snapshot, create an ami image from the amazon ec2 web interface. Make sure to use the correct “aki” (kernel image) as indicated on documentation (for eu, use aki-71665e05).