Modify glance content for Kilo

Modify glance content for Kilo as follows:

1) Change python-keystoneclient with python-openstackclient.

2) Adjust CLI input and output for API version 2.

3) Add value to log_file option.

4) Remove version from value of auth_uri option.

Change-Id: Ia0f88473b4600580c34c8a4b1664b86435c7bf06
Implements: blueprint installguide-kilo
This commit is contained in:
Matthew Kassawara
2015-03-26 14:11:43 -05:00
parent 337c0ab79f
commit 6e3f0c8edb
2 changed files with 100 additions and 75 deletions

View File

@@ -55,65 +55,76 @@
<substeps> <substeps>
<step> <step>
<para>Create the <literal>glance</literal> user:</para> <para>Create the <literal>glance</literal> user:</para>
<screen><prompt>$</prompt> <userinput>keystone user-create --name glance --pass <replaceable>GLANCE_PASS</replaceable></userinput> <screen><prompt>$</prompt> <userinput>openstack user create --password-prompt glance</userinput>
<computeroutput>+----------+----------------------------------+ <computeroutput>User Password:
| Property | Value | Repeat User Password:
+----------+----------------------------------+ +----------+----------------------------------+
| email | | | Field | Value |
| enabled | True | +----------+----------------------------------+
| id | f89cca5865dc42b18e2421fa5f5cce66 | | email | None |
| name | glance | | enabled | True |
| username | glance | | id | 1dc206e084334db2bee88363745da014 |
| name | glance |
| username | glance |
+----------+----------------------------------+</computeroutput></screen> +----------+----------------------------------+</computeroutput></screen>
<para>Replace <replaceable>GLANCE_PASS</replaceable> with a suitable
password.</para>
</step> </step>
<step> <step>
<para>Add the <literal>admin</literal> role to the <para>Add the <literal>admin</literal> role to the
<literal>glance</literal> user:</para> <literal>glance</literal> user and <literal>service</literal>
<screen><prompt>$</prompt> <userinput>keystone user-role-add --user glance --tenant service --role admin</userinput></screen> project:</para>
<note> <screen><prompt>$</prompt> <userinput>openstack role add --project service --user glance admin</userinput>
<para>This command provides no output.</para> <computeroutput>+-------+----------------------------------+
</note> | Field | Value |
+-------+----------------------------------+
| id | 1169d778631b4fd1aefd9d35314e1c56 |
| name | admin |
+-------+----------------------------------+</computeroutput></screen>
</step> </step>
<step> <step>
<para>Create the <literal>glance</literal> service entity:</para> <para>Create the <literal>glance</literal> service entity:</para>
<screen><prompt>$</prompt> <userinput>keystone service-create --name glance --type image \ <screen><prompt>$</prompt> <userinput>openstack service create --type image \
--description "OpenStack Image Service"</userinput> --description "OpenStack Image Service" glance</userinput>
<computeroutput>+-------------+----------------------------------+ <computeroutput>+-------------+----------------------------------+
| Property | Value | | Field | Value |
+-------------+----------------------------------+ +-------------+----------------------------------+
| description | OpenStack Image Service | | description | OpenStack Image Service |
| enabled | True | | enabled | True |
| id | 23f409c4e79f4c9e9d23d809c50fbacf | | id | 178124d6081c441b80d79972614149c6 |
| name | glance | | name | glance |
| type | image | | type | image |
+-------------+----------------------------------+</computeroutput></screen> +-------------+----------------------------------+</computeroutput></screen>
</step> </step>
</substeps> </substeps>
</step> </step>
<step> <step>
<para>Create the Image Service API endpoints:</para> <para>Create the Image Service API endpoints:</para>
<screen><prompt>$</prompt> <userinput>keystone endpoint-create \ <screen><prompt>$</prompt> <userinput>openstack endpoint create \
--service-id $(keystone service-list | awk '/ image / {print $2}') \
--publicurl http://<replaceable>controller</replaceable>:9292 \ --publicurl http://<replaceable>controller</replaceable>:9292 \
--internalurl http://<replaceable>controller</replaceable>:9292 \ --internalurl http://<replaceable>controller</replaceable>:9292 \
--adminurl http://<replaceable>controller</replaceable>:9292 \ --adminurl http://<replaceable>controller</replaceable>:9292 \
--region regionOne</userinput> --region regionOne \
<computeroutput>+-------------+----------------------------------+ image</userinput>
| Property | Value | <computeroutput>+--------------+----------------------------------+
+-------------+----------------------------------+ | Field | Value |
| adminurl | http://controller:9292 | +--------------+----------------------------------+
| id | a2ee818c69cb475199a1ca108332eb35 | | adminurl | http://controller:9292 |
| internalurl | http://controller:9292 | | id | 805b1dbc90ab47479111102bc6423313 |
| publicurl | http://controller:9292 | | internalurl | http://controller:9292 |
| region | regionOne | | publicurl | http://controller:9292 |
| service_id | 23f409c4e79f4c9e9d23d809c50fbacf | | region | regionOne |
+-------------+----------------------------------+</computeroutput></screen> | service_id | 178124d6081c441b80d79972614149c6 |
| service_name | glance |
| service_type | image |
+--------------+----------------------------------+</computeroutput></screen>
</step> </step>
</procedure> </procedure>
<procedure os="ubuntu;rhel;centos;fedora;sles;opensuse"> <procedure os="ubuntu;rhel;centos;fedora;sles;opensuse">
<title>To install and configure the Image Service components</title> <title>To install and configure the Image Service components</title>
<note>
<para>Default configuration files vary by distribution. You might need
to add these sections and options rather than modifying existing
sections and options.</para>
</note>
<step> <step>
<para>Install the packages:</para> <para>Install the packages:</para>
<screen os="ubuntu"><prompt>#</prompt> <userinput>apt-get install glance python-glanceclient</userinput></screen> <screen os="ubuntu"><prompt>#</prompt> <userinput>apt-get install glance python-glanceclient</userinput></screen>
@@ -139,7 +150,7 @@ connection = mysql://glance:<replaceable>GLANCE_DBPASS</replaceable>@<replaceabl
service access:</para> service access:</para>
<programlisting language="ini">[keystone_authtoken] <programlisting language="ini">[keystone_authtoken]
... ...
auth_uri = http://<replaceable>controller</replaceable>:5000/v2.0 auth_uri = http://<replaceable>controller</replaceable>:5000
identity_uri = http://<replaceable>controller</replaceable>:35357 identity_uri = http://<replaceable>controller</replaceable>:35357
admin_tenant_name = service admin_tenant_name = service
admin_user = glance admin_user = glance
@@ -177,6 +188,13 @@ notification_driver = noop</programlisting>
<para>The Telemetry chapter provides an Image Service configuration <para>The Telemetry chapter provides an Image Service configuration
that enables notifications.</para> that enables notifications.</para>
</step> </step>
<step>
<para>In the <literal>[DEFAULT]</literal> section, configure the
log file:</para>
<programlisting language="ini">[DEFAULT]
...
log_file = /var/log/glance/api.log</programlisting>
</step>
<step> <step>
<para>(Optional) To assist with troubleshooting, <para>(Optional) To assist with troubleshooting,
enable verbose logging in the <literal>[DEFAULT]</literal> enable verbose logging in the <literal>[DEFAULT]</literal>
@@ -206,7 +224,7 @@ connection = mysql://glance:<replaceable>GLANCE_DBPASS</replaceable>@<replaceabl
service access:</para> service access:</para>
<programlisting language="ini">[keystone_authtoken] <programlisting language="ini">[keystone_authtoken]
... ...
auth_uri = http://<replaceable>controller</replaceable>:5000/v2.0 auth_uri = http://<replaceable>controller</replaceable>:5000
identity_uri = http://<replaceable>controller</replaceable>:35357 identity_uri = http://<replaceable>controller</replaceable>:35357
admin_tenant_name = service admin_tenant_name = service
admin_user = glance admin_user = glance
@@ -236,7 +254,14 @@ notification_driver = noop</programlisting>
<para>The Telemetry chapter provides an Image Service configuration <para>The Telemetry chapter provides an Image Service configuration
that enables notifications.</para> that enables notifications.</para>
</step> </step>
<step> <step>
<para>In the <literal>[DEFAULT]</literal> section, configure the
log file:</para>
<programlisting language="ini">[DEFAULT]
...
log_file = /var/log/glance/registry.log</programlisting>
</step>
<step>
<para>(Optional) To assist with troubleshooting, <para>(Optional) To assist with troubleshooting,
enable verbose logging in the <literal>[DEFAULT]</literal> enable verbose logging in the <literal>[DEFAULT]</literal>
section:</para> section:</para>

View File

@@ -5,8 +5,7 @@
version="5.0" version="5.0"
xml:id="glance-verify"> xml:id="glance-verify">
<title>Verify operation</title> <title>Verify operation</title>
<para>This section describes how to verify operation of the Image <para>Verify operation of the Image Service using
Service using
<link xlink:href="http://launchpad.net/cirros">CirrOS</link>, a small <link xlink:href="http://launchpad.net/cirros">CirrOS</link>, a small
Linux image that helps you test your OpenStack deployment.</para> Linux image that helps you test your OpenStack deployment.</para>
<para>For more information about how to download and build images, <para>For more information about how to download and build images,
@@ -18,74 +17,75 @@
xlink:href="http://docs.openstack.org/user-guide/content/index.html" xlink:href="http://docs.openstack.org/user-guide/content/index.html"
><citetitle>OpenStack User Guide</citetitle></link>.</para> ><citetitle>OpenStack User Guide</citetitle></link>.</para>
<procedure> <procedure>
<step>
<para>Create and change into a temporary local directory:</para>
<screen><prompt>$</prompt> <userinput>mkdir /tmp/images</userinput></screen>
</step>
<step>
<para>Download the image to the temporary local directory:</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> <step>
<para>Source the <literal>admin</literal> credentials to gain access to <para>Source the <literal>admin</literal> credentials to gain access to
admin-only CLI commands:</para> admin-only CLI commands:</para>
<screen><prompt>$</prompt> <userinput>source admin-openrc.sh</userinput></screen> <screen><prompt>$</prompt> <userinput>source admin-openrc.sh</userinput></screen>
</step> </step>
<step> <step>
<para>Upload the image to the Image Service:</para> <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 \ <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 --is-public True --progress</userinput> --disk-format qcow2 --container-format bare --visibility public --progress</userinput>
<computeroutput>[=============================>] 100% <computeroutput>[=============================>] 100%
+------------------+--------------------------------------+ +------------------+--------------------------------------+
| Property | Value | | Property | Value |
+------------------+--------------------------------------+ +------------------+--------------------------------------+
| checksum | 133eae9fb1c98f45894a4e60d8736619 | | checksum | 133eae9fb1c98f45894a4e60d8736619 |
| container_format | bare | | container_format | bare |
| created_at | 2014-10-10T13:14:42 | | created_at | 2015-03-26T16:52:10Z |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 | | disk_format | qcow2 |
| id | acafc7c0-40aa-4026-9673-b879898e1fc2 | | id | 38047887-61a7-41ea-9b49-27987d5e8bb9 |
| is_public | True |
| min_disk | 0 | | min_disk | 0 |
| min_ram | 0 | | min_ram | 0 |
| name | cirros-0.3.3-x86_64 | | name | cirros-0.3.3-x86_64 |
| owner | ea8c352d253443118041c9c8b8416040 | | owner | ae7a98326b9c455588edd2656d723b9d |
| protected | False | | protected | False |
| size | 13200896 | | size | 13200896 |
| status | active | | status | active |
| updated_at | 2014-10-10T13:14:43 | | tags | [] |
| updated_at | 2015-03-26T16:52:10Z |
| virtual_size | None | | virtual_size | None |
| visibility | public |
+------------------+--------------------------------------+</computeroutput></screen> +------------------+--------------------------------------+</computeroutput></screen>
<para>For information about the parameters for the <para>For information about the <command>glance image-create</command>
<command>glance image-create</command> command, see <link parameters, see <link
xlink:href="http://docs.openstack.org/cli-reference/content/glanceclient_commands.html#glanceclient_subcommand_image-create" xlink:href="http://docs.openstack.org/cli-reference/content/glanceclient_commands.html#glanceclient_subcommand_image-create"
>Image Service command-line client</link> in the >Image Service command-line client</link> in the
<citetitle>OpenStack Command-Line Interface <citetitle>OpenStack Command-Line Interface
Reference</citetitle>.</para> Reference</citetitle>.</para>
<para>For information about disk and container formats for <para>For information about disk and container formats for
images, see <link images, see <link
xlink:href="http://docs.openstack.org/image-guide/content/image-formats.html" xlink:href="http://docs.openstack.org/image-guide/content/image-formats.html"
>Disk and container formats for images</link> in the >Disk and container formats for images</link> in the
<citetitle>OpenStack Virtual Machine Image Guide</citetitle>.</para> <citetitle>OpenStack Virtual Machine Image Guide</citetitle>.</para>
<note> <note>
<para>Because the returned image ID is generated dynamically, <para>OpenStack generates IDs dynamically, so you will see
your deployment generates a different ID than the one shown different values in the example command output.</para>
in this example.</para>
</note> </note>
</step> </step>
<step> <step>
<para>Confirm upload of the image and validate <para>Confirm upload of the image and validate
attributes:</para> attributes:</para>
<screen><prompt>$</prompt> <userinput>glance image-list</userinput> <screen><prompt>$</prompt> <userinput>glance image-list</userinput>
<computeroutput>+--------------------------------------+---------------------+-------------+------------------+----------+--------+ <computeroutput>+--------------------------------------+---------------------+
| ID | Name | Disk Format | Container Format | Size | Status | | ID | Name |
+--------------------------------------+---------------------+-------------+------------------+----------+--------+ +--------------------------------------+---------------------+
| acafc7c0-40aa-4026-9673-b879898e1fc2 | cirros-0.3.3-x86_64 | qcow2 | bare | 13200896 | active | | 38047887-61a7-41ea-9b49-27987d5e8bb9 | cirros-0.3.3-x86_64 |
+--------------------------------------+---------------------+-------------+------------------+----------+--------+</computeroutput></screen> +--------------------------------------+---------------------+</computeroutput></screen>
</step> </step>
<step> <step>
<para>Remove the temporary local directory:</para> <para>Remove the temporary local directory and source image:</para>
<screen><prompt>$</prompt> <userinput>rm -r /tmp/images</userinput></screen> <screen><prompt>$</prompt> <userinput>rm -r /tmp/images</userinput></screen>
</step> </step>
</procedure> </procedure>