Skip to content

Commit

Permalink
Fix doc bugs in Install guide
Browse files Browse the repository at this point in the history
bug 1054168 - documents v1 and v2 Image API details
bug 1073003 - debian listed twice
bug 1073005 - NTP best practices
bug 1073370 - mismatch in sept/oct Folsom date listings
bug 1068971 - adds PostgreSQL description for nova database, rather than keystone
thinking of rewriting entire database into one section anyway... so this may be
a poor fix to the bug but would like input.

Rebase against master.

Change-Id: I1e678ae98448928ca5096da5fdc01a5bb9c8bddf
  • Loading branch information
annegentle committed Nov 1, 2012
1 parent fbf91c2 commit 84eee9a
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 62 deletions.
Expand Up @@ -15,6 +15,7 @@
<xi:include href="../common/introduction-to-xen.xml" />
<xi:include href="compute-config-guest-network.xml" />
<xi:include href="compute-database-mysql.xml"/>
<xi:include href="compute-database-postgresql.xml"/>
<xi:include href="compute-cloud-controller.xml" />
<xi:include href="compute-minimum-configuration.xml" />
<xi:include href="compute-db-sync.xml"/>
Expand Down
Expand Up @@ -48,7 +48,8 @@
</listitem>
<listitem>
<para>Create and initialize the Compute database with
MySQL.</para>
MySQL. PostgreSQL is also documented but all examples
follow MySQL as an assumed default.</para>
</listitem>
<listitem>
<para>Add images.</para>
Expand Down
2 changes: 1 addition & 1 deletion doc/src/docbkx/openstack-install/ch_terminology.xml
Expand Up @@ -30,7 +30,7 @@
<tbody>
<tr>
<td><link xlink:href="http://wiki.openstack.org/ReleaseNotes/Folsom">Folsom</link></td>
<td>September 2012</td>
<td>October 2012</td>
<td>2012.2</td>
<td>1.7.2</td>
</tr>
Expand Down
8 changes: 4 additions & 4 deletions doc/src/docbkx/openstack-install/compute-database-mysql.xml
Expand Up @@ -6,15 +6,15 @@
<title>Configuring the SQL Database (MySQL) on the Cloud Controller</title>

<para>Start the mysql command line client by running:</para>
<para><literallayout class="monospaced">mysql -u root -p</literallayout></para>
<para><userinput>mysql -u root -p</userinput></para>
<para>Enter the mysql root user's password when prompted.</para>
<para>To configure the MySQL database, create the nova database. </para>
<para><literallayout class="monospaced">mysql> CREATE DATABASE nova;</literallayout></para>
<para><userinput>mysql> CREATE DATABASE nova;</userinput></para>
<para>Create a MySQL user and password for the newly-created nova database that
has full control of the database. </para>
<para><literallayout class="monospaced">mysql> GRANT ALL ON nova.* TO 'nova'@'%' IDENTIFIED BY '<replaceable>[YOUR_NOVADB_PASSWORD]</replaceable>';</literallayout></para>
<para><userinput>mysql> GRANT ALL ON nova.* TO 'nova'@'%' IDENTIFIED BY '<replaceable>[YOUR_NOVADB_PASSWORD]</replaceable>';</userinput></para>
<para>Enter quit at the mysql> prompt to exit MySQL.</para>
<para><literallayout class="monospaced">mysql> quit</literallayout></para>
<para><userinput>mysql> quit</userinput></para>

<para>The command to populate the database is described later in the
documentation, in the Section entitled <link
Expand Down
31 changes: 31 additions & 0 deletions doc/src/docbkx/openstack-install/compute-database-postgresql.xml
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<section xml:id="setting-up-sql-database-postgresql"
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>Configuring the SQL Database (PostgreSQL) on the Cloud Controller</title>
<para>Optionally, if you choose not to use MySQL, you can install and configure PostgreSQL for all your databases. Here's a walkthrough for the Nova database:</para>
<screen><userinput><prompt>$</prompt> sudo apt-get install postgresql postgresql-client</userinput></screen>
<para>Start the PostgreSQL command line client by running:</para>
<para><userinput>sudo su - postgres</userinput></para>
<para>Enter the postgresql root user's password if prompted.</para>
<para>To configure the database, create the nova database. </para>
<para><screen>postgres> psql
postgres=# CREATE USER novadbadmin;
postgres=# ALTER USER novadbadmin WITH PASSWORD '<replaceable>[YOUR_NOVADB_PASSWORD]</replaceable>';
postgres=# CREATE DATABASE nova;
postgres=# GRANT ALL PRIVILEGES ON DATABASE nova TO novadbadmin;
postgres=# \q
postgres> exit</screen></para>
<para>The database is created and we have a privileged user that controls the database. Now we have to install the packages that will help Nova access the database.</para>

<screen><userinput><prompt>$</prompt> sudo apt-get install python-sqlalchemy python-psycopg2</userinput></screen>

<para>Configure the <filename>/etc/nova/nova.conf</filename> file, to ensure it knows to use the PostgreSQL database:</para>

<literallayout class="monospaced">connection = postgres://novadbadmin:[<replaceable>[YOUR_NOVADB_PASSWORD]</replaceable>]@127.0.0.1/nova</literallayout>
<para>The command to populate the database is described later in the
documentation, in the section entitled <link
linkend="compute-db-sync">Configuring the Database for Compute</link>.
</para>
</section>
31 changes: 17 additions & 14 deletions doc/src/docbkx/openstack-install/compute-sys-requirements.xml
Expand Up @@ -84,22 +84,25 @@
various operating systems, currently the only
feature-complete, production-supported host environment is
Linux.</para></note>
<para><emphasis role="bold">Operating System</emphasis>: OpenStack currently has packages for
the following distributions: CentOS, Debian, Fedora, RHEL, Debian, and Ubuntu. These
packages are maintained by community members, refer to <link
<para><emphasis role="bold">Operating System</emphasis>: OpenStack
currently has packages for the following distributions:
CentOS, Debian, Fedora, RHEL, and Ubuntu. These packages are
maintained by community members, refer to <link
xlink:href="http://wiki.openstack.org/Packaging"
>http://wiki.openstack.org/Packaging</link> for additional links.
<note>
<para os="ubuntu">The Folsom release of OpenStack Compute requires Ubuntu 12.04 or
later, as the version of libvirt that ships with Ubuntu 11.10 does not function
>http://wiki.openstack.org/Packaging</link> for additional
links. <note>
<para os="ubuntu">The Folsom release of OpenStack Compute
requires Ubuntu 12.04 or later, as the version of
libvirt that ships with Ubuntu 11.10 does not function
properly with OpenStack due to <link
xlink:href="https://bugs.launchpad.net/nova/+bug/1011863">bug
#1011863</link>.</para>
<para os="fedora">The Folsom release of OpenStack Compute requires Fedora 16 or
later, as the version of libvirt that ships with Fedora 15 does not function
properly with OpenStack due to <link
xlink:href="https://bugs.launchpad.net/nova/+bug/1011863">bug
#1011863</link>.</para>
xlink:href="https://bugs.launchpad.net/nova/+bug/1011863"
>bug #1011863</link>.</para>
<para os="fedora">The Folsom release of OpenStack Compute
requires Fedora 16 or later, as the version of libvirt
that ships with Fedora 15 does not function properly
with OpenStack due to <link
xlink:href="https://bugs.launchpad.net/nova/+bug/1011863"
>bug #1011863</link>.</para>
</note></para>
<para><emphasis role="bold">Database</emphasis>: For
OpenStack Compute, you need access to either a PostgreSQL
Expand Down
103 changes: 65 additions & 38 deletions doc/src/docbkx/openstack-install/install-config-glance.xml
Expand Up @@ -20,29 +20,50 @@
<para os="ubuntu">Delete the <filename>glance.sqlite</filename> file created in the
<filename>/var/lib/glance/</filename> directory.</para>
<screen><prompt>#</prompt> <userinput>rm /var/lib/glance/glance.sqlite</userinput></screen>

<section xml:id="configure-glance-mysql"><title>Configuring the Image Service database backend</title>
<para>Configure the backend data store. For MySQL, create a glance MySQL database and a glance MySQL user. Grant the "glance" user full
access to the glance MySQL database.</para><para>Start the MySQL command line client by running:</para>
<para><screen><prompt>$</prompt> <userinput>mysql -u root -p</userinput></screen></para><para>Enter the MySQL root user's password when prompted.</para>
<para>To configure the MySQL database, create the glance database. </para><para><screen><prompt>mysql></prompt> <userinput>CREATE DATABASE glance;</userinput></screen>
</para><para>Create a MySQL user for the newly-created glance database that has full control of the database. </para>
<para><screen><prompt>mysql></prompt> <userinput>GRANT ALL ON glance.* TO 'glance'@'%' IDENTIFIED BY '<replaceable>[YOUR_GLANCEDB_PASSWORD]</replaceable>';</userinput></screen></para>
<para>Enter <literal>quit </literal>at the <literal>mysql></literal> prompt to exit
MySQL.</para>
<para>Enter <literal>quit </literal>at the
<literal>mysql></literal> prompt to exit MySQL.</para>
<para><literallayout class="monospaced">mysql> quit</literallayout></para></section>
<section xml:id="configure-glance-files"><title>Edit the Glance configuration files and paste ini middleware files</title>
<para>The Image service has a number of options that you can use to configure the Glance API
server, the Glance Registry server, and the various storage backends that
Glance can use to store images. By default, the storage backend is in file, specified in the glance-api.conf config file in the section [DEFAULT].
</para>
<para> Most configuration is done via configuration files,
with the Glance API server and Glance Registry server
using separate configuration files. When installing
through an operating system package management system,
sample configuration files are installed in /etc/glance.
You configure the PasteDeploy configuration, which
controls the deployment of the WSGI application for each
component, in files named
<section xml:id="configure-glance-files">
<title>Edit the Glance configuration files and paste ini
middleware files</title>
<para>The Image service has a number of options that you can
use to configure the Glance API server, optionally the Glance
Registry server, and the various storage backends that
Glance can use to store images. By default, the storage
backend is in file, specified in the glance-api.conf
config file in the section [DEFAULT]. </para>
<para> The glance-api service implements versions 1 and 2 of
the OpenStack Images API. By default, both are enabled by setting these
configuration options to "true" in the <filename>glance-api.conf</filename> file. </para>
<screen>enable_v1_api=True</screen>
<screen>enable_v2_api=True</screen>
<para>Disable either version of the
Images API by setting the option to False in the
<filename>glance-api.conf</filename> file.</para>
<note>
<para> In order to use the v2 API, you must copy the
necessary SQL configuration from your glance-registry
service to your glance-api configuration file. The
following instructions assume that you want to use the
v2 Image API for your installation. The v1 API is
implemented on top of the glance-registry service
while the v2 API is not. </para>
</note><para> Most configuration is done via configuration files,
with the Glance API server (and possibly the Glance
Registry server) using separate configuration files. When
installing through an operating system package management
system, sample configuration files are installed in
/etc/glance. You configure the PasteDeploy configuration,
which controls the deployment of the WSGI application for
each component, in files named
<replaceable>component</replaceable>-paste.ini, such
as glance-api-paste.ini.</para>
<para>This walkthrough installs the image service using a file
Expand All @@ -57,11 +78,11 @@ Glance can use to store images. By default, the storage backend is in file, spec
admin_tenant_name = service
admin_user = glance
admin_password = glance</screen>
<para>Add the admin and service identifiers and
<para>Add the admin and service identifiers and
flavor=keystone to the end of
<filename>/etc/glance/glance-api.conf</filename> as
shown below.</para>
<screen>[keystone_authtoken]
<screen>[keystone_authtoken]
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
Expand All @@ -79,16 +100,15 @@ config_file = /etc/glance/glance-api-paste.ini
# as 'keystone'.
flavor=keystone
</screen>

<para>Restart glance-api to pick up these changed settings.</para>
<screen>service glance-api restart</screen>

<para>Update the last sections of
<para>Restart glance-api to pick up these changed
settings.</para>
<screen>service glance-api restart</screen>
<para>Update the last sections of
<filename>/etc/glance/glance-registry.conf</filename>
to reflect the values you set earlier for admin user and
the service tenant, plus enable the Identity service with
flavor=keystone.</para>
<screen>[keystone_authtoken]
<screen>[keystone_authtoken]
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
Expand All @@ -105,29 +125,36 @@ config_file = /etc/glance/glance-registry-paste.ini
# [pipeline:glance-api-keystone], you would configure the flavor below
# as 'keystone'.
flavor=keystone</screen>

<para>Update
<para>Update
<filename>/etc/glance/glance-registry-paste.ini</filename>
by enabling the Identity service, keystone:</para>
<screen># Use this pipeline for keystone auth
<screen># Use this pipeline for keystone auth
[pipeline:glance-registry-keystone]
pipeline = authtoken context registryapp</screen>
<para>Ensure that <filename>/etc/glance/glance-registry.conf</filename>
<para>Ensure that
<filename>/etc/glance/glance-registry.conf</filename>
points to the MySQL database rather than
sqlite.<programlisting>sql_connection = mysql://glance:<replaceable>[YOUR_GLANCEDB_PASSWORD]</replaceable>@192.168.206.130/glance</programlisting></para>
<para>Restart glance-registry to pick up these changed settings.</para>
<para>Restart glance-registry to pick up these changed
settings.</para>
<screen>service glance-registry restart</screen>
<note><para>Any time you change the .conf files, restart the
corresponding service.</para></note>
<para os="ubuntu">On Ubuntu 12.04, the database tables are under version control and you must do these
steps on a new install to prevent the Image service from breaking possible upgrades, as
root:
<note>
<para>Any time you change the .conf files, restart the
corresponding service.</para>
</note>
<para os="ubuntu">On Ubuntu 12.04, the database tables are
under version control and you must do these steps on a new
install to prevent the Image service from breaking
possible upgrades, as root:
<screen><prompt>#</prompt> <userinput>glance-manage version_control 0</userinput></screen></para>
<para>Now you can populate or migrate the database. <screen><prompt>#</prompt> <userinput>glance-manage db_sync</userinput></screen></para>

<para>Now you can populate or migrate the database. <screen><prompt>#</prompt> <userinput>glance-manage db_sync</userinput></screen></para>
<para>Restart glance-registry and glance-api services, as root:</para>
<screen><prompt>#</prompt> <userinput>service glance-registry restart</userinput>
<prompt>#</prompt> <userinput>service glance-api restart</userinput></screen>
<note><para>This guide does not configure image caching, refer to <link
xlink:href="http://glance.openstack.org">http://docs.openstack.org/developer/glance/</link> for
more information.</para></note></section></section>
<note>
<para>This guide does not configure image caching, refer
to <link xlink:href="http://glance.openstack.org"
>http://docs.openstack.org/developer/glance/</link>
for more information.</para>
</note>
</section></section>
7 changes: 3 additions & 4 deletions doc/src/docbkx/openstack-install/installing-ntp.xml
Expand Up @@ -18,8 +18,7 @@
<screen os="rhel;fedora;centos"><prompt>$</prompt> <userinput>sudo service ntpd start</userinput>
<prompt>$</prompt> <userinput>sudo chkconfig ntpd on</userinput></screen>
<para>Set up the NTP client on your compute node so that the time
between controller node and compute node is synchronized. Do
the following as a cron job on compute node.</para>
<programlisting>ntpdate 'controllernode ip'
hwclock -w</programlisting>
between controller node and compute node is synchronized.
Install the NTP package on the compute nodes in addition to
the API nodes, to allow more gradual time updates. </para>
</section>

0 comments on commit 84eee9a

Please sign in to comment.