011ee845d9
Change-Id: I03a8826aac4a989175c82bdb3868890c79748054
98 lines
5.1 KiB
XML
98 lines
5.1 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<section 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"
|
|
xml:id="glance-verify">
|
|
<title>Verify operation</title>
|
|
<para>Verify operation of the Image service using
|
|
<link xlink:href="http://launchpad.net/cirros">CirrOS</link>, a small
|
|
Linux image that helps you test your OpenStack deployment.</para>
|
|
<para>For more information about how to download and build images,
|
|
see <link
|
|
xlink:href="http://docs.openstack.org/image-guide/content/index.html"
|
|
><citetitle>OpenStack Virtual Machine Image
|
|
Guide</citetitle></link>. For information about how to manage
|
|
images, see the <link
|
|
xlink:href="http://docs.openstack.org/user-guide/index.html"
|
|
><citetitle>OpenStack User Guide</citetitle></link>.</para>
|
|
<procedure>
|
|
<step>
|
|
<para>In each client environment script, configure the Image service
|
|
client to use API version 2.0:</para>
|
|
<screen><prompt>$</prompt> <userinput>echo "export OS_IMAGE_API_VERSION=2" | tee -a admin-openrc.sh demo-openrc.sh</userinput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Source the <literal>admin</literal> credentials to gain access to
|
|
admin-only CLI commands:</para>
|
|
<screen><prompt>$</prompt> <userinput>source admin-openrc.sh</userinput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Create a temporary local directory:</para>
|
|
<screen><prompt>$</prompt> <userinput>mkdir /tmp/images</userinput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Download the source image into it:</para>
|
|
<screen><prompt>$</prompt> <userinput>wget -P /tmp/images http://cdn.download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img</userinput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Upload the image to the Image service using the
|
|
<glossterm baseform="QEMU Copy On Write 2 (QCOW2)">QCOW2</glossterm>
|
|
disk format, <glossterm>bare</glossterm> container format, and
|
|
public visibility so all projects can access it:</para>
|
|
<screen><prompt>$</prompt> <userinput>glance image-create --name "cirros-0.3.3-x86_64" --file /tmp/images/cirros-0.3.3-x86_64-disk.img \
|
|
--disk-format qcow2 --container-format bare --visibility public --progress</userinput>
|
|
<computeroutput>[=============================>] 100%
|
|
+------------------+--------------------------------------+
|
|
| Property | Value |
|
|
+------------------+--------------------------------------+
|
|
| checksum | 133eae9fb1c98f45894a4e60d8736619 |
|
|
| container_format | bare |
|
|
| created_at | 2015-03-26T16:52:10Z |
|
|
| disk_format | qcow2 |
|
|
| id | 38047887-61a7-41ea-9b49-27987d5e8bb9 |
|
|
| min_disk | 0 |
|
|
| min_ram | 0 |
|
|
| name | cirros-0.3.3-x86_64 |
|
|
| owner | ae7a98326b9c455588edd2656d723b9d |
|
|
| protected | False |
|
|
| size | 13200896 |
|
|
| status | active |
|
|
| tags | [] |
|
|
| updated_at | 2015-03-26T16:52:10Z |
|
|
| virtual_size | None |
|
|
| visibility | public |
|
|
+------------------+--------------------------------------+</computeroutput></screen>
|
|
<para>For information about the <command>glance image-create</command>
|
|
parameters, see <link
|
|
xlink:href="http://docs.openstack.org/cli-reference/content/glanceclient_commands.html#glanceclient_subcommand_image-create"
|
|
>Image service command-line client</link> in the
|
|
<citetitle>OpenStack Command-Line Interface
|
|
Reference</citetitle>.</para>
|
|
<para>For information about disk and container formats for
|
|
images, see <link
|
|
xlink:href="http://docs.openstack.org/image-guide/content/image-formats.html"
|
|
>Disk and container formats for images</link> in the
|
|
<citetitle>OpenStack Virtual Machine Image Guide</citetitle>.</para>
|
|
<note>
|
|
<para>OpenStack generates IDs dynamically, so you will see
|
|
different values in the example command output.</para>
|
|
</note>
|
|
</step>
|
|
<step>
|
|
<para>Confirm upload of the image and validate
|
|
attributes:</para>
|
|
<screen><prompt>$</prompt> <userinput>glance image-list</userinput>
|
|
<computeroutput>+--------------------------------------+---------------------+
|
|
| ID | Name |
|
|
+--------------------------------------+---------------------+
|
|
| 38047887-61a7-41ea-9b49-27987d5e8bb9 | cirros-0.3.3-x86_64 |
|
|
+--------------------------------------+---------------------+</computeroutput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Remove the temporary local directory and source image:</para>
|
|
<screen><prompt>$</prompt> <userinput>rm -r /tmp/images</userinput></screen>
|
|
</step>
|
|
</procedure>
|
|
</section>
|