Instead of always creating the mariadb default repository we should
only do it when requested by the node environment.
Do this implicitly via the mariadb_*_install resources that have
an option to decide whether a repo should be set up or not.
Change-Id: I4f62dd7a7df247ddb787553bef58ca81d8e062fb
- the mariadb config looks for the first address on the wsrep_node_address_interface
this will lead to missconfigurations when using virtual IPs - drop it
- mariadb uses when wsrep_node_incoming_address not defined bind-address
or wsrep-node-address in that order. Since bind-address has to be
defined by our cookbook logic, the drop of
wsrep_node_address_interface is no problem
Change-Id: Ic3442522e8f6e02244e653017b6d161a96412425
The hadn't been changed yet to use the resources provided by the new
mariadb cookbook. Also add spec testing.
Change-Id: Ib49cab07c06c4441ae811ca811f614e303024b0b
Upstream distributions have settled on using MariaDB instead of MySQL
and it's becoming more and more difficult to maintain on our end. As
such, we're removing support from this cookbook for MySQL and only leave
MariaDB as the supported platform.
Change-Id: I104de18ecab5ba64f08fd39314e565ab0483c558
This updates us to a new resource driven mariadb cookbook which
simplifies how we manage mysql. Other changes:
- Update to using MariaDB 10.3 instead of 10.1 as we need this for Stein
- Update attributes so they work better with the
mariadb_server_configuration resource
- Remove use of the mysql2_chef_gem cookbook as it's no longer needed
and causes issues with newer versions of MariaDB and MySQL.
- Remove use of the openstack.cnf template since we can add all
configuration using the mariadb_server_configuration resource
- Remove RHEL mariadb-server ChefSpec as it's not needed
- Update openstack-db recipe to use the openstack_database resource
instead of the openstack_common_database resource which was renamed
Depends-On: https://review.opendev.org/710351
Change-Id: Ia5b401cafcdf57aa84e090c745bd3e517c7251bf
This updates all references of let(:chef_run) to cached(:chef_run) to speed up
tests. By doing this, we have to create a new cached(:chef_run) block whenever
we need to adjust node attributes for testing. In addition, add missing spec
file for mysql-client-redhat.
Speed was been improved from 27.66 seconds to 20.78 seconds.
Change-Id: I8c095bb4ca298255e09fd59d0e43878423693636
- 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
- implemented foodcritic and cookstyle corrections
- deprecated node.foo.bar method access for node['foo']['bar'] bracket syntax
- removed deprecated postgresql support
- removed percona-cluster as the Percona cookbook has not been touched since 2015
- switched default rdbms to mariadb[0]
This change was largely born out of a discussion in #sous-chefs on the Chef
Community Slack. The notion of using the vendor-provided package is preferred
in the Chef Community versus the distro version if possible, due to
inconsistencies in outcome. As a result, this cookbook focuses on MariaDB, and
specifically from mariadb.org.
[0]: https://docs.openstack.org/install-guide/environment-sql-database.html
Implements blueprint modern-chef
Change-Id: I7ee0f5eae4e79e5c70ee8de4a0094a7c34fdd18f
- Switched default linter to cookstyle
- Renamed rake tasks to better conform with Chef conventions
- Normalized template banner
Change-Id: I76bdb4149965ab7b23709762559bd6c71753cc8b
- mysql default version is 5.7 on Ubuntu 16.04
- included mysql devel headers for mysql2
- incremented mysql cookbook to 8.0
- incremented database cookbook to 6.0
- pinned mysql2 gem at 0.4.4
Depends-On: I57c8729e8732161ac34caa85259de8264e99c56d
Implements blueprint newton-xenial
Change-Id: I8ee882d5b154ec0d319e6c4186ebf9f8ae68f269
- Bump mysql to 7.2
- Bump mysql2_chef_gem to 1.1.0
- Work around https://github.com/chef/chef-dk/issues/966
- fixes minor bug in postgres-server_spec and server_spec
Change-Id: I6e906c5fad0360a7d9718fc5d5cda2983c3b768e
Depends-On: I07ad79a93642d0f0c934a864fcb9bcd7b764e35f
Implements: blueprint newton-xenial
- add recipes and specs to deploy percona-cluster as db backend
Depends-On: Iae7e302973805af3cb44be1b29d0e61e76eb0aa0
Implements Blueprint: galera-and-percona-support
Change-Id: Ie69e71dce8fa22ef5edc17ed094840fcfb9d4c82
* adapted server recipes to use the address and port defined in the bind_service
attribute instead of the endpoint (endpoint can be different and should only
be used by the services connecting to the db)
* changed get_password 'user' to 'db' for consitency with common
Depends-On: Iae7e302973805af3cb44be1b29d0e61e76eb0aa0
Implements: blueprint cookbook-refactoring
Change-Id: I0afb5942c38ed4e20037f553879de8e2c1a1f75f
* adapted mariadb, mysql and postgresql server recipes to work with net endpoint
logic
* removed suse support
Depends-On: I0547182085eed91d05384fdd7734408a839a9a2c
Impements: blueprint cookbook-refactoring
Change-Id: Ia7fd927f42f4a1e484e8f2d34c52b1dc6d0ce6dd
- replaced db_create_with_user with lwrp from common
- utilized new common attribute openstack.common.services to
dry recipe
- TODO: create test for rescue log message
related-Change-Id: I1940cd63aa1ae95586e6ecbed9476f7ce5fe19ab
Change-Id: Idb47c9b7e3ce954ddd1a544b71b96eed734e46e5
Cleaned up all the minor rubocop issues, the ones left relate to
complex logic and what I think is a bug in rubocop for nested
vs compact modules/class definitions.
Change-Id: I80b0e9671a787e208622b7eed82494f08e288438
- deprecated Gemfile
- updated TESTING and README
- updated Rakefile to use chef exec instead of bundle exec
- replaced Runner by SoloRunner in specs
Change-Id: I2f2bf3e1f193cb43498d0d10da8500ff59a6f5aa
Adding more mysql tuning options to better support production-like
environments. These additional attribues have been set to default
values that match the mysql defaults. Including spec tests.
Change-Id: Iadb0746354ea93a6beef9ecbae5d1bdc5cec1d48
Closes-Bug: #1436481
1. Add 2 new recipes to configure mariadb client and server
2. Partially reuse existing code for mysql support
3. Add delete empty user and users with empty password workaround.
Current mysql cookbook can do this, but mariadb cookbook doesn't.
blueprint: mariadb-support
Change-Id: I034cedb07f8bf11f271fc351f9a7ad534067b95a
mysql cookbook is now provider driven, and no longer has default
attributes, like server_root_password.
For the password, now always using the Common password methods.
For the other mysql attributes we used, these were moved into the
attributes mysql.rb file.
The attribute name space was changed from
[mysql][**attr**] and [mysql][tunable][**attr**] to
[openstack][mysql][**attr**]
This patch requires updates to the database and mysql-chef-gem cookbooks.mysql cookbook ver 6 changes
Change-Id: I05d27de80de0371503c5fa71591b4600bbeb2ca9
Implements: blueprint trusty-juno
* lookup mysql service resource instead of re-declaring it
* use unique name for flush resource as it's two separate uses
Change-Id: I8746e5001ea5cefc497049111f4d2e5e250f26de
Partial-Bug: #1409921
The default of 151 is very small for most openstack use cases.
Picked a higher recommended default that can be overridden as
necessary.
Added stub for newer postgresql cookbook level spec tests.
Change-Id: I0d7b0893d143202f55f04ddcdbc8618aaaacef25
Closes-Bug: #1398527
Set the mysql root password directly on the server resource, so it
does not need to be an attribute. This keeps passwords sourced from
encrypted data bags out of node attributes. Note that as indicated
in https://github.com/opscode-cookbooks/mysql/issues/215 all recipes
will be removed from the mysql cookbook in favor of having consumers
work with the resources directly, thereby providing more flexibility
in terms of how the various configuration settings are sourced.
Including the "server" recipe is not going to be a viable option
once that has happened, so this change not only addresses the
attribute issue, but it will also make upcoming changes to the
mysql cookbook more seamless. Note that the reference to the
default_version_for function had to be removed, because it is no
longer in the cookbook and therefore the build failed. It is no
longer necessary to set the version, as described in the README.md
file:
When [the version parameter is] omitted, it will install the
default MySQL version for the target platform.
Note that the code that sets node attributes in
spec/mysql-server_spec.rb was removed because it was interfering
with the new test and it did not seem to serve any purpose--there
were no failures after it was removed.
blueprint no-secret-attributes
Change-Id: I72be1e2131a107ddc43754bc5cf40a4ce7face95
Now depends on mysql ~> 5.3 and database ~> 2.2.
The mysql-server recipe now uses the mysql cookbook
wrapper method.
Blueprint: move-to-mysql-v5
Change-Id: I74111ead1555c46d32c3e096c380fec27b3ef593
This change gives us new capabilities, such as matching notifies and
subscribes of resources.
Implements: blueprint chefspec-3-4
Change-Id: Ib287817f935c1622a4d1f2f1539dcb0f31fd4aff
Addresses: bug #1277041
Implements: blueprint centos-rhel-for-ops-database
By default mysql binds to 127.0.0.1. Setting the bind_ip attribute to
something else, as we do in the ops-database cookbook before calling the
mysql::server recipe, causes the my.cnf to be populated with the correct IP.
However, because of this bug in the upstream mysql cookbook:
https://tickets.opscode.com/browse/COOK-4161
mysql does not get restarted (it only gets reloaded)
and so the new bind_ip does not take effect.
This commit adds a workaround until the upstream bug is fixed. The
workaround directly modifies the template resource from the resource
collection to add a 'restart mysql' notification.
** This particular patchset builds on the last by adding support for
rhel/centos which use a different name for the my.cnf template resource **
Change-Id: I357bf1458a1781189922032cdc8da8ad9e0a03a7