Exploring OpenStack's Trove DBaaS

Cloud Service

Alternatives with Ansible

Almost any automation system provides the tools for editing various database systems. If you aren't using the OpenStack cloud, you could find a way to manage your database with Puppet, Chef, Ansible, or various other solutions. The following example uses Ansible.

It is better to divide the deployment into several steps. The first step involves installing the database. The second step provides the installed database with the desired configuration and then restarts it. In the third and final step, users are created so the application can use MySQL.

Several ready Ansible roles are available on the web that allow you to install and configure the package [5] [6]. To get a working database, you need to create a corresponding inventory file for Ansible and indicate the host where MySQL should end up as its own host group.

A separate playbook, which assigns the MySQL role to this host group, takes care of the rest. In the playbook, you also set the parameters for configuring MySQL. Running the playbook then leads to an executable MySQL on the target system.

Ansible offers additional functions through modules. The module called mysql_user is perfectly suited for creating users. Because the module calls mysql in the background, the user needs a suitable configuration file for mysql when Ansible invokes commands on the target system. The module documentation [7] reveals all the necessary details. Use the mysql_db module to set up a MySQL database [8].


DBaaS in the cloud brings the database into the future. OpenStack's Trove DBaaS tool provides easy integration with the OpenStack orchestration environment. If you aren't using the cloud, you can still use a solution like Chef or Ansible to automate database management.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs

Support Our Work

ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.

Learn More”>


		<div class=