Issue link: https://read.uberflip.com/i/1334488
Chapter 1 23 Uploading a sample machine image Now that we have a running OpenStack Compute environment, it's time to upload an image for us to use. An image is a machine template, which is cloned when we spin up new cloud instances. Images used in Amazon, known as AMIs (or Amazon Machine Images) can often be used in OpenStack. For this next section, we will use an Ubuntu Enterprise Cloud image, which can be used in both Amazon and our OpenStack Compute cloud instance. Getting ready These steps are to be carried out on your Ubuntu machine under the user that has access to your OpenStack Compute environment credentials (as created in the Installation of command-line tools recipe). Ensure you have sourced your OpenStack Compute environment credentials as follows: cd ~/openstack . novarc How to do it... To upload an image into our OpenStack Compute environment, we perform the following steps: 1. We first download the Ubuntu UEC Cloud Image from ubuntu.com: wget http://uec-images.ubuntu.com/releases/precise/release/ubuntu- 12.04-server-cloudimg-i386.tar.gz 2. Once downloaded, we need to install the cloud-utils package that provides tools to upload images to our OpenStack Compute environment: sudo apt-get update sudo apt-get -y install cloud-utils 3. We can then proceed to upload this to our OpenStack Compute installation using the cloud-publish-tarball command provided by the cloud-utils package. cloud-publish-tarball ubuntu-12.04-server-cloudimg-i386.tar.gz images i386 www.it-ebooks.info

