openstack-manuals/doc/src/docbkx/openstack-install/images-uploading.xml

40 lines
2.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<section xml:id="uploading-to-glance"
xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<title>Uploading Images</title>
<para>First, download some images that are known to work with
OpenStack. The smallest test image is a tty testing image
with a username/password of root/password. You can get it
from http://images.ansolabs.com/tty.tgz. This is the image
we'll use for this walkthrough.</para>
<para>Create a directory to house your images.</para>
<para>
<literallayout class="monospaced">sudo mkdir stackimages</literallayout>
</para>
<para>Download the tty image into your stackimages
directory.</para>
<para>
<literallayout class="monospaced">sudo wget -c http://images.ansolabs.com/tty.tgz -O stackimages/tty.tgz</literallayout>
</para>
<para>Now expand the image.</para>
<literallayout class="monospaced">sudo tar -zxf stackimages/tty.tgz -C stackimages</literallayout>
<para>Now add the kernel image to the Image Service with glance
add commands. In this case we're hard-coding the kernel_id and
ramdisk_id but you need to get the return values for the first
two commands to enter into the third command. We're also not
using any authentication for these images to they are all
going to be public images.</para>
<para>
<literallayout>glance add name="tty-kernel" is_public=true container_format=aki disk_format=aki &lt; stackimages/aki-tty/image
glance add name="tty-ramdisk" is_public=true container_format=ari disk_format=ari &lt; stackimages/ari-tty/image
glance add name="tty" is_public=true container_format=ami disk_format=ami kernel_id=1 ramdisk_id=2 &lt; stackimages/ami-tty/image </literallayout>
</para>
<para>For other images, you can get Ubuntu Natty (11.04) from
http://uec-images.ubuntu.com/natty/current/natty-server-cloudimg-amd64.tar.gz
and Ubuntu Oneiric (11.10) at
http://uec-images.ubuntu.com/oneiric/current/oneiric-server-cloudimg-amd64.tar.gz. </para>
</section>