openstack-manuals/doc/install-guide/basic-install-files/basic-install_controller-glance.xml
Diane Fleming 64b6c9261e Folder rename, file rename, flattening of directories
Current folder name	New folder name	        Book title
----------------------------------------------------------
basic-install 	        DELETE
cli-guide	        DELETE
common	                common
NEW	                admin-guide-cloud	Cloud Administrators Guide
docbkx-example	        DELETE
openstack-block-storage-admin 	DELETE
openstack-compute-admin 	DELETE
openstack-config 	config-reference	OpenStack Configuration Reference
openstack-ha 	        high-availability-guide	OpenStack High Availabilty Guide
openstack-image	        image-guide	OpenStack Virtual Machine Image Guide
openstack-install 	install-guide	OpenStack Installation Guide
openstack-network-connectivity-admin 	admin-guide-network 	OpenStack Networking Administration Guide
openstack-object-storage-admin 	DELETE
openstack-security 	security-guide	OpenStack Security Guide
openstack-training 	training-guide	OpenStack Training Guide
openstack-user 	        user-guide	OpenStack End User Guide
openstack-user-admin 	user-guide-admin	OpenStack Admin User Guide
glossary	        NEW        	OpenStack Glossary

bug: #1220407

Change-Id: Id5ffc774b966ba7b9a591743a877aa10ab3094c7
author: diane fleming
2013-09-08 15:15:50 -07:00

115 lines
7.3 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="basic-install_controller-glance">
<title>OpenStack Image Service</title>
<para>The Image Service provides a catalog of virtual machine
images from which you can launch instances.</para>
<para>For example, if a <phrase os="ubuntu">Ubuntu
12.04</phrase><phrase os="centos;rhel;fedora">Fedora
19</phrase><phrase os="opensuse">openSUSE 12.3</phrase>
image exists, you can use it to launch a
<phrase os="ubuntu">Ubuntu 12.04</phrase><phrase
os="centos;rhel;fedora">Fedora 19</phrase>
<phrase os="opensuse">openSUSE 12.3</phrase>
instance.</para>
<procedure>
<title>To install and configure the OpenStack Image
Service</title>
<step>
<para>Install the OpenStack Image packages, as follows:
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>apt-get install glance</userinput></screen>
<screen os="centos;rhel;fedora"><prompt>#</prompt> <userinput>yum install openstack-glance</userinput></screen>
<screen os="opensuse"><prompt>#</prompt> <userinput>zypper install openstack-glance python-glanceclient</userinput></screen>
</para>
</step>
<step>
<para>Configure the OpenStack Image Service, as
follows:</para>
<substeps>
<step>
<para>The OpenStack Image Service provides the
<systemitem class="service">glance-api</systemitem> and
<systemitem class="service">glance-registry</systemitem>
services. You configure these services
identically. However, be aware that each
provides a distinct service.</para>
<para>Edit <filename>/etc/glance/glance-api.conf</filename>
and <filename>/etc/glance/glance-registry.conf</filename>,
as follows:
<programlisting language="ini">[DEFAULT]
sql_connection = mysql://glance:password@localhost/glance
[keystone_authtoken]
admin_tenant_name = service
admin_user = glance
admin_password = password
[paste_deploy]
flavor=keystone</programlisting></para>
</step>
<step>
<para>Restart both services, as follows:
<screen os="ubuntu;debian"><prompt>#</prompt> <userinput>service glance-api restart &amp;&amp; service glance-registry restart</userinput></screen>
<screen os="centos;rhel;fedora"><prompt>#</prompt> <userinput>service openstack-glance-api restart</userinput>
<prompt>#</prompt> <userinput>service openstack-glance-registry restart</userinput></screen>
<screen os="opensuse"><prompt>#</prompt> <userinput>systemctl restart openstack-glance-api</userinput>
<prompt>#</prompt> <userinput>systemctl restart openstack-glance-registry</userinput></screen>
<note>
<para>Check the
<literal>/var/log/glance/*.log</literal>
files for errors that cause the Image
Service to fail to start.</para>
</note>
</para>
</step>
<step os="opensuse">
<para>Enable both Glance services:
<screen><prompt>#</prompt> <userinput>systemctl enable openstack-glance-api openstack-glance-registry</userinput></screen>
</para>
</step>
<step>
<para>Create the OpenStack Image tables in the
database, as follows:
<screen><prompt>#</prompt> <userinput>glance-manage db_sync</userinput></screen></para>
</step>
<step>
<para os="ubuntu;debian">Download and import Ubuntu 12.04
LTS UEC image:
<screen><prompt>$</prompt> <userinput>wget http://uec-images.ubuntu.com/releases/12.04.2/release/ubuntu-\
12.04.2-server-cloudimg-amd64-disk1.img</userinput>
<prompt>$</prompt> <userinput>glance image-create --is-public true --disk-format qcow2 \
--container-format bare --name "Ubuntu" \
&lt; ubuntu-12.04.2-server-cloudimg-amd64-disk1.img</userinput></screen></para>
<para os="centos;rhel;fedora"> Download and import
the latest Fedora cloud image:
<screen><prompt>$</prompt> <userinput>wget http://cloud.fedoraproject.org/fedora-latest.x86_64.qcow2</userinput>
<prompt>#</prompt> <userinput>glance image-create --is-public true --disk-format qcow2 \
--container-format bare --name "Fedora" &lt; fedora-latest.x86_64.qcow2</userinput> </screen></para>
<para>Download and import the CirrOS QCOW2 Image:
<screen><prompt>$</prompt> <userinput>wget http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64\
-disk.img</userinput>
<prompt>$</prompt> <userinput>glance image-create --is-public true --disk-format qcow2 \
--container-format bare --name "CirrOS 0.3.1" \
&lt; cirros-0.3.1-x86_64-disk.img</userinput></screen>
</para>
</step>
<step>
<para>Check if the images have been introduced in
the index:
<screen os="ubuntu;debian"><prompt>$</prompt> <userinput>glance image-list</userinput></screen><screen os="ubuntu"><computeroutput>+--------------------------------------+--------------+-------------+------------------+-----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+--------------+-------------+------------------+-----------+--------+
| acafc7c0-40aa-4026-9673-b879898e1fc2 | CirrOS 0.3.1 | qcow2 | bare | 13147648 | active |
| 62f9278e-a26e-4fa0-9537-1eb503aa2f01 | Ubuntu | qcow2 | bare | 251985920 | active |
+--------------------------------------+--------------+-------------+------------------+-----------+--------+</computeroutput></screen><screen os="centos;rhel;fedora"><prompt>$</prompt> <userinput>glance image-list</userinput></screen><screen os="centos;rhel;fedora"><computeroutput>+--------------------------------------+--------------+-------------+------------------+-----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+--------------+-------------+------------------+-----------+--------+
| acafc7c0-40aa-4026-9673-b879898e1fc2 | CirrOS 0.3.1 | qcow2 | bare | 13147648 | active |
| 62f9278e-a26e-4fa0-9537-1eb503aa2f01 | Fedora | qcow2 | bare | 237371392 | active |
+--------------------------------------+--------------+-------------+------------------+-----------+--------+</computeroutput></screen></para>
</step>
</substeps>
</step>
</procedure>
</section>