Commit Graph

54 Commits

Author SHA1 Message Date
Ghanshyam Mann 48c2e02d00 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: I028dee11bce572e0ceaa8b2f1dab22a1abe00779
2024-02-17 20:49:30 -08:00
Lance Albertson 6d907dedf3 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: I4593ffcb9700b232a1879a08e6bbd9cdaf76c222
Signed-off-by: Lance Albertson <lance@osuosl.org>
2021-10-22 10:46:43 -07:00
Lance Albertson 89013931c2 Cookstyle 6.19.5 fixes
Depends-On: https://review.opendev.org/756168
Change-Id: I37569390af252c1270d7e98aa03c062519a46992
Signed-off-by: Lance Albertson <lance@osuosl.org>
2020-10-05 17:06:01 -07:00
Lance Albertson 3d8f183879 Use Ubuntu 18.04 for ChefSpec tests
Change-Id: Ia6b03e3c45770495df0ba322e176f369347b9b7d
2020-01-06 11:42:56 -08:00
Lance Albertson 3b508052a1 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.

Speed was improved from 24.75 seconds to 14.75 seconds.

Change-Id: Ib5bea5c649a80677b673099a55c1c965b9d38390
2019-12-07 21:31:34 -08:00
Lance Albertson 3abf7d79a1 Switch RHEL to using distribution packages for rabbitmq
Installing rabbitmq without using the distro version is failing and it works if
you use the distro version. So let's standardize on that for both ubuntu and
RHEL.

Change-Id: If757cf57574bb8389ae270523bfc3772d8dc08db
Signed-off-by: Lance Albertson <lance@osuosl.org>
2019-06-16 10:48:18 -07:00
Samuel Cassiba 6ee7501c83 starting queens development patch and use git.openstack.org
* use git.openstack.org instead of github for berks dependency
resolution
* drop unnecessary test, as TLS is the default install

Change-Id: I58b140b6548eb7f8e3317ce566a7082623c9fc4f
2018-03-06 09:50:37 -08:00
Samuel Cassiba d41044ce64 ops-messaging refactor for Pike and Chef 13
- implemented foodcritic and cookstyle corrections
- deprecated node.foo.bar method access for node['foo']['bar'] bracket access
- updated for the most recent upstream rabbitmq cookbook

Implements blueprint modern-chef

Change-Id: If971a472c1fd9149a891200548a267655620fce2
Depends-On: I143e0ed0a2bdd76269fc0c402052696426d96d81
2017-11-28 17:00:50 +00:00
Samuel Cassiba 7ddc2b7c7f Initial ops-messaging Pike updates
- Switched default linter to cookstyle
- Renamed rake tasks to better conform with Chef conventions

Change-Id: I84ebeb49823b022e85dddea9fcdd358b27be50a3
2017-08-25 10:08:10 -04:00
Jan Klare 0597b9fa53 adapt specs to fit new rabbitmq user username "openstack"
Change-Id: Ic0c6eff8c8d4a75212658140f81eaa7ab70f1be8
2017-05-29 12:06:05 +02:00
Jenkins 4c915806b5 Merge "rabbitmq cluster_nodes attributes should be array of hashes" 2016-07-11 15:38:48 +00:00
Jan Klare 2064bd3d98 rabbitmq cluster_nodes attributes should be array of hashes
Change-Id: I471ef78d72adc76848e6c04322918d81093530dd
2016-07-07 09:43:49 +02:00
Samuel Cassiba 82739b2c2d Style and lint fixes to support newer ChefDK
Change-Id: If444be3354ed0f9ec961cc2fe726e53645dba87a
Depends-On: I6ce4587caa3ae68ddbd3ef1a521aaf46f4840b2c
2016-07-03 10:18:50 -07:00
Jan Klare 503703fb2b use bind_service instead of endpoints and cluster properly
* rabbitmq should use the bind_service attribute instead of the endpoint one,
  since these could be different
* adapted rabbitmq clustering attributes
* adapted rabbitmq clustering search to point to recipe instead of role

Depends-On: Iae7e302973805af3cb44be1b29d0e61e76eb0aa0
Implements: blueprint cookbook-refactoring
Change-Id: I08ed288e63422078d9beb36d14fd3c05f1cac435
2016-02-16 15:58:10 +01:00
Jan Klare 1e0a81aecd adaptions to work with refactored cookbooks
* adapted rabbitmq-server recipe to fit new endpoint logic
* removed unneeded server recipe
* fixed typo in rabbitmq-server recipe (port -> ssl_port) attribute
* adapted specs to properly check for ssl configuration

Depends-On: I0547182085eed91d05384fdd7734408a839a9a2c
Implements: blueprint cookbook-refactoring
Change-Id: I80ed8a7892b59f7fd582505445a31b0df8d68752
2016-02-08 10:42:52 +01:00
Mark Vanderwiel cf939baa6c Cleanup minor rubocop offenses
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: I455efbb3f2c97a21dc16d4a9d7909afeaae18565
2015-05-29 12:06:02 -05:00
Jan Klare a81078a2d0 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: I5300850921f0af06ba65d3a0f7cf681f609e5868
2015-04-29 10:35:33 +02:00
Mark Vanderwiel 95b7381124 Move to rhel 7.1
rhel 7.0 is not EUS/LTS, need to switch to 7.1.

Change-Id: Id62385b1a8d066ddb96e70634b936dd3a0e6639c
Related-Bug: #1438878
2015-03-31 15:21:14 -05:00
Jenkins 09076c872e Merge "Trusty juno updates" 2015-02-10 19:07:31 +00:00
Mark Vanderwiel d5099d541b Trusty juno updates
* update spec platform versions

Change-Id: I9735dd3e04355bcf82c1f380325ac16baddf2ec9
Implements: blueprint trusty-juno
2015-02-02 16:34:19 -06:00
Mark Vanderwiel e706132417 Allow on-the-fly mq clusters
Add attribute to allow mq cluster to be built on-the-fly rather
than searching nodes.

Change-Id: I1196f95465c0cb21824954feb261b9d1cfd84d26
Closes-Bug: #1412886
2015-01-21 14:24:00 +00:00
wenchma 12e3502ed8 Add another workaround for the issue#153 of rabbit cookbook
Append the patch https://review.openstack.org/#/c/128203/

Change-Id: I5a47a652b7285e2ac902355475d0680d642ca54e
Closes-Bug: #1380940
2014-10-31 09:49:17 +08:00
wenchma 4a0b9cf241 Add a temp workaround for an issue #153 in rabbit cookbook
After configuring rabbitmq, restart the service to make configuration
take effect. So during OpenStack deployment, OpenStack services can
connect to rabbitmq successfully.
This workaround will notify rabbitmq-server to restart immediately.
This could be remove once the issue #153 is fixed in rabbit cookbook.

Change-Id: Ib017226f46c7e26429bb26df5b63525e1a98bc82
Closes-Bug: #1380940
2014-10-22 23:18:51 +08:00
wenchma 0b087d93f3 No need to push our rabbit user/pass to rabbit cookbook
Because the rabbit user/pass is stored in internal user database,
no need to push them to rabbit cookbook and expose them in config file.
And configuring rabbitmq default password with clear test is insecure,
so remove it.

Change-Id: Iab95e2dc8cd28b4a45574cf8883f1626dc332db0
Closes-Bug: #1381343
2014-10-17 09:42:19 +08:00
wenchma c9559630c6 Fix the conflict configuration on rabbitmq port
In current logic, rabbitmq port will be set to ssl-listening port,
this will make rabbitmq fail to start.
This submit will configure rabbitmq port for both ssl and non-ssl cases.

Closes-Bug: #1353884

Change-Id: I37dc9b656c553554b9bc636fe35c69744debe92a
2014-08-26 09:34:58 +08:00
Mark Vanderwiel ae3c6a862f 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: Ibb18b6a2a523c123ffd96f14cc81d958a308b313
Partial-Bug: 1349865
2014-07-29 15:37:25 -05:00
Mark Vanderwiel 626417a9cc Fix fauxhai platform versions for suse
Change-Id: Iec12448498a04dae329ca661945cd976cdf8d257
Partial-Bug: #1344199
2014-07-18 13:09:52 -05:00
galstrom21 ea38fd69c3 Remove local rabbitmq lwrp chefspec matchers
All tests for the rabbitmq lwrps are now using matchers provided by the
upstream rabbitmq cookbook.

Change-Id: I60156f22052c625e6d2629b11c0e34463ee8e317
Closes-Bug: #1299125
2014-04-01 07:56:08 -05:00
Stephan Renatus c83fb23d83 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: I19512d459f25525932b84ee43961e1f71a39cb15
2014-03-28 17:41:14 +01:00
Chris Dearborn 0db09aba5d Add ability to specify IP for service
The problem that this change addresses is that the address_for method
will not work correctly if there are multiple IP address associated
with the specified interface.

The approach to solving this problem and moving towards the overall
goal of having one place where service networking information is
stored is to convert address_for calls into endpoints, and add a
address() method to the endpoints interface for IP address resolution.

The address() method has the following behavior: if the
bind_interface of an endpoint is set, then the IP is looked up on
the interface.  Otherwise, the IP specified in the host attribute is
returned.  This allows the caller to choose either method of
determining what IP a service will be bound to.

This initial change switches both the openstack-ops-database and
openstack-ops-messaging cookbooks over to use endpoints instead of
address_for.  The other cookbooks will be switched over time.

blueprint increase-ip-binding-flexibility

Change-Id: I4a610409b9542a4c802f94b557299bb97dd0781b
2014-03-10 10:16:16 -04:00
galstrom21 80a8176ecf Adding tests for untouched resources
Change-Id: I0aae1d2336f96d35e64191da2dcb5c58ab47896b
Addresses: blueprint lint-and-unit-testing-for-havana
2014-02-27 14:08:28 -06:00
galstrom21 40f8140e17 Refactoring chefspec tests
Change-Id: Ifb11af44da87fec7a8d0018a7db36bbd8b1989de
Addresses: blueprint refactor-spec-files
2014-02-27 10:59:01 -06:00
Darren Birkett bc66b00cd9 Install rabbitmq-server from rabbit site for CentOS/RHEL
Fixes: bug 1282041
Implements: blueprint centos-rhel-for-ops-messaging

On CentOS/RHEL, the OS base repos don't have a package for
rabbitmq-server.  The rabbitmq cookbook by default expects to be able to
install the latest rabbitmq-server rpm from the rabbitmq site
(use_distro_version = false).  However, in our cookbooks we are overriding
'use_distro_version' to true, which works for ubuntu as it has a
rabbitmq-server package in it's base repo

This commit basically leaves the use_distro_version flag as false unless
ubuntu/suse is the platform_family, so that CentOS/RHEL can grab the rpm
from the rabbitmq site

Change-Id: I4e31cbb4957f0e696a1528fa3f7c6c80695989ac
2014-02-26 10:44:51 +00:00
galstrom21 e4c5a5db52 Adding ChefSpec::Coverage to spec_helper.rb
Change-Id: Ia40b7be0c24afd4220550e043833304a25e88e93
Addresses: blueprint lint-and-unit-testing-for-havana
2014-02-18 14:04:08 +00:00
Matt Thompson ed732f0832 Clean up cookbook for bp/clean-up-attr-for-mq-and-db
This change removes the attributes we'll be moving to openstack-common
and changes reference of those attributes to reflect new (more
consistent) namespace.

Change-Id: I1602d2e6241a62b188d64fa760786fb95a734404
Implements: blueprint clean-up-attr-for-mq-and-db
2014-01-28 21:19:07 +00:00
Matt Ray d90dd16ab5 Single .rubocop.yml file for all Ruby files, attributes cleanup.
Also changed email & company name.

Addresses: blueprint rubocop-for-ops-messaging
Change-Id: I1bb991184f813bc574e1c6a4f5de3030b82c0b49
2014-01-17 15:13:17 -06:00
Andy McCrae 53bf5ec59d Update spec to be rubocop compliant
- Add rubocop.yml in spec/
- Add spec rubocop tests in Strainerfile
- Update spec files to comply with rubocop

Change-Id: Ia1aabed7ab1ed21913e4783eec711c09777c9754
Addresses: blueprint rubocop-for-ops-messaging
2014-01-17 16:05:29 +00:00
Andy McCrae fbcfd04ff3 Move to use "get_password" instead of "{user,service,db}_password"
The user_password, service_password and db_password functions are redundant
since they simply call "secret". Creates a get_password function that will
accept a "type" of db, service or user.

All instances of these calls have been changed to call get_password

Change-Id: Ic73c99034638ec092192d11e37671edbba0e48ef
Partial-Bug: #1195915
2014-01-15 18:46:56 +00:00
Matt Thompson 3bb10f3819 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: I4ac5ec08dc3a09dd3b434203f83ef5e54d964505
2014-01-09 10:11:29 +00:00
jiehua jin ecff952bd5 make AMQP support when develop_mode=false
When develop_mode=false, the password of mq user "guest"
in the databag user_passwords is required. But the current
code doesn't support. I made it work, and add the test cases.

Closes-Bug: #1257554
Change-Id: I0d01bd73eaec9cc90304e67484fec15fad061504
2013-12-24 08:46:12 +00:00
Ionuț Arțăriși d21a7107a5 upgrade to Havana
also upgrade gems:
- berkshelf, ~> 2.0.10
- chefspec, ~> 3.0.2
- foodcritic, ~> 3.0.3

Change-Id: I501d329d0da7d540cbd7ec229f031700d9ced1ac
2013-12-12 09:34:38 +01:00
Matt Ray 3ff43e644f Ensure the node[openstack][mq] attributes push to the services that use rabbitmq
The node[openstack][*][rabbit] attributes for all the services using rabbitmq
(block-storage, compute, image, metering, network) should default to the same
values as node[openstack][mq]. Bumping the major version accordingly.

Change-Id: Id20a48a3ef2506622239e8e6f15ce1f76060b828
2013-11-18 18:04:31 -06:00
John Dewey b1ad1fd679 Revert "Configure rabbit and EPMD to bind to an address"
Since this breaks people using rabbit in the standard way, I
rather revert this change, and fork my own ops-messaging cookbook
since this is intended as an example cookbook (granted others
may use it directly).  This code would be better off in my
own fork, where i do not impact others, with a non-merged upstream
rabbitmq feature.

This reverts commit 3b35ac204d.

Change-Id: I53da70583c50ae985d3842c3d709eb81f565d63d
2013-07-22 15:14:03 -07:00
John Dewey 3b35ac204d Configure rabbit and EPMD to bind to an address
This change integrates against a rabbitmq cookbook feature which
is not yet merged upstream.  However, given the default code path
does not change, felt okay to get this out there.  Especially b/c
we are dependant on it.  This feature allows one to run rabbit
and clustering across a specific address.  For more details, see:
  http://tickets.opscode.com/browse/COOK-3320

Change-Id: I2a10c551cb2176dadaee8842eeadfdfc8cb93e44
2013-07-14 21:01:11 -07:00
John Dewey ead7e5ded2 Sort the results
Results need to be sorted.  OpenSource Chef 11 doesn't preserve order.

Change-Id: I00e649f1833915f6372d7d59dcefc6c073aca29f
2013-07-12 23:10:41 -07:00
John Dewey 7dc0fdd164 The upstream cookbook already resets rabbit
No need to do what upstream already does.
  https://github.com/opscode-cookbooks/rabbitmq/blob/master/recipes/default.rb#L136

Change-Id: I549558a4b8cf45902389a06041bf846e16290386
2013-07-11 18:44:56 -07:00
John Dewey 1abe03c3e6 Searching on wrong environment
We need to use chef_environment vs environment.

Change-Id: I2ceba5a49ec88f81ad763379bebbd63d9bd19bb8
2013-07-11 16:40:06 -07:00
Jenkins 95b1ab1060 Merge "Removed attributes now handled by `openstack-common`" 2013-07-10 14:31:52 +00:00
Jenkins 0e9747f6a2 Merge "Removed default recipe" 2013-07-05 19:40:50 +00:00
John Dewey e901580a79 Removed attributes now handled by `openstack-common`
Now that `openstack-common` handles the `["openstack"]["mq"]`
attributes, there is no need to set them in the default test cases.

Change-Id: I1987a6c4ae0898bcf2cd0100fd1f5408990f2592
2013-07-03 11:04:31 -07:00