32 Commits

Author SHA1 Message Date
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
Jan Klare
2064bd3d98 rabbitmq cluster_nodes attributes should be array of hashes
Change-Id: I471ef78d72adc76848e6c04322918d81093530dd
2016-07-07 09:43:49 +02: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
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
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
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
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
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
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
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 3b35ac204d7b117e86cc51d72bfc4a927183a92a.

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
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
John Dewey
c4bcd7ee7b Moved clustering setup to an attribute
Clustering is set to false by default.  When enabled, will setup
rabbitmq disk node clustering.  Also, added opscode to attribution,
somehow had removed them in the previous rebase.

Change-Id: Idd249d0d950f5f4eb44cd7c10566ece254ed7f45
2013-07-01 12:10:23 -07:00
John Dewey
1c0e58dc33 Updating with patterns used in ops-database
We had two reviews which added an ops-messaging cookbook.  Updating
this cookbook with patterns we estabished from the database cookbook.
Craig already did most of the work, however, updated the tests to
use the chefspec find_provider, added clustering support, and attempted
to follow the service_type attribute patterns used in database cookbook.
Since these cookbooks are not complete, added a larger commit than
would have.

Change-Id: I0edfc996df413c6e41a31d53f964d7f5fc9e0aeb
2013-06-27 17:00:06 -07:00
Craig Tracey
8540f839e5 Initial commit of openstack-ops-messaging cookbook
This initial commit provides support for an openstack-ops-messaging
cookbook. In this initial release, we provide the capability to install
and configure RabbitMQ. This cookbook is modeled after the
openstack-ops-database cookbook in the way in which it can be utilized.

Included are tests for all recipes and this release supports Ubuntu
only.

Change-Id: I4d799fa46e67e0f2eca2ac8b205f51c07e0df01e
2013-06-18 19:36:08 -04:00