Updates for rocky
- Replace git.openstack.org with opendev.org - Update some documentation - Move README.md to README.rst for better rendering - Drop obsolete bootstrap.sh script - Adopt default mysql dir from updated cookbook Change-Id: I94a066975fe00a29ff6731021767b1eda294ba44
This commit is contained in:
parent
f39188d0c6
commit
db48ab1fdc
149
README.md
149
README.md
|
@ -1,149 +0,0 @@
|
|||
Team and repository tags
|
||||
========================
|
||||
|
||||
[![Team and repository tags](http://governance.openstack.org/badges/cookbook-openstack-ops-database.svg)](http://governance.openstack.org/reference/tags/index.html)
|
||||
|
||||
<!-- Change things from this point on -->
|
||||
|
||||
![Chef OpenStack Logo](https://www.openstack.org/themes/openstack/images/project-mascots/Chef%20OpenStack/OpenStack_Project_Chef_horizontal.png)
|
||||
|
||||
# Description #
|
||||
|
||||
This cookbook provides a reference example of database configuration for the OpenStack deployment provided by Chef for OpenStack. It currently supports MySQL and PostgreSQL.
|
||||
|
||||
# Requirements #
|
||||
|
||||
ChefDK 0.15.15 with Ruby 2.1.x required.
|
||||
|
||||
# Platforms #
|
||||
|
||||
* Ubuntu-14.04
|
||||
* SLES 11 SP3
|
||||
* RHEL/CentOS 7.0
|
||||
|
||||
# Cookbooks #
|
||||
|
||||
The following cookbooks are dependencies:
|
||||
|
||||
* database
|
||||
* openstack-common
|
||||
* mysql
|
||||
* mysql2_chef_gem
|
||||
* postgresql
|
||||
|
||||
# Usage #
|
||||
|
||||
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.
|
||||
|
||||
# Resources/Providers #
|
||||
|
||||
None
|
||||
|
||||
# Templates #
|
||||
|
||||
None
|
||||
|
||||
# Recipes #
|
||||
|
||||
## client ##
|
||||
|
||||
- database client configuration, selected by attributes
|
||||
|
||||
## server ##
|
||||
|
||||
- database server configuration, selected by attributes
|
||||
|
||||
## mysql-client ##
|
||||
|
||||
- calls mysql::ruby and mysql::client and installs the mysql client python packages
|
||||
|
||||
## mysql-server ##
|
||||
|
||||
- configures the mysql server for OpenStack
|
||||
|
||||
## postgresql-client ##
|
||||
|
||||
- calls postgresql::ruby and postgresql::client and installs the postgresql client python packages
|
||||
|
||||
## postgresql-server ##
|
||||
|
||||
- configures the PostgreSQL server for OpenStack
|
||||
|
||||
## openstack-db ##
|
||||
|
||||
- creates necessary tables, users, and grants for OpenStack
|
||||
|
||||
# Attributes #
|
||||
|
||||
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"]["scheme"]` - Unused at this time
|
||||
* `openstack["endpoints"]["db"]["port"]` - The port to bind the database service to
|
||||
* `openstack["endpoints"]["db"]["path"]` - Unused at this time
|
||||
* `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: http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html
|
||||
|
||||
Testing
|
||||
=====
|
||||
|
||||
Please refer to the [TESTING.md](TESTING.md) for instructions for testing the cookbook.
|
||||
|
||||
Berkshelf
|
||||
=====
|
||||
|
||||
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 (<justin.shepherd@rackspace.com>) |
|
||||
| **Author** | Jason Cannavale (<jason.cannavale@rackspace.com>) |
|
||||
| **Author** | Ron Pedde (<ron.pedde@rackspace.com>) |
|
||||
| **Author** | Joseph Breu (<joseph.breu@rackspace.com>) |
|
||||
| **Author** | William Kelly (<william.kelly@rackspace.com>) |
|
||||
| **Author** | Darren Birkett (<darren.birkett@rackspace.co.uk>) |
|
||||
| **Author** | Evan Callicoat (<evan.callicoat@rackspace.com>) |
|
||||
| **Author** | Matt Thompson (<matt.thompson@rackspace.co.uk>) |
|
||||
| **Author** | Matt Ray (<matt@opscode.com>) |
|
||||
| **Author** | Sean Gallagher (<sean.gallagher@.att.com>) |
|
||||
| **Author** | John Dewey (<jdewey@att.com>) |
|
||||
| **Author** | Ionut Artarisi (<iartarisi@suse.cz>) |
|
||||
| **Author** | Mark Vanderwiel (<vanderwl@us.ibm.com>) |
|
||||
| **Author** | Jan Klare (<j.klare@x-ion.de>) |
|
||||
| | |
|
||||
| **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. |
|
||||
|
||||
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
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
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.
|
|
@ -0,0 +1,212 @@
|
|||
OpenStack Chef Cookbook - ops-database
|
||||
======================================
|
||||
|
||||
.. image:: https://governance.openstack.org/badges/cookbook-openstack-ops-database.svg
|
||||
:target: https://governance.openstack.org/reference/tags/index.html
|
||||
|
||||
Description
|
||||
===========
|
||||
|
||||
This cookbook provides a reference example of database configuration for
|
||||
the OpenStack deployment provided by Chef for OpenStack. It currently
|
||||
supports MySQL and PostgreSQL.
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
- Chef 14 or higher
|
||||
- ChefDK 3.2.30 for testing (also includes Berkshelf for cookbook
|
||||
dependency resolution)
|
||||
|
||||
Platforms
|
||||
=========
|
||||
|
||||
- ubuntu
|
||||
- redhat
|
||||
- centos
|
||||
|
||||
Cookbooks
|
||||
=========
|
||||
|
||||
The following cookbooks are dependencies:
|
||||
|
||||
- 'mariadb', '~> 1.5'
|
||||
- 'mysql2_chef_gem' , '~> 2.0'
|
||||
- 'mysql', '~> 8.2'
|
||||
- 'openstack-common', '~> 18.0.0'
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
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.
|
||||
|
||||
Resources/Providers
|
||||
===================
|
||||
|
||||
None
|
||||
|
||||
Templates
|
||||
=========
|
||||
|
||||
None
|
||||
|
||||
Recipes
|
||||
=======
|
||||
|
||||
client
|
||||
------
|
||||
|
||||
- Installs client packages for the database used by the deployment.
|
||||
|
||||
server
|
||||
------
|
||||
|
||||
- Installs and configures server packages for the database used by the
|
||||
deployment.
|
||||
|
||||
mysql-client
|
||||
------------
|
||||
|
||||
- Installs MySQL client packages and mysql client python packages.
|
||||
|
||||
mysql-server
|
||||
------------
|
||||
|
||||
- Configures the MySQL server for OpenStack.
|
||||
|
||||
mariadb-client
|
||||
--------------
|
||||
|
||||
- Installs MariaDB client packages.
|
||||
|
||||
mariadb-server
|
||||
--------------
|
||||
|
||||
- Installs and configures MariaDB server packages.
|
||||
|
||||
mariadb-cluster-client
|
||||
----------------------
|
||||
|
||||
- Installs MariaDB Cluster client packages.
|
||||
|
||||
mariadb-cluster-server
|
||||
----------------------
|
||||
|
||||
- Installs and configures MariaDB Cluster server packages.
|
||||
|
||||
openstack-db
|
||||
------------
|
||||
|
||||
- Creates necessary tables, users, and grants for OpenStack.
|
||||
|
||||
Attributes
|
||||
==========
|
||||
|
||||
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:
|
||||
http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html
|
||||
|
||||
Testing
|
||||
=======
|
||||
|
||||
Please refer to the `TESTING.md`_ for instructions for testing the cookbook.
|
||||
|
||||
.. _TESTING.md: cookbook-openstack-ops-database/src/branch/master/TESTING.md
|
||||
|
||||
Berkshelf
|
||||
=========
|
||||
|
||||
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 (justin.shepherd@rackspace.com) |
|
||||
+-----------------+---------------------------------------------------+
|
||||
| **Author** | Jason Cannavale (jason.cannavale@rackspace.com) |
|
||||
+-----------------+---------------------------------------------------+
|
||||
| **Author** | Ron Pedde (ron.pedde@rackspace.com) |
|
||||
+-----------------+---------------------------------------------------+
|
||||
| **Author** | Joseph Breu (joseph.breu@rackspace.com) |
|
||||
+-----------------+---------------------------------------------------+
|
||||
| **Author** | William Kelly (william.kelly@rackspace.com) |
|
||||
+-----------------+---------------------------------------------------+
|
||||
| **Author** | Darren Birkett (darren.birkett@rackspace.co.uk) |
|
||||
+-----------------+---------------------------------------------------+
|
||||
| **Author** | Evan Callicoat (evan.callicoat@rackspace.com) |
|
||||
+-----------------+---------------------------------------------------+
|
||||
| **Author** | Matt Thompson (matt.thompson@rackspace.co.uk) |
|
||||
+-----------------+---------------------------------------------------+
|
||||
| **Author** | Matt Ray (matt@opscode.com) |
|
||||
+-----------------+---------------------------------------------------+
|
||||
| **Author** | Sean Gallagher () |
|
||||
+-----------------+---------------------------------------------------+
|
||||
| **Author** | John Dewey (jdewey@att.com) |
|
||||
+-----------------+---------------------------------------------------+
|
||||
| **Author** | Ionut Artarisi (iartarisi@suse.cz) |
|
||||
+-----------------+---------------------------------------------------+
|
||||
| **Author** | Mark Vanderwiel (vanderwl@us.ibm.com) |
|
||||
+-----------------+---------------------------------------------------+
|
||||
| **Author** | Jan Klare (j.klare@x-ion.de) |
|
||||
+-----------------+---------------------------------------------------+
|
||||
|
||||
+-----------------+---------------------------------------------------+
|
||||
| **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. |
|
||||
+-----------------+---------------------------------------------------+
|
||||
|
||||
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
|
||||
|
||||
::
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
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.
|
2
Rakefile
2
Rakefile
|
@ -33,7 +33,7 @@ end
|
|||
desc "All-in-One Neutron build Infra using Common task"
|
||||
task :integration do
|
||||
# Use the common integration task
|
||||
sh %(wget -nv -t 3 -O Rakefile-Common https://raw.githubusercontent.com/openstack/cookbook-openstack-common/master/Rakefile)
|
||||
sh %(wget -nv -t 3 -O Rakefile-Common https://opendev.org/openstack/cookbook-openstack-common/raw/branch/master/Rakefile)
|
||||
load './Rakefile-Common'
|
||||
Rake::Task["common_integration"].invoke
|
||||
end
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/bash -x
|
||||
## This script is for installing all the needed packages on trusty to run the chef tests with 'chef exec rake'.
|
||||
## It relies on the common bootstrap.sh from openstack/cookbook-openstack-common for installing common dependencies.
|
||||
|
||||
curl https://raw.githubusercontent.com/openstack/cookbook-openstack-common/master/bootstrap.sh \
|
||||
--retry 3 \
|
||||
--silent \
|
||||
--show-error \
|
||||
| /bin/bash -x
|
|
@ -22,9 +22,9 @@ end
|
|||
depends 'openstack-common', '>= 18.0.0'
|
||||
|
||||
depends 'mariadb', '~> 1.5'
|
||||
depends 'mysql', '~> 8.2'
|
||||
depends 'mysql', '~> 8.6'
|
||||
depends 'mysql2_chef_gem', '~> 2.0'
|
||||
|
||||
issues_url 'https://launchpad.net/openstack-chef' if respond_to?(:issues_url)
|
||||
source_url 'https://github.com/openstack/cookbook-openstack-ops-database' if respond_to?(:source_url)
|
||||
chef_version '>= 12.5' if respond_to?(:chef_version)
|
||||
issues_url 'https://launchpad.net/openstack-chef'
|
||||
source_url 'https://opendev.org/openstack/cookbook-openstack-ops-database'
|
||||
chef_version '>= 14.0'
|
||||
|
|
|
@ -17,7 +17,7 @@ describe 'openstack-ops-database::mariadb-client' do
|
|||
end
|
||||
|
||||
it 'installs mariadb python client packages' do
|
||||
expect(chef_run).to install_package('python-mysqldb')
|
||||
expect(chef_run).to install_package('python3-mysqldb')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,7 +18,7 @@ describe 'openstack-ops-database::mysql-client' do
|
|||
end
|
||||
|
||||
it 'installs mysql packages' do
|
||||
expect(chef_run).to install_package 'python-mysqldb'
|
||||
expect(chef_run).to install_package 'python3-mysqldb'
|
||||
expect(chef_run).to install_package 'libmysqlclient-dev'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -16,7 +16,7 @@ describe 'openstack-ops-database::mysql-server' do
|
|||
it 'creates mysql default service' do
|
||||
expect(chef_run).to create_mysql_service('default').with(
|
||||
version: '5.7',
|
||||
data_dir: '/var/lib/mysql-default',
|
||||
data_dir: '/var/lib/mysql',
|
||||
initial_root_password: 'abc123',
|
||||
bind_address: '127.0.0.1',
|
||||
port: '3306',
|
||||
|
|
Loading…
Reference in New Issue