Chef Cookbook - Support Cookbook for Database
Go to file
Lance Albertson 5e26af7d04 CentOS 8 support
- Update ChefSpec

Change-Id: I832a910d9054c2ddfde28ed2522efe7c0f414588
Signed-off-by: Lance Albertson <>
2021-10-22 10:47:21 -07:00
.delivery Stein fixes 2020-03-19 10:56:43 -07:00
attributes Chef 17 support 2021-10-14 09:01:42 -07:00
files/default Add receipes for mariadb cluster deployment 2018-01-12 10:24:20 +00:00
recipes Chef 17 support 2021-10-14 09:01:42 -07:00
spec CentOS 8 support 2021-10-22 10:47:21 -07:00
.gitignore Initial kilo updates 2015-02-27 14:25:44 -06:00
.gitreview OpenDev Migration Patch 2019-04-19 19:37:17 +00:00
.rubocop.yml Chef 17 support 2021-10-14 09:01:42 -07:00
.zuul.yaml Rename openstack-chef-repo references to openstack-chef 2018-08-06 21:50:09 -07:00
Berksfile Set Berksfile to use ruby solver 2020-01-23 16:49:25 -08:00 Moving IRC network reference to OFTC 2021-07-08 08:18:52 -05:00
LICENSE ops-database refactor for Pike and Chef 13 2018-01-11 10:36:09 -08:00
README.rst Chef 17 support 2021-10-14 09:01:42 -07:00
Rakefile Updates for Train 2020-05-29 17:13:44 -07:00 Sync stackforge/cookbook* to openstack/cookbook* for ops-database cookbook 2015-06-16 11:44:55 +08:00
metadata.rb Chef 17 support 2021-10-14 09:01:42 -07:00


OpenStack Chef Cookbook - ops-database



This cookbook provides a reference example of database configuration for the OpenStack deployment provided by Chef for OpenStack. It currently supports MariaDB.


  • Chef 16 or higher
  • Chef Workstation 21.10.640 for testing (also includes Berkshelf for cookbook dependency resolution)


  • ubuntu
  • redhat
  • centos


The following cookbooks are dependencies:

  • 'mariadb', '~> 5.0'
  • 'openstack-common', '~> 20.0.0'


The usage of this cookbook is optional, you may choose to set up your own databases without using this cookbook. If you choose to do so, you will need to do the following:

  • create the schema specified by the openstack-db recipe.
  • create and upload encrypted data bags into your chef environment, as specified by #get_password in the openstack-db recipe.







  • Installs client packages for the database used by the deployment.


  • Installs and configures server packages for the database used by the deployment.


  • Installs MariaDB client packages.


  • Installs and configures MariaDB server packages.


  • Installs MariaDB Cluster client packages.


  • Installs and configures MariaDB Cluster server packages.


  • Creates necessary tables, users, and grants for OpenStack.


The following attributes are defined in attributes/database.rb of the common cookbook, but are documented here due to their relevance:

  • openstack['endpoints']['db']['host'] - The IP address to bind the database service to
  • openstack['endpoints']['db']['port'] - The port to bind the database service to
  • openstack['endpoints']['db']['bind_interface'] - The interface name to bind the database service to
  • openstack['db']['root_user_key'] - The key used to retrieve the root user password; the key is both the name of the data-bag item and name of the key containing the password value within the data-bag item. This is defined in Common.

If the value of the bind_interface attribute is non-nil, then the database service will be bound to the first IP address on that interface. If the value of the bind_interface attribute is nil, then the database service will be bound to the IP address specified in the host attribute.

See the attributes mysql.rb file for the mysql specific attributes that are available.

For more information see:


Please refer to the for instructions for testing the cookbook.


Berks will resolve version requirements and dependencies on first run and store these in Berksfile.lock. If new cookbooks become available you can run berks update to update the references in Berksfile.lock. Berksfile.lock will be included in stable branches to provide a known good set of dependencies. Berksfile.lock will not be included in development branches to encourage development against the latest cookbooks.

License and Author

Author Justin Shepherd (
Author Jason Cannavale (
Author Ron Pedde (
Author Joseph Breu (
Author William Kelly (
Author Darren Birkett (
Author Evan Callicoat (
Author Matt Thompson (
Author Matt Ray (
Author Sean Gallagher ()
Author John Dewey (
Author Ionut Artarisi (
Author Mark Vanderwiel (
Author Jan Klare (
Author Lance Albertson (
Copyright Copyright (c) 2012-2013, Rackspace US, Inc.
Copyright Copyright (c) 2012-2013, Opscode, Inc.
Copyright Copyright (c) 2013, AT&T Services, Inc.
Copyright Copyright (c) 2013-2014, SUSE Linux GmbH
Copyright Copyright (c) 2014-2015, IBM, Corp.
Copyright Copyright (c) 2019-2021, Oregon State University

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.