Commit Graph

32 Commits

Author SHA1 Message Date
Ghanshyam Mann 9460c5eb70 Retire openstack-chef: remove repo content
OpenStack-chef project is retiring
- https://review.opendev.org/c/openstack/governance/+/905279

this commit remove the content of this project repo

Depends-On: https://review.opendev.org/c/openstack/project-config/+/909134
Change-Id: I4892478f3e2397820e354ff15859fb992b3512e4
2024-02-17 20:49:57 -08:00
Lance Albertson 5e26af7d04 CentOS 8 support
- Update ChefSpec

Depends-On: https://review.opendev.org/c/openstack/openstack-chef/+/814234
Depends-On: https://review.opendev.org/c/openstack/cookbook-openstack-common/+/814235
Change-Id: I832a910d9054c2ddfde28ed2522efe7c0f414588
Signed-off-by: Lance Albertson <lance@osuosl.org>
2021-10-22 10:47:21 -07:00
Lance Albertson f3c9fca120 Cookstyle 6.19.5 fixes
Depends-On: https://review.opendev.org/756168
Change-Id: Ia379098ac40eee7a6627fe10b9320ff59468391f
Signed-off-by: Lance Albertson <lance@osuosl.org>
2020-10-05 17:04:22 -07:00
Dr. Jens Harbott 601c814995 Fix mariadb-cluster-server recipe
The hadn't been changed yet to use the resources provided by the new
mariadb cookbook. Also add spec testing.

Change-Id: Ib49cab07c06c4441ae811ca811f614e303024b0b
2020-04-07 14:34:39 +00:00
Lance Albertson 0971f7a8a1 Use Ubuntu 18.04 for ChefSpec tests
Change-Id: Iae639349a798264dc960dbf79568674a993cb87b
2020-01-06 11:41:11 -08: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
Samuel Cassiba 0eec9ecac8 Chef 14 stable release updates and fixes
This change corrects some of the issues with resource naming[1] as well
as prunes some failing unit tests that would be obsoleted with the changes
in the service renaming[2].

[1]: https://docs.chef.io/ruby.html#use-of-hyphens
[2]: https://review.openstack.org/#/q/topic:chef_14_fixes+(status:open+OR+status:merged)

Depends-On: Ic2b6d8f1cdf719791faaebdbd7e29e789eb3f31c
Change-Id: I8efc34c220fec59826bbea51e3ebf3fbc0e5b530
2018-12-20 21:45:30 -08:00
Samuel Cassiba 45a1623cb2 ops-database refactor for Pike and Chef 13
- 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
2018-01-11 10:36:09 -08:00
Samuel Cassiba b876cd00e5 Initial ops-database Pike updates
- Switched default linter to cookstyle
- Renamed rake tasks to better conform with Chef conventions
- Normalized template banner

Change-Id: I76bdb4149965ab7b23709762559bd6c71753cc8b
2017-08-25 09:58:14 -04: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
Samuel Cassiba 57042a006e Style and lint fixes to support newer ChefDK
Change-Id: I7b8521a85bace612911f967fe4e35269b7b47034
Depends-On: I6ce4587caa3ae68ddbd3ef1a521aaf46f4840b2c
2016-07-01 18:10:31 -07:00
Jan Klare 856c3a24ab add percona-cluster recipes
- add recipes and specs to deploy percona-cluster as db backend

Depends-On: Iae7e302973805af3cb44be1b29d0e61e76eb0aa0
Implements Blueprint: galera-and-percona-support
Change-Id: Ie69e71dce8fa22ef5edc17ed094840fcfb9d4c82
2016-02-24 14:36:01 +00:00
Jan Klare 866dfbb3af use bind_service attribute instead of endpoints
* 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
2016-02-23 21:38:30 +00:00
Jan Klare 69ae909123 adaptions to work with refactored cookbooks
* 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
2016-02-08 10:31:51 +01:00
Mark Vanderwiel 31dbc3f06e Move to rhel 7.1
rhel 7.0 is not EUS/LTS, need to switch to 7.1.

Change-Id: I16ecb7386f0f8a73204b66305181162a3ce01c74
Related-Bug: #1438878
2015-03-31 15:21:13 -05:00
Mark Vanderwiel dd73185f71 Trusty juno updates
* update spec platform versions

Change-Id: Ib177a9a7fa0be853ef46b1ed59a0c0375b4f0103
Implements: blueprint trusty-juno
2015-02-02 16:47:14 -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
Mark Vanderwiel 9b1fba5120 Setting up repo for master Juno branch
* Update metadata versions
* Updates for icehouse specific attributes
* Removing Strainer file
* Updating Gems
  * chef (11.12.0)
  * chefspec (4.0.0)
  * rspec (3.0.0)
* Cleanup specs for 4.x

Change-Id: I077b2e9e9906f7a52e8304d70df1075fcb99bbf9
Partial-Bug: 1349865
2014-07-29 15:38:00 -05:00
Mark Vanderwiel a2515d45af Fix fauxhai platform versions for suse
Change-Id: I3382583024e39c0567d17c074efe0760a81c266b
Partial-Bug: #1344199
2014-07-18 13:09:16 -05:00
Stephan Renatus fce85a5a69 Update ChefSpec to 3.4.0
This change gives us new capabilities, such as matching notifies and
subscribes of resources.

Implements: blueprint chefspec-3-4
Change-Id: Ib287817f935c1622a4d1f2f1539dcb0f31fd4aff
2014-03-28 17:38:34 +01: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
galstrom21 3faacb188c Add ChefSpec::Coverate to spec_helper.rb
Change-Id: I96db2b0c255c044598bd55b39e7003a7125803ef
Addresses: blueprint lint-and-unit-testing-for-havana
2014-02-18 14:52:46 +00:00
Ionuț Arțăriși 17226c01ca change test to use SLES platform instead of openSUSE
Change-Id: I71a6628c2c84dcd09d073528381eb295ecc33f7d
2014-02-17 11:30:19 +00:00
Darren Birkett c2e1b2e539 Fix issue with mysql not restarting on new bind_ip - RHEL/CENTOS
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
2014-02-07 10:26:42 +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
Matt Thompson 08cdaa84c7 Update spec_helper to include 'chefspec/berkshelf'
This minor change allows you to run rspec outside of strainer while
still having cookbook dependencies automatically handled by berkshelf
(which also means you can run individual chefspec tests).

Note that this change does marginally increase the time it takes to run
a strainer test.

A similar change was recently accepted in the openstack-compute
cookbook.

Change-Id: I3cb98dd54675d9ff2bff340425378b34b021d9da
2014-01-09 10:42:52 +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
Ionuț Arțăriși 374579d4ff add SUSE platform support
Change-Id: Icef223be7ef1deaa9dd5f04616a8ee5497925c67
2013-07-08 15:50:23 +02: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
Jay Pipes 27911c00eb Brings in Matt's openstack-ops-database work
Just bring in Matt's original work on the ops-database
cookbook.

Corrects what I think was a typo for the database service
role name attribute from openstack::role::database to
openstack::database::server_role

Brings in Berksfile and Gemfile and stubbed specs to pass
gates. Also sets version to 7.0.0 to match semantic versions
of openstack project cookbooks.

Change-Id: Idc02435ff7d3ff4b8a04c2bfc5abbb1e3091cb68
2013-05-29 12:36:07 -04:00