blob: f02eff78cde74d769eccf35ac169e73fce843a71 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
.. _trove-verify:
Verify operation
~~~~~~~~~~~~~~~~
Verify operation of the Database service.
.. note::
Perform these commands on the node where you installed trove.
#. Source the ``admin`` tenant credentials:
.. code-block:: console
$ . admin-openrc
#. Run the ``trove list`` command. You should see output similar to this:
.. code-block:: console
$ trove list
+----+------+-----------+-------------------+--------+-----------+------+
| id | name | datastore | datastore_version | status | flavor_id | size |
+----+------+-----------+-------------------+--------+-----------+------+
+----+------+-----------+-------------------+--------+-----------+------+
#. Add a datastore to trove:
* `Create a trove image <https://docs.openstack.org/trove/latest/admin/building_guest_images.html>`_.
Create an image for the type of database you want to use, for example,
MySQL, MongoDB, Cassandra.
This image must have the trove guest agent installed.
* Upload the image to glance. Example:
.. code-block:: console
$ glance image-create --name "mysqlTest" --disk-format qcow2 \
--container-format bare \
--file mysql-5.6.qcow2
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 51a8e6e5ff10b08f2c2ec2953f0a8086 |
| container_format | bare |
| created_at | 2016-04-08T15:15:41Z |
| disk_format | qcow2 |
| id | 5caa76dd-f44b-4d01-a3b4-a111e27896be |
| min_disk | 0 |
| min_ram | 0 |
| name | mysqlTest |
| owner | 0c0bd5e850c24893b48c4cc01e2a7986 |
| protected | False |
| size | 533790720 |
| status | active |
| tags | [] |
| updated_at | 2016-04-08T15:15:51Z |
| virtual_size | None |
| visibility | private |
+------------------+--------------------------------------+
* An alternate method of launching trove guests is to use an existing
Linux distro image and `configure the trove guest using Cloud-init
<https://docs.openstack.org/trove/latest/admin/guest_cloud_init.html>`_ .
This saves the effort of creating a customized image, but at the
cost of a slower startup time.
* Create a datastore. You need to create a separate datastore for
each type of database you want to use, for example, MySQL, MongoDB,
Cassandra. This example shows you how to create a datastore for a
MySQL database:
.. code-block:: console
# su -s /bin/sh -c "trove-manage \
--config-file /etc/trove/trove.conf \
datastore_update mysql ''" trove
...
Datastore 'mysql' updated.
#. Update the datastore to use the new image.
This example shows you how to update a MySQL 5.6 datastore:
.. code-block:: console
# su -s /bin/sh -c "trove-manage --config-file /etc/trove/trove.conf \
datastore_version_update \
mysql mysql-5.6 mysql glance_image_ID '' 1" trove
...
Datastore version 'mysql-5.6' updated.
#. Create a database `instance
<http://docs.openstack.org/user-guide/create_db.html>`_.
|