Merge "Bug # 1205425 - Add Fedora image to basic install."

This commit is contained in:
Jenkins 2013-08-07 20:36:10 +00:00 committed by Gerrit Code Review
commit 2387fc040f
2 changed files with 83 additions and 58 deletions

View File

@ -4,69 +4,91 @@
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 the cloud environment with a catalog of virtual machine "templates". These templates are used as the basis
of instances. For example, if the catalog contains an image for an Ubuntu 12.04 distribution, cloud users can
launch Ubuntu 12.04 instances.
<orderedlist>
<listitem>
<para>Install the OpenStack Image packages: <screen os="ubuntu"><prompt>#</prompt> <userinput>apt-get install glance</userinput></screen>
<screen os="centos;rhel;fedora"><prompt>#</prompt> <userinput>yum install openstack-glance</userinput></screen>
</para>
</listitem>
<listitem>
<para>Configure OpenStack Image:</para>
<itemizedlist>
<listitem>
<para>Glance consists of two services: <literal>glance-api</literal> and <literal>glance-registry</literal>.
For a basic setup, they are configured identically, however, be aware that they provide two distinct services.</para>
<para>Edit <emphasis role="bold">/etc/glance/glance-api.conf</emphasis> and <emphasis role="bold">/etc/glance/glance-registry.conf</emphasis>:
<programlisting>[DEFAULT]
<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> image exists, you can use it to launch a
<phrase os="ubuntu">Ubuntu 12.04</phrase><phrase
os="centos;rhel;fedora">Fedora 19</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"><prompt>#</prompt> <userinput>apt-get install glance</userinput></screen>
<screen os="centos;rhel;fedora"><prompt>#</prompt> <userinput>yum install openstack-glance</userinput></screen></para>
</step>
<step>
<para>Configure the OpenStack Image Service, as
follows:</para>
<substeps>
<step>
<para>The OpenStack Image Service provides the
<literal>glance-api</literal> and
<literal>glance-registry</literal>
services. You configure these services
identically. However, be aware that each
provides a distinct service.</para>
<para>Edit <emphasis role="bold"
>/etc/glance/glance-api.conf</emphasis>
and <emphasis role="bold"
>/etc/glance/glance-registry.conf</emphasis>,
as follows:
<programlisting>[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>
</listitem>
<listitem>
<para>Restart both OpenStack Image services:
<screen os="ubuntu"><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 &amp;&amp; service openstack-glance-registry restart</userinput></screen>
<note>
<para>Check the <literal>/var/log/glance/*.log</literal> files for errors that would prevent
the Image Service from successfully starting.</para>
</note>
</para>
</listitem>
<listitem>
<para>Create the OpenStack Image tables in the database:
<screen><prompt>#</prompt> <userinput>glance-manage db_sync</userinput></screen></para>
</listitem>
<listitem>
<para os="ubuntu">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>Download and import 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>
</listitem>
<listitem>
<para>Check if the images have been introduced in the index:
<screen><prompt>#</prompt> <userinput>glance image-list</userinput>
<userinput>
+--------------------------------------+--------------+-------------+------------------+-----------+--------+
flavor=keystone </programlisting></para>
</step>
<step>
<para>Restart both services, as follows: <screen os="ubuntu"><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 &amp;&amp; service openstack-glance-registry restart</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>
<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">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"><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 |
+--------------------------------------+--------------+-------------+------------------+-----------+--------+</userinput></screen></para>
</listitem>
</itemizedlist>
</listitem>
</orderedlist>
</para>
+--------------------------------------+--------------+-------------+------------------+-----------+--------+</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>

View File

@ -83,10 +83,13 @@
<literal>qdhcp</literal>.</para>
</step>
<step>
<para>Run SSH inside the
<literal>qdhcp</literal> namespace. This example shows how to SSH to the ubuntu image uploaded earlier:
<para os="ubuntu">Run SSH inside the
<literal>qdhcp</literal> namespace. This example shows how to SSH to the Ubuntu image uploaded earlier:
<screen><prompt>#</prompt> <userinput>ip netns exec qdhcp-c73d082f-d7ed-4b53-ac93-7a6a4c3fa3aa ssh -i default_key ubuntu@10.5.5.2 </userinput></screen></para>
<para os="rhel;fedora;centos">Run SSH inside the
<literal>qdhcp</literal> namespace. This example shows how to SSH to the Fedora image uploaded earlier:
<screen><prompt>#</prompt> <userinput>ip netns exec qdhcp-c73d082f-d7ed-4b53-ac93-7a6a4c3fa3aa ssh -i default_key fedora@10.5.5.2 </userinput></screen></para>
</step>
<step><para>Once you have logged in as the ubuntu user with the keypair, you can create additional users and log out and back in with those credentials. If you are using the Cirros image, you can login with Cirros default credentials (username: <literal>cirros</literal>, password <literal>cubswin:)</literal>) and do not need the keypair.</para></step>
<step><para>Once you have logged in as the <phrase os="ubuntu">ubuntu</phrase><phrase os="rhel;fedora;centos">fedora</phrase> user with the keypair, you can create additional users and log out and back in with those credentials. If you are using the Cirros image, you can login with Cirros default credentials (username: <literal>cirros</literal>, password <literal>cubswin:)</literal>) and do not need the keypair.</para></step>
</procedure>
</chapter>