After Deprec

openstack_cloud_computing_cookbook

Issue link: https://read.uberflip.com/i/1334488

Contents of this Issue

Navigation

Page 158 of 317

Glance OpenStack Image Service 148 How to do it... We can upload and view images in OpenStack Image Service in a number of ways. Carry out the following steps to upload and show details of our uploaded images: Uploading Ubuntu images To upload tarball cloud bundles using glance through the cloud-publish-tarball command, we can do the following, using the glance client: 1. First, we download an Ubuntu cloud image from ubuntu.com, as follows: wget http://cloud-images.ubuntu.com/releases/precise/release/ ubuntu-12.04-server-cloudimg-i386.tar.gz 2. We then unpack this using the following command: tar zvxf ubuntu-12.04-server-cloudimg-i386.tar.gz 3. We can now upload the kernel from the tarball into glance, specifying a name for this kernel, as follows: # Source in our OpenStack Credentials . keystonerc # Upload the kernel (and store ID) KERNEL=$(glance add name='Ubuntu 12.04 i386 Kernel' disk_format=aki container_format=aki distro='Ubuntu' is_ public=true < precise-server-cloudimg-i386-vmlinuz-virtual | awk '/ ID/ { print $6 }') 4. We then use the kernel ID that we have stored in KERNEL, to upload our machine image, as follows: # Upload Machine Image glance add name='Ubuntu 12.04 i386 Server' disk_format=ami container_format=ami distro='Ubuntu' kernel_id=$KERNEL is_ public=true < precise-server-cloudimg-i386.img You will see output similar to the following: Uploading image 'Ubuntu 12.04 i386 Server' ========================[100%] 6.68M/s, ETA 0h 0m 0s Added new image with ID: 469460b0-464d-43f8-810d-ce1c919b25e9 Listing images To list the images in our OpenStack Image Service repository, we can use the familiar euca-describe-images or nova image-list commands from our client, as using OpenStack Image Service doesn't change how we access our cloud environment. However, to get detailed information, we use the glance tool. www.it-ebooks.info

Articles in this issue

Links on this page

Archives of this issue

view archives of After Deprec - openstack_cloud_computing_cookbook