The Database service provides database management features.


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. Cloud users and database administrators can provision and manage multiple database instances as needed.

The Database service provides resource isolation at high performance levels, and automates complex administrative tasks such as deployment, configuration, patching, backups, restores, and monitoring.

Create datastore

An administrative user can create datastores for a variety of databases.

This section assumes you do not yet have a MySQL data store, and shows you how to create a MySQL data store and populate it with a MySQL 5.5 data store version.


From Victoria release, all the datastores can be configured with a same Glance image but with different datastore name and version number.

To create a data store

  1. Create a trove image

    Refer to Build images using trovestack

  2. Register image with Image service

    You need to register your guest image with the Image service as cloud admin.

    openstack image create \
      trove-guest-ubuntu-bionic \
      --private \
      --disk-format qcow2 --container-format bare \
      --file $image_file \
      --property hw_rng_model='virtio' \
      --tag trove
  3. Create the datastore

    Create the data store that configured with the new image. To do this, use the trove-manage datastore_update command.

    This example uses the following arguments:



    In this example:

    config file

    The configuration file to use.



    Name you want to use for this data store.


    default version

    You can attach multiple versions/images to a data store. For example, you might have a MySQL 5.5 version and a MySQL 5.6 version. You can designate one version as the default, which the system uses if a user does not explicitly request a specific version.


    At this point, you do not yet have a default version, so pass in an empty string.


    $ trove-manage --config-file=/etc/trove/trove.conf datastore_update mysql ""
  4. Add a version to the new data store

    Now that you have a MySQL data store, you can add a version to it, using the trove-manage datastore_version_update command. The version indicates which guest image to use.

    This example uses the following arguments:



    In this example:

    config file

    The configuration file to use.


    data store

    The name of the data store you just created via trove-manage datastore_update.


    version name

    The name of the version you are adding to the data store.


    data store manager

    Which data store manager to use for this version. Typically, the data store manager is identified by one of the following strings, depending on the database:

    • cassandra

    • couchbase

    • couchdb

    • db2

    • mariadb

    • mongodb

    • mysql

    • percona

    • postgresql

    • pxc

    • redis

    • vertica


    glance ID

    The ID of the guest image you just added to the Image service. You can get this ID by using the glance image-show IMAGE_NAME command.



    If you want to put additional packages on each guest that you create with this data store version, you can list the package names here.


    In this example, the guest image already contains all the required packages, so leave this argument empty.


    Set this to either 1 or 0:
    • 1 = active

    • 0 = disabled



    $ trove-manage --config-file=/etc/trove/trove.conf datastore_version_update mysql mysql-5.5 mysql GLANCE_ID "" 1

    Optional. Set your new version as the default version. To do this, use the trove-manage datastore_update command again, this time specifying the version you just created.

    $ trove-manage --config-file=/etc/trove/trove.conf datastore_update mysql mysql-5.5
  5. Load validation rules for configuration groups

    Background. You can manage database configuration tasks by using configuration groups. Configuration groups let you set configuration parameters, in bulk, on one or more databases.

    When you set up a configuration group using the openstack database configuration create command, this command compares the configuration values you are setting against a list of valid configuration values that are stored in the validation-rules.json file.

    Operating System

    Location of validation-rules.json


    Ubuntu 18.04


    DATASTORE_NAME is the name of either the MySQL data store or the Percona data store. This is typically either mysql or percona.

    RHEL 7, CentOS 7, Fedora 20, and Fedora 21


    DATASTORE_NAME is the name of either the MySQL data store or the Percona data store. This is typically either mysql or percona.

    Therefore, as part of creating a data store, you need to load the validation-rules.json file, using the trove-manage db_load_datastore_config_parameters command. This command takes the following arguments:

    • Data store name

    • Data store version

    • Full path to the validation-rules.json file

    This example loads the validation-rules.json file for a MySQL database on Ubuntu 18.04:

    $ trove-manage db_load_datastore_config_parameters mysql mysql-5.5 /usr/lib/python3/dist-packages/trove/templates/mysql/validation-rules.json
  6. Validate data store

    To validate your new data store and version, start by listing the data stores on your system:

    $ openstack datastore list
    |                  id                  |     name     |
    | 10000000-0000-0000-0000-000000000001 | Legacy MySQL |
    | e5dc1da3-f080-4589-a4c2-eff7928f969a |    mysql     |

    Show the versions of a specific datastore:

    $ openstack datastore version list mysql
    |                  id                  |    name   |
    | 36a6306b-efd8-4d83-9b75-8b30dd756381 | mysql-5.5 |