openstack-manuals/doc/user-guide/section_dashboard_databases.xml
Laurel Michaels 654ac92213 Add info about updating db instance
User guide needs section on how to
resize db instance in dashboard.

The following commit adds the capability
to resize a database instance
(meaning assign it a new flavor) via horizon.

https://review.openstack.org/#/c/108793

This commit has merged, so the doc needs
to be updated to cover this feature.

Change-Id: I37c14750353d1b4e8e0f1b4190d3f6f37adca111
Closes-Bug: #1417161
2015-02-05 14:35:25 -05:00

220 lines
13 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="dashboard_databases">
<title>Create and manage databases</title>
<?dbhtml stop-chunking?>
<para>The Database service provides scalable and reliable cloud provisioning functionality for both relational and non-relational database engines. Users can quickly and easily use database features without the burden of handling complex administrative tasks.</para>
<section xml:id="dashboard_create_db_instance">
<title>Create a database instance</title>
<formalpara>
<title>Prerequisites</title>
<para>Before you create a database instance, you need to configure a default datastore and make sure you have an appropriate flavor for the type of database instance you want.</para>
</formalpara>
<procedure>
<step>
<title>Configure a default datastore.</title>
<para>Because the dashboard does not let you choose a specific datastore to use with an instance, you need to configure a default datastore. The dashboard then uses the default datastore to create the instance.</para>
<substeps>
<step>
<para>Add the following line to <filename>/etc/trove/trove.conf</filename>:</para>
<programlisting language="ini">default_datastore = <replaceable>DATASTORE_NAME</replaceable></programlisting>
<para>Replace <replaceable>DATASTORE_NAME</replaceable> with the name that the administrative user set when issuing the <command>trove-manage</command> command to create the datastore. You can use the trove <command>datastore-list</command> command to display the datastores that are available in your environment.</para>
<para>For example, if your MySQL datastore name is set to <literal>mysql</literal>, your entry would look like this:</para>
<programlisting language="ini">default_datastore = mysql</programlisting>
</step>
<step>
<para>Restart Database services on the controller node:</para>
<screen><prompt>#</prompt> <userinput>service trove-api restart</userinput>
<prompt>#</prompt> <userinput>service trove-taskmanager restart</userinput>
<prompt>#</prompt> <userinput>service trove-conductor restart</userinput></screen>
</step>
</substeps>
</step>
<step>
<title>Verify flavor.</title>
<para>Make sure an <link linkend="create_db">appropriate flavor exists</link> for the type of database instance you want.</para>
</step>
</procedure>
<formalpara>
<title>Create database instance</title>
<para>Once you have configured a default datastore and verified that you have an appropriate flavor, you can create a database instance.</para>
</formalpara>
<procedure>
<step>
<para>Log in to the dashboard, choose a project, and click <guilabel>Databases</guilabel>.</para>
</step>
<step>
<para>Click <guilabel>Database Instances</guilabel>. This lists the instances that already exist in your environment.</para>
</step>
<step>
<para>Click <guibutton>Launch Instance</guibutton>.</para>
</step>
<step>
<para>In the <guilabel>Launch Database</guilabel> dialog box, specify the following values.</para>
<informaltable rules="all" width="75%">
<col width="30%"/>
<col width="70%"/>
<thead>
<tr>
<th colspan="2" align="center"><guilabel>Details</guilabel></th>
</tr>
</thead>
<tbody>
<tr>
<td><para><guilabel>Database Name</guilabel></para></td>
<td><para>Specify a name for the database instance.</para></td>
</tr>
<tr>
<td><para><guilabel>Flavor</guilabel></para></td>
<td><para>Select an appropriate flavor for the instance.</para></td>
</tr>
<tr>
<td><para><guilabel>Volume Size</guilabel></para></td>
<td><para>Select a volume size. Volume size is expressed in GB.</para></td>
</tr>
<tr>
<th colspan="2" align="center">
<guilabel>Initialize Databases</guilabel></th>
</tr>
<tr>
<td><para><guilabel>Initial Database</guilabel></para></td>
<td>
<para>Optionally provide a comma separated list of databases to create, for example:</para>
<para><literal>database1</literal>, <literal>database2</literal>, <literal>database3</literal></para>
</td>
</tr>
<tr>
<td><para><guilabel>Initial Admin User</guilabel></para></td>
<td><para>Create an initial admin user. This user will have access to all the databases you create.</para></td>
</tr>
<tr>
<td><para><guilabel>Password</guilabel></para></td>
<td><para>Specify a password associated with the initial admin user you just named.</para></td>
</tr>
<tr>
<td><para><guilabel>Host</guilabel></para></td>
<td><para>Optionally, allow the user to connect only from this host. If you do not specify a host, this user will be allowed to connect from anywhere.</para></td>
</tr>
</tbody>
</informaltable>
</step>
<step>
<para>Click the <guibutton>Launch</guibutton> button. The new database instance appears in the databases list.</para>
</step>
</procedure>
</section>
<section xml:id="dashboard_backup_db">
<title>Backup and restore a database</title>
<para>You can use Database services to backup a database and store the backup artifact in the
Object Storage module. Later on, if the original database is damaged, you can use the backup
artifact to restore the database. The restore process creates a database instance.</para>
<para>This example shows you how to back up and restore a MySQL database.</para>
<procedure>
<title>To backup and restore a database</title>
<step>
<title>Backup the database instance.</title>
<substeps>
<step>
<para>Log in to the dashboard, choose a project, and click <guilabel>Databases</guilabel>.</para>
</step>
<step>
<para>Click <guilabel>Database Instances</guilabel>. This displays the existing instances in your system.</para>
</step>
<step>
<para>Click <guibutton>Create Backup</guibutton>.</para>
</step>
<step>
<para>In the Backup Database dialog box, specify the following values:</para>
<informaltable rules="all" width="75%">
<col width="30%"/>
<col width="70%"/>
<tbody>
<tr>
<td><para><guilabel>Name</guilabel></para></td>
<td><para>Specify a name for the backup.</para></td>
</tr>
<tr>
<td><para><guilabel>Database Instance</guilabel></para></td>
<td><para>Select the instance you want to back up.</para></td>
</tr>
<tr>
<td><para><guilabel>Description</guilabel></para></td>
<td><para>Specify an optional description.</para></td>
</tr>
</tbody>
</informaltable>
</step>
<step>
<para>Click <guibutton>Backup</guibutton>. The new backup appears in the backup list.</para>
</step>
</substeps>
</step>
<step>
<title>Restore a database instance.</title>
<para>Now assume that your original database instance is damaged and you
need to restore it. You do the restore by using your backup to create a new database instance.</para>
<substeps>
<step>
<para>Log in to the dashboard, choose a project, and click <guilabel>Databases</guilabel>.</para>
</step>
<step>
<para>Click <guilabel>Database Backups</guilabel>. This lists the available backups.</para>
</step>
<step>
<para>Check the backup you want to use and click <guibutton>Restore Backup</guibutton>.</para>
</step>
<step>
<para>In the <guilabel>Launch Database</guilabel> dialog box, specify the <link linkend="dashboard_create_db_instance">values you want to use for the new database instance</link>. Click the <guilabel>Restore From Database</guilabel> tab and make sure that this new instance is based on the correct backup.</para>
</step>
<step>
<para>Click <guibutton>Launch</guibutton>. The new instance appears in the database instances list.</para>
</step>
</substeps>
</step>
</procedure>
</section>
<section xml:id="dashboard_update_db">
<title>Update a database instance</title>
<para>You can change various characteristics of a database instance, such as its volume size and flavor.</para>
<procedure>
<title>To change the volume size of an instance</title>
<step>
<para>Log in to the dashboard, choose a project, and click <guilabel>Databases</guilabel>.</para>
</step>
<step>
<para>Click <guilabel>Database Instances</guilabel>. This displays the existing instances in your system.</para>
</step>
<step>
<para>Check the instance you want to work with. In the <guilabel>Actions</guilabel> column, expand the drop down menu and select <guilabel>Resize Volume</guilabel>.</para>
</step>
<step>
<para>In the Resize Database Volume dialog box, fill in the <guilabel>New Size</guilabel> field with an integer indicating the new size you want for the instance. Express the size in GB, and note that the new size must be larger than the current size.</para>
</step>
<step>
<para>Click <guilabel>Resize Database Volume</guilabel>.</para>
</step>
</procedure>
<procedure>
<title>To change the flavor of an instance</title>
<step>
<para>Log in to the dashboard, choose a project, and click <guilabel>Databases</guilabel>.</para>
</step>
<step>
<para>Click <guilabel>Database Instances</guilabel>. This displays the existing instances in your system.</para>
</step>
<step>
<para>Check the instance you want to work with. In the <guilabel>Actions</guilabel> column, expand the drop down menu and select <guilabel>Resize Instance</guilabel>.</para>
</step>
<step>
<para>In the Resize Database Instance dialog box, expand the drop down menu in the <guilabel>New Flavor</guilabel> field. Select the new flavor you want for the instance.</para>
</step>
<step>
<para>Click <guilabel>Resize Database Instance</guilabel>.</para>
</step>
</procedure>
</section>
</section>