Commit Graph

21 Commits

Author SHA1 Message Date
Lance Albertson c72c025288 Remove support for mysql
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
2020-03-30 13:50:33 -07:00
Lance Albertson 1633b31586 Improve ChefSpec test speed by enabling caching
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
2019-12-07 17:12:54 -08:00
Lance Albertson db48ab1fdc 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
2019-12-06 10:38:09 +00:00
Samuel Cassiba e302e88e25 starting rocky development patch
Change-Id: If050a2d628edce724031bb19deb45f196ceb4a66
2018-08-03 06:28:33 -07:00
Jan Klare c07b0f75fa update cookbook dependencies for next release
Depends-On: Ib256c315d5439beb8d4ec83c5cc7d7c9b182378a
Change-Id: I50df0befac140660d58eccb939d33a83edbb441c
2016-12-07 11:24:03 +01:00
Samuel Cassiba eb3c4081f1 Incremented MySQL to 5.7 for Ubuntu
- 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
2016-10-18 23:19:32 -07:00
Jan Klare d1400a6f23 move from bundler to chefdk
- 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
2015-04-29 10:29:08 +02:00
Mark Gloshen acc54b2680 Add additional mysql tunables
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
2015-04-09 15:13:03 -07:00
Mark Vanderwiel baa3b76fcb MySql cookbook ver 6 changes
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
2015-02-13 08:10:31 -06:00
Mark Vanderwiel 408ad33b3f Cleanup CHEF-3694 cloning warnings
* 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
2015-01-12 15:59:24 -06:00
Mark Vanderwiel a27cfab06e Allow max_connections to be overridden for mysql server
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
2014-12-02 15:28:39 -06:00
John Warren 24092e6851 Set mysql root password directly on resource
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
2014-09-16 14:30:45 -04:00
bradkwadsworth 66b73078b0 Update database and mysql dependency.
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
2014-07-15 15:15:49 -05:00
Ionuț Arțăriși 9e3fa4adb3 refactor chefspec tests to be cleaner and faster
Implements: blueprint refactor-spec-files
Change-Id: Iaf86f8a53816c8100ef6262fd976fee417e8eb8b
2014-03-10 16:18:59 +01:00
Darren Birkett 0ae59969eb Fix issue with mysql not restarting on new bind_ip
Addresses: bug #1277041

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.

Change-Id: I4f59e9f7fecb5040532948d0bb07d49385280a48
2014-02-06 14:53:11 +00:00
Andy McCrae 84c491f236 Update spec files to be rubocop compliant
- Update .rubocop.yml to include spec/**
- Update metadata.rb to be rubocop compliant
- Update spec files to be rubocop compliant

Change-Id: If059f01f46102282ffeed9323f6e06fa78f8597c
Addresses: blueprint rubocop-for-ops-database
2014-01-21 16:52:29 +00:00
Ionuț Arțăriși 95a1893e54 upgrade to Havana
Update:
 - chefspec ~> 3.0.2
 - foodcritic ~> 3.0.3
 - berkshelf ~> 2.0.10

Change-Id: Ic415c2c932f7c80eacdba56acb10a9e423394b27
2013-12-12 09:37:05 +01:00
galstrom21 95b18479e3 Setting tunable[skip-name-resolve] to true
If tunable[skip-name-resolve] is set to false, hostname resolution
can cause auth issues.

Change-Id: I34b3b530786239c3c42ff1d8a44c536fea82f125
2013-10-17 21:28:15 -05:00
Jay Pipes 11008b1700 Rework deletion of insecure users
Due to a bug in MySQL [1] -- or possibly the Ubuntu MySQL server
packages -- issuing a call to DROP USER fails consistently when
provisioning a node with the recipes/mysql-server.rb recipe.

This reworks the DROP USER to a DELETE call on the mysql.user
table. Note that the DROP USER is preferred over the call to
manually DELETE FROM mysql.user because Galera cluster does not
replicate DELETE events on MyISAM tables but does replicate
DROP USER events [2]. So, when the MySQL bug is fixed or a
workaround is found, we should revert this patch.

[1] http://bugs.mysql.com/bug.php?id=69644
[2] http://www.codership.com/wiki/doku.php?id=limitations

Change-Id: I0fab1a0f85d55eab96984064131d14a21b2236e3
2013-07-02 14:24:37 -04:00
John Dewey 6e0df1d809 Prep work before adding each db recipe
Brought in openstack-common as a dep.  Updated the tests to
better match what the recipes are doing (added tests where
missing).  Updated attributes to match the format of our other
cookbooks.  This is mostly some cleanups, to prepare for features.
Since this cookbook is not in use, made a larger commit than
would have if adding functionality to a released cookbook.  Also,
upgraded to new Berkshelf which handles locking to cookbooks properly.

Change-Id: I8e4123d30012a9890ce3029184e1396d2083a6f1
2013-06-25 18:12:21 -07:00
Matt Ray 834838bcdc Basic testing of the ops-database recipes.
This creates basic testing of the recipes as well as remove unused code such as
the fedora support and the use of passing attributes to openstack::packages.

Change-Id: Iece19811151fbdfd067e12d3b3163cfb78174e49
2013-06-04 14:25:48 -05:00