Updated image example to cirros, add boot section

Updated the section on uploading images to use the newer CirrOS images rather
than the old ttylinux image.

Added a section on booting an instance from the command-line.

Removed images-uploading.xml since it seems to be unused.

Change-Id: Ib05b0b8c12c56c21feb2b7e043cf65f52a62a67c
This commit is contained in:
Lorin Hochstein
2012-05-26 21:01:27 -04:00
parent f59c553647
commit a83920bfc0
4 changed files with 346 additions and 94 deletions

View File

@@ -202,6 +202,7 @@
<xi:include href="ch_installidentity.xml"/>
<xi:include href="ch_installcomputeimage.xml"/>
<xi:include href="ch_images-uploading.xml"/>
<xi:include href="ch_instances-running.xml"/>
<xi:include href="ch_installobjectstorage.xml"/>
<xi:include href="ch_installdashboard.xml"/>
<xi:include href="ap_configuration_files.xml"/>

View File

@@ -1,65 +1,112 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter 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. Images downloaded from
cloud-images.ubuntu.com have a username of ubuntu. More
detailed information about how to obtain and create images can
be found in the <link xlink:href="http://docs.openstack.org"
>OpenStack Compute Administration Guide</link> in the
"Image Management" chapter.</para>
<para>Create a directory to house your image files.</para>
<chapter 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>Registering Virtual Machine Images</title>
<para>To test your deployment, download some virtual machine images that are known to work with
OpenStack. CirrOS is a small test image that is often used for testing OpenStack
deployments. You can find the most recent CirrOS image on the <link
xlink:href="https://launchpad.net/cirros">CirrOS Launchpad home page</link> under
"Downloads". As of this writing the most recent image is version 0.3.0. A 64-bit version in
QCOW2 format (compatible with KVM or QEMU hypervisors) can be downloaded at <link
xlink:href="https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img"
>https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img</link>.
Once you launch the image, log in with the following credentials:<itemizedlist>
<listitem>
<para>Username: <literal>cirros</literal></para>
</listitem>
<listitem>
<para>Password: <literal>cubswin:)</literal></para>
</listitem>
</itemizedlist></para>
<para>The 64-bit CirrOS QCOW2 image is the image we'll use for this walkthrough. More detailed
information about how to obtain and create images can be found in the <link
xlink:href="http://docs.openstack.org">OpenStack Compute Administration Guide</link> in
the "Image Management" chapter.</para>
<para>Create a directory called <filename>stackimages</filename> to house your image
files:</para>
<para>
<literallayout class="monospaced">sudo mkdir stackimages</literallayout>
<screen><prompt>$</prompt> <userinput>mkdir stackimages</userinput></screen>
</para>
<para>Download the tty image into your stackimages directory.</para>
<para>Download the CirrOS image into your <filename>stackimages</filename> directory.</para>
<para>
<literallayout class="monospaced">sudo wget -c http://images.ansolabs.com/tty.tgz -O stackimages/tty.tgz</literallayout>
<screen><prompt>$</prompt> <userinput>wget -c https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img -O stackimages/cirros.img</userinput></screen>
</para>
<para>Now expand the image.</para>
<literallayout class="monospaced">sudo tar -zxf stackimages/tty.tgz -C stackimages</literallayout>
<para>You can get a token in order to upload images using this
curl command. </para>
<para>Verify that your <command>glance</command> client can access the Image service by
requesting a list of installed
images:<screen><prompt>$</prompt> <userinput>glance index</userinput>
<computeroutput>ID Name Disk Format Container Format Size
------------------------------------ ------------------------------ -------------------- -------------------- --------------
</computeroutput></screen></para>
<para>If you get the following error, make sure that the environment variables set in
<filename>~/openrc</filename>
<screen><computeroutput>Failed to show index. Got error:
You are not authenticated.
Details: 401 Unauthorized
This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
Authentication required </computeroutput></screen></para>
<para>Add the CirrOS image to the Image service using the <command>glance add</command> command,
passing the image file through standard input:</para>
<para>
<literallayout class="monospaced">curl -d '{"auth": {"tenantName": "openstackDemo", "passwordCredentials":{"username": "adminUser", "password": "secretword"}}}' -H "Content-type: application/json" http://192.168.206.130:35357/v2.0/tokens | python -mjson.tool</literallayout>
<screen><prompt>$</prompt> <userinput>glance add name=cirros-0.3.0-x86_64 disk_format=qcow2 container_format=bare &lt; stackimages/cirros.img</userinput>
<computeroutput>Added new image with ID: f4addd24-4e8a-46bb-b15d-fae2591f1a35</computeroutput></screen>
</para>
<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 values in the third command, but for additional
images, you need to get the return values for the first two
commands to enter into the third command. </para>
<para>
<literallayout class="monospaced">glance add -A d1819479-be8b-451d-8682-82c654502ddb name="tty-kernel" is_public=true container_format=aki disk_format=aki &lt; stackimages/aki-tty/image
glance add -A d1819479-be8b-451d-8682-82c654502ddb name="tty-ramdisk" is_public=true container_format=ari disk_format=ari &lt; stackimages/ari-tty/image
glance add -A d1819479-be8b-451d-8682-82c654502ddb name="tty" is_public=true container_format=ami disk_format=ami kernel_id=1 ramdisk_id=2 &lt; stackimages/ami-tty/image </literallayout>
<note>
<para>The returned image ID is generated dynamically, and therefore will be different on
your deployment than in this example.</para>
</note>
</para>
<para>For other images, you can get Ubuntu Oneiric (11.10) at
http://cloud-images.ubuntu.com/oneiric/current/oneiric-server-cloudimg-amd64-disk1.img. </para>
<para>You can ensure that your Image service has indexed these
images by using the glance CLI with an authorization
token:</para>
<literallayout class="monospaced">glance -A c9640d83-ef4f-4718-a0c2-32437a931196 index</literallayout>
<para>In return you should see a listing of images. Here's an
example.</para>
<literallayout class="monospaced">
ID Name Disk Format Container Format Size
---------------- ------------------------------ -------------------- -------------------- --------------
3 tty ami ami 25165824
2 tty-ramdisk ari ari 5882349
1 tty-kernel aki aki 4404752
</literallayout>
<para>If you see an ECONNREFUSED error or "NotAuthenticated: You
are not authenticated" message in return, it means one of your
glance-*.conf files is incorrectly configured. Double-check
and compare to the files listed in the Appendix. If you get a
401 Unauthorized error, check your environment
variables.</para>
<para>The rationale for the arguments is:<variablelist>
<varlistentry>
<term><literal>name=cirros-0.3.0-x86_64</literal></term>
<listitem>
<para>The <literal>name</literal> field is an arbitrary label. In this example
the name encodes the distribution, version, and architecture:
<literal>cirros-0.3.0-x864_64</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>disk_format=qcow2</literal></term>
<listitem>
<para>The <literal>disk_format</literal> field specifies the format of the image
file. In this case, the image file format is QCOW2, which can be verified
using the <command>file</command>
command:<screen><prompt>$</prompt> <userinput>file <userinput>stackimages/cirros.img</userinput>
<computeroutput>stackimages/cirros.img: QEMU QCOW Image (v2), 41126400 bytes</computeroutput></userinput></screen></para>
<para>Other valid formats are <literal>raw</literal>, <literal>vhd</literal>,
<literal>vmdk</literal>, <literal>vdi</literal>, <literal>iso</literal>,
<literal>aki</literal>, <literal>ari</literal> and
<literal>ami</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>container_format=bare</literal></term>
<listitem>
<para>The <literal>container_format</literal> field is required by the
<command>glance add</command> command but isn't actually used by any of
the OpenStack services, so the value . We specify <literal>bare</literal> to
indicate that the image file is not in a file format that contains metadata
about the virtual machine.</para>
<para>Because the value is not used anywhere, it safe to always specify
<literal>bare</literal> as the container format, although the command
will accept other formats: <literal>ovf</literal>, <literal>aki</literal>,
<literal>ari</literal>, <literal>ami</literal>.</para>
</listitem>
</varlistentry>
</variablelist>Confirm it was uploaded by listing the images in the Image
service:<screen><prompt>$</prompt> <userinput>glance index</userinput>
<computeroutput>$ glance index
ID Name Disk Format Container Format Size
------------------------------------ ------------------------------ -------------------- -------------------- --------------
f4addd24-4e8a-46bb-b15d-fae2591f1a35 cirros-0.3.0-x86_64 qcow2 bare 9761280</computeroutput></screen></para>
<para>The <command>nova image-list</command> command will also list the images in the Image
service:<screen><prompt>$</prompt> <userinput>nova image-list</userinput>
<computeroutput>+--------------------------------------+----------------------------------------+--------+--------------------------------------+
| ID | Name | Status | Server |
+--------------------------------------+----------------------------------------+--------+--------------------------------------+
| f4addd24-4e8a-46bb-b15d-fae2591f1a35 | cirros-0.3.0-x86_64 | ACTIVE | |
+--------------------------------------+----------------------------------------+--------+--------------------------------------+</computeroutput></screen></para>
</chapter>

View File

@@ -0,0 +1,243 @@
<?xml version="1.0" encoding="UTF-8"?>
<chapter xml:id="running-an-instance" 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">
<?dbhtml stop-chunking?>
<title>Running Virtual Machine Instances</title>
<section xml:id="security-groups">
<title>Security groups: Enabling SSH and ICMP (ping)</title>
<para>The Compute service uses the concept of security groups to control what network protocols
(TCP, UDP, ICMP), ports, and IP addresses are permitted to access instances. Each tenant
manages its own list of security groups and starts off with a security group called
<literal>default</literal>. If no security group is specified upon boot, the virtual
machine will be associated with the <literal>default</literal> security group. </para>
<para>Security groups can be listed by the <command>nova secgroup-list</command>
command.<screen><prompt>$</prompt> <userinput>nova secgroup-list</userinput><computeroutput>
+---------+-------------+
| Name | Description |
+---------+-------------+
| default | default |
+---------+-------------+</computeroutput></screen></para>
<para>In this example, we will use the nova <command>secgroup-add-rule</command> command to
enable access to TCP port 22 (so we can SSH to instances) Allow access to port 22 from all
IP addresses (specified in CIDR notation as <literal>0.0.0.0/0</literal>) with the following
command:<screen><prompt>$</prompt> <userinput>nova secgroup-add-rule default tcp 22 22 0.0.0.0/0</userinput></screen></para>
<para>When specifying rules for TCP and UDP protocols, you may specify a range of port
consecutive addresses in a single rule (e.g., from port <literal>5901</literal> to port
<literal>5999</literal>). In this case, only a single port is being enabled, so we
specify the start port as <literal>22</literal> and the end port as
<literal>22</literal>.</para>
<para>To be able to ping virtual machine instances, you must specify a rule to allow ICMP
traffic. When specifying ICMP rules, instead of specifying a begin and end port, you
specify a pemitted ICMP code and ICMP type. You can also specify <literal>-1</literal>
for the code to enable all codes and <literal>-1</literal> for the type to enable all
ICMP types. Allow access to all codes and types of ICMP traffic from all IP addresses
with the following command:</para>
<para>
<screen><prompt>$</prompt> <userinput>nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0</userinput></screen>
</para>
</section>
<section xml:id="keypair">
<title>Adding a keypair</title>
<para>The Compute service can inject an SSH public key into an account on the instance, assuming
the virtual machine image being used supports this. To add a keypair to the Compute
service, use the <command>nova keypair-add</command> command. This command can be used
to either generate a new keypair, or to upload an existing public key. The following
example uploads an existing public key, located at
<filename>~/.ssh/id_rsa.pub</filename>, and gives the keypair the name
<literal>mykey</literal>.<screen><prompt>$</prompt> nova keypair-add --pub_key ~/.ssh/id_rsa.pub mykey</screen></para>
<para>List the keypairs by
doing:<screen><prompt>$</prompt> <userinput>nova keypair-list</userinput>
<computeroutput>+-------+-------------------------------------------------+
| Name | Fingerprint |
| mykey | c3:d2:b5:d3:ec:4a:29:b0:22:32:6e:34:dd:91:f9:cf |
+-------+-------------------------------------------------+</computeroutput></screen></para>
<para>Confirm that the uploaded keypair matches your local key by checking your key's
fingerprint with the <command>ssh-keygen</command>
command:<screen><prompt>$</prompt> <userinput>ssh-keygen -l -f ~/.ssh/id_rsa.pub</userinput>
<computeroutput>2048 c3:d2:b5:d3:ec:4a:29:b0:22:32:6e:34:dd:91:f9:cf /home/myaccount/.ssh/id_rsa.pub (RSA)</computeroutput></screen></para>
</section>
<section xml:id="all-services-running">
<title>Confirm all services running</title>
<para>Before trying to start an instance, confirm that all of the necessary services are
running, in particular:<variablelist>
<varlistentry>
<term><systemitem class="service">nova-api</systemitem></term>
<listitem>
<para>The <systemitem class="service">nova-api</systemitem> service must be
running to respond to the request to boot an instance, as well as to
serve as the metadata server so that the instance can retrieve the
public key uploaded i a previous section. If the <command>nova</command>
commands in the previous section succeeded, then the service is
running.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><systemitem class="service">nova-scheduler</systemitem></term>
<listitem>
<para>The <systemitem class="service">nova-scheduler</systemitem> service must be running in order to dispatch
requests for a new virtual machine instance to a host running the
<systemitem class="service">nova-compute</systemitem> service that has sufficient resources.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><systemitem class="service">nova-compute</systemitem></term>
<listitem>
<para>The <systemitem class="service">nova-compute</systemitem> service must
be running in order to interact with the hypervisor to bring up a
virtual machine instance.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><systemitem class="service">nova-network</systemitem></term>
<listitem>
<para>The <systemitem class="service">nova-network</systemitem> service must
be running in order to perform networking tasks such as assigning an IP
address to the virtual machine instance and implementing the security
group rules.</para>
</listitem>
</varlistentry>
</variablelist></para>
<para>The <command>nova-manage service list</command> command can be used to confirm that
these services are running properly.<note>
<para>The <command>nova-manage service list</command> command does not indicate
whether the <systemitem class="service">nova-api</systemitem> service is
running.</para>
</note></para>
<para>As
root:<screen><prompt>#</prompt> <userinput>nova-manage service list</userinput>
<computeroutput>Binary Host Zone Status State Updated_At
nova-compute myhost-1 nova enabled :-) 2012-05-27 12:36:35
nova-network myhost-1 nova enabled :-) 2012-05-27 12:36:28
nova-scheduler myhost-1 nova enabled :-) 2012-05-27 12:36:33</computeroutput></screen></para>
<para>If any of the services are missing in your configuration, or the
<literal>State</literal> column does not show a smiley face, then your Compute
service will not be able to launch an instance.</para>
</section>
<section xml:id="starting-an-instance">
<title>Starting an instance</title>
<para>To start an instance, we need to specify a <emphasis role="italic">flavor</emphasis>,
also known as an <emphasis role="italic">instance type</emphasis>, which indicates the
size of an instance. Use the <command>nova flavor-list</command> command to view the
list of available
flavors:<screen><prompt>$</prompt> <userinput>nova flavor-list</userinput>
<computeroutput>+----+-----------+-----------+------+-----------+------+-------+-------------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor |
+----+-----------+-----------+------+-----------+------+-------+-------------+
| 1 | m1.tiny | 512 | 0 | 0 | | 1 | 1.0 |
| 2 | m1.small | 2048 | 15 | 15 | | 1 | 1.0 |
| 3 | m1.medium | 4096 | 25 | 25 | | 2 | 1.0 |
| 4 | m1.large | 8192 | 45 | 45 | | 4 | 1.0 |
| 5 | m1.xlarge | 16384 | 85 | 85 | | 8 | 1.0 |
+----+-----------+-----------+------+-----------+------+-------+-------------+</computeroutput></screen></para>
<para>We also need to specify the image. Use the <command>nova image-list</command> to
retrieve the ID of the CirrOS
image.<screen><prompt>$</prompt> <userinput>nova image-list</userinput>
<computeroutput>+--------------------------------------+----------------------------------------+--------+--------------------------------------+
| ID | Name | Status | Server |
+--------------------------------------+----------------------------------------+--------+--------------------------------------+
| f4addd24-4e8a-46bb-b15d-fae2591f1a35 | cirros-0.3.0-x86_64 | ACTIVE | |
+--------------------------------------+----------------------------------------+--------+--------------------------------------+</computeroutput></screen></para>
<para>Use the <literal>nova boot</literal> command to launch a new virtual machine instance.
We'll use an <literal>m1.small</literal> instance in this example, using the CirrOS
image, and the <literal>mykey</literal> keypair we added. We also need to give this
virtual machine instance a name, we'll call it <literal>cirros</literal>. We will
explicitly specify the <literal>default</literal> security group in this example,
although this isn't strictly necessary since the <literal>default</literal> group will
be used if no security group is
specified.<screen><prompt>$</prompt> <userinput>nova boot --flavor 2 --image <replaceable>f4addd24-4e8a-46bb-b15d-fae2591f1a35</replaceable> --key_name mykey --security_group default cirros</userinput>
<computeroutput>+-------------------------------------+----------------------------------------------------------+
| Property | Value |
+-------------------------------------+----------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-SRV-ATTR:host | host-1 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | None |
| OS-EXT-SRV-ATTR:instance_name | instance-00000001 |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | RG3W2bpZDbCo |
| config_drive | |
| created | 2012-05-27T13:00:33Z |
| flavor | m1.small |
| hostId | a2fd457e034c030506bac5c790c38d9519ea7a03b6861474a712c6b7 |
| id | c6bbbf26-b40a-47e7-8d5c-eb17bf65c485 |
| image | cirros-0.3.0-x86_64 |
| key_name | mykey |
| metadata | {} |
| name | cirros |
| progress | 0 |
| status | BUILD |
| tenant_id | b5815b046cfe47bb891a7b64119e7f80 |
| updated | 2012-05-27T13:00:33Z |
| user_id | a4c2d43f80a549a19864c89d759bb3fe |
+-------------------------------------+----------------------------------------------------------+</computeroutput></screen></para>
<para>Check the progress of the instance with the <command>nova list</command> command. When
the instance has booted, the command output will look something
like:<screen><prompt>$</prompt> <userinput>nova list</userinput>
+--------------------------------------+-----------------------+--------+------------------------------------------+
| ID | Name | Status | Networks |
+--------------------------------------+-----------------------+--------+------------------------------------------+
| c6bbbf26-b40a-47e7-8d5c-eb17bf65c485 | cirros | ACTIVE | private=192.168.100.5 |
+--------------------------------------+-----------------------+--------+------------------------------------------+</screen></para>
<para>You can view the boot messages of the instances using the <command>nova
console-log</command>
command:<screen><prompt>$</prompt> <userinput>nova console-log</userinput>
<computeroutput>...
Starting network...
udhcpc (v1.18.5) started
Sending discover...
Sending select for 192.168.100.5...
Lease of 192.168.100.5 obtained, lease time 120
deleting routers
route: SIOCDELRT: No such process
adding dns 192.168.100.4
cloud-setup: checking http://169.254.169.254/2009-04-04/meta-data/instance-id
cloud-setup: successful after 1/30 tries: up 1.45. iid=i-00000001
Starting dropbear sshd: generating rsa key... generating dsa key... OK
===== cloud-final: system completely up in 1.77 seconds ====
instance-id: i-00000001
public-ipv4:
local-ipv4 : 192.168.100.5
cloud-userdata: user data not a script
____ ____ ____
/ __/ __ ____ ____ / __ \/ __/
/ /__ / // __// __// /_/ /\ \
\___//_//_/ /_/ \____/___/
http://launchpad.net/cirros
login as 'cirros' user. default password: 'cubswin:)'. use 'sudo' for root.
cirros login: </computeroutput></screen></para>
<para>You should be able to ping your instance:</para>
<para>
<screen><prompt>$</prompt> <userinput>ping -c5 192.168.100.5</userinput>
<computeroutput>PING 192.168.100.5 (192.168.100.5) 56(84) bytes of data.
64 bytes from 192.168.100.5: icmp_req=1 ttl=64 time=0.270 ms
64 bytes from 192.168.100.5: icmp_req=2 ttl=64 time=0.228 ms
64 bytes from 192.168.100.5: icmp_req=3 ttl=64 time=0.244 ms
64 bytes from 192.168.100.5: icmp_req=4 ttl=64 time=0.203 ms
64 bytes from 192.168.100.5: icmp_req=5 ttl=64 time=0.210 ms
--- 192.168.100.5 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.203/0.231/0.270/0.024 ms</computeroutput></screen>
</para>
<para>You should be able to ssh to your instance as the <literal>cirros</literal> user,
using either the ssh keypair you uploaded or using the password
<literal>cubswin:)</literal><screen>$ ssh cirros@192.168.100.5
<computeroutput>The authenticity of host '192.168.100.5 (192.168.100.5)' can't be established.
RSA key fingerprint is c2:0a:95:d4:e7:e1:a6:a2:6a:99:4d:b8:f9:66:13:64.</computeroutput>
<prompt>Are you sure you want to continue connecting (yes/no)?</prompt> <userinput>yes</userinput>
<computeroutput>Warning: Permanently added '192.168.100.5' (RSA) to the list of known hosts.</computeroutput>
<prompt>cirros@192.168.100.5's password: </prompt><userinput>cubswin:)</userinput>
<prompt>$</prompt></screen></para>
</section>
<section xml:id="bring-down-instance">
<title>Bringing down an instance</title>
<para>Bring down your instance using the <command>nova delete</command>
command:<screen><prompt>$</prompt> <userinput>nova delete c6bbbf26-b40a-47e7-8d5c-eb17bf65c485</userinput></screen></para>
</section>
</chapter>

View File

@@ -1,39 +0,0 @@
<?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>