788b49f554
This patch: - renames all the RST files in the ops-guide folder to use a hyphen instead of underscore; - adds redirects to the renamed files to .htacces; - removes /([a-z-]+) from Admin Guide redirects in .htacces. Change-Id: I4c35a4c89ae9900a2e9bfe1a7a3bcb94ab72454b Implements: blueprint consistency-file-rename
50 lines
2.1 KiB
ReStructuredText
50 lines
2.1 KiB
ReStructuredText
=========
|
|
Databases
|
|
=========
|
|
|
|
Almost all OpenStack components have an underlying database to store
|
|
persistent information. Usually this database is MySQL. Normal MySQL
|
|
administration is applicable to these databases. OpenStack does not
|
|
configure the databases out of the ordinary. Basic administration
|
|
includes performance tweaking, high availability, backup, recovery, and
|
|
repairing. For more information, see a standard MySQL administration guide.
|
|
|
|
You can perform a couple of tricks with the database to either more
|
|
quickly retrieve information or fix a data inconsistency error—for
|
|
example, an instance was terminated, but the status was not updated in
|
|
the database. These tricks are discussed throughout this book.
|
|
|
|
Database Connectivity
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
Review the component's configuration file to see how each OpenStack
|
|
component accesses its corresponding database. Look for either
|
|
``sql_connection`` or simply ``connection``. The following command uses
|
|
``grep`` to display the SQL connection string for nova, glance, cinder,
|
|
and keystone:
|
|
|
|
.. code-block:: console
|
|
|
|
# grep -hE "connection ?=" /etc/nova/nova.conf /etc/glance/glance-*.conf \
|
|
/etc/cinder/cinder.conf /etc/keystone/keystone.conf
|
|
sql_connection = mysql+pymysql://nova:nova@cloud.alberta.sandbox.cybera.ca/nova
|
|
sql_connection = mysql+pymysql://glance:password@cloud.example.com/glance
|
|
sql_connection = mysql+pymysql://glance:password@cloud.example.com/glance
|
|
sql_connection = mysql+pymysql://cinder:password@cloud.example.com/cinder
|
|
connection = mysql+pymysql://keystone_admin:password@cloud.example.com/keystone
|
|
|
|
The connection strings take this format:
|
|
|
|
.. code-block:: console
|
|
|
|
mysql+pymysql:// <username> : <password> @ <hostname> / <database name>
|
|
|
|
Performance and Optimizing
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
As your cloud grows, MySQL is utilized more and more. If you suspect
|
|
that MySQL might be becoming a bottleneck, you should start researching
|
|
MySQL optimization. The MySQL manual has an entire section dedicated to
|
|
this topic: `Optimization Overview
|
|
<http://dev.mysql.com/doc/refman/5.5/en/optimize-overview.html>`_.
|