diff --git a/Berksfile b/Berksfile index c255f04..44d58c6 100644 --- a/Berksfile +++ b/Berksfile @@ -1,6 +1,11 @@ source 'https://supermarket.chef.io' -metadata +%w(-common).each do |cookbook| + if Dir.exist?("../cookbook-openstack#{cookbook}") + cookbook "openstack#{cookbook}", path: "../cookbook-openstack#{cookbook}" + else + cookbook "openstack#{cookbook}", git: "https://opendev.org/openstack/cookbook-openstack#{cookbook}" + end +end -cookbook 'openstack-common', - git: 'https://opendev.org/openstack/cookbook-openstack-common' +metadata diff --git a/README.md b/README.md deleted file mode 100644 index 44a8043..0000000 --- a/README.md +++ /dev/null @@ -1,112 +0,0 @@ -Team and repository tags -======================== - -[![Team and repository tags](http://governance.openstack.org/badges/cookbook-openstack-ops-messaging.svg)](http://governance.openstack.org/reference/tags/index.html) - - - -![Chef OpenStack Logo](https://www.openstack.org/themes/openstack/images/project-mascots/Chef%20OpenStack/OpenStack_Project_Chef_horizontal.png) - -# Description # - -This cookbook provides shared message queue configuration for the OpenStack deployment provided by Chef for OpenStack. The [OpenStack chef-repo](http://github.com/openstack/openstack-chef) contains documentation for using this cookbook in the context of a full OpenStack deployment. It currently supports RabbitMQ and will soon other queues. - -# Requirements # - -Chef 12 with Ruby 2.1.x required. - -# Platforms # - -* Ubuntu-14.04 - -# Cookbooks # - -The following cookbooks are dependencies: - -* openstack-common -* rabbitmq - -# Usage # - -The usage of this cookbook is optional, you may choose to set up your own messaging service without using this cookbook. If you choose to do so, you will need to provide all of the attributes listed under the [Attributes](#attributes). - -# Resources/Providers # - -None - -# Templates # - -None - -# Recipes # - -## server ## - -- message queue server configuration, selected by attributes - -## rabbitmq-server ## - -- configures the RabbitMQ server for OpenStack - -# Attributes # - -* `openstack["mq"]["cluster"]` - whether or not to cluster rabbit, defaults to 'false' - -The following attributes are defined in attributes/messaging.rb of the common cookbook, but are documented here due to their relevance: - -* `openstack["endpoints"]["mq"]["host"]` - The IP address to bind the rabbit service to -* `openstack["endpoints"]["mq"]["scheme"]` - Unused at this time -* `openstack["endpoints"]["mq"]["port"]` - The port to bind the rabbit service to -* `openstack["endpoints"]["mq"]["path"]` - Unused at this time -* `openstack["endpoints"]["mq"]["bind_interface"]` - The interface name to bind the rabbit service to -* `openstack["mq"]["rabbitmq"]["use_ssl"]` - Enables/disables SSL for RabbitMQ, the default is false. - -If the value of the "bind_interface" attribute is non-nil, then the rabbit service will be bound to the first IP address on that interface. If the value of the "bind_interface" attribute is nil, then the rabbit service will be bound to the IP address specified in the host attribute. - -Testing -===== - -Please refer to the [TESTING.md](TESTING.md) for instructions for testing the cookbook. - -Berkshelf -===== - -Berks will resolve version requirements and dependencies on first run and -store these in Berksfile.lock. If new cookbooks become available you can run -`berks update` to update the references in Berksfile.lock. Berksfile.lock will -be included in stable branches to provide a known good set of dependencies. -Berksfile.lock will not be included in development branches to encourage -development against the latest cookbooks. - -License and Author -================== - -| | | -|:---------------------|:---------------------------------------------------| -| **Author** | John Dewey () | -| **Author** | Matt Ray () | -| **Author** | Craig Tracey () | -| **Author** | Ionut Artarisi () | -| **Author** | JieHua Jin () | -| **Author** | Mark Vanderwiel () | -| **Author** | Jan Klare () | -| | | -| **Copyright** | Copyright (c) 2013, Opscode, Inc. | -| **Copyright** | Copyright (c) 2013, Craig Tracey | -| **Copyright** | Copyright (c) 2013, AT&T Services, Inc. | -| **Copyright** | Copyright (c) 2013, SUSE Linux GmbH. | -| **Copyright** | Copyright (c) 2013-2014, IBM Corp. | - - - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..ff55a2e --- /dev/null +++ b/README.rst @@ -0,0 +1,151 @@ +OpenStack Chef Cookbook - ops-messaging +======================================= + +.. image:: https://governance.openstack.org/badges/cookbook-openstack-ops-messaging.svg + :target: https://governance.openstack.org/reference/tags/index.html + +Description +=========== + +This cookbook provides shared message queue configuration for the +OpenStack deployment provided by Chef for OpenStack. The `OpenStack +chef-repo`_ contains documentation for using this cookbook in the +context of a full OpenStack deployment. It currently supports RabbitMQ +and will soon other queues. + +.. _OpenStack chef-repo: https://opendev.org/openstack/openstack-chef + +Requirements +============ + +- Chef 14 or higher +- chefdk 3.2.30 for testing (also includes berkshelf for cookbook + dependency resolution) + +Platforms +========= + +- ubuntu +- redhat +- centos + +Cookbooks +========= + +The following cookbooks are dependencies: + +- 'openstack-common', '>= 18.0.0' +- 'rabbitmq', '~> 5.7' + +Usage +===== + +The usage of this cookbook is optional, you may choose to set up your +own messaging service without using this cookbook. If you choose to do +so, you will need to provide all of the attributes listed under the +`Attributes <#attributes>`__. + +Resources/Providers +=================== + +None + +Templates +========= + +None + +Recipes +======= + +rabbitmq-server +--------------- + +- Installs and configures RabbitMQ and is called via the server recipe + +Attributes +========== + +- ``openstack["mq"]["cluster"]`` - whether or not to cluster rabbit, + defaults to ``false`` + +The following attributes are defined in ``attributes/messaging.rb`` of +the common cookbook, but are documented here due to their relevance: + +- ``openstack["endpoints"]["mq"]["host"]`` - The IP address to bind the + rabbit service to +- ``openstack["endpoints"]["mq"]["port"]`` - The port to bind the + rabbit service to +- ``openstack["endpoints"]["mq"]["bind_interface"]`` - The interface + name to bind the rabbit service to +- ``openstack["mq"]["rabbitmq"]["use_ssl"]`` - Enables/disables SSL for + RabbitMQ, the default is false. + +If the value of the ``bind_interface`` attribute is non-nil, then the +rabbit service will be bound to the first IP address on that interface. +If the value of the ``bind_interface`` attribute is nil, then the rabbit +service will be bound to the IP address specified in the host attribute. + +Testing +======= + +Please refer to the `TESTING.md`_ for instructions for testing the +cookbook. + +.. _TESTING.md: cookbook-openstack-ops-messaging/src/branch/master/TESTING.md + +Berkshelf +========= + +Berks will resolve version requirements and dependencies on first run +and store these in ``Berksfile.lock``. If new cookbooks become available +you can run ``berks update`` to update the references in +``Berksfile.lock``. ``Berksfile.lock`` will be included in stable +branches to provide a known good set of dependencies. ``Berksfile.lock`` +will not be included in development branches to encourage development +against the latest cookbooks. + +License and Author +================== + ++-----------------+-------------------------------------------+ +| **Author** | John Dewey (john@dewey.ws) | ++-----------------+-------------------------------------------+ +| **Author** | Matt Ray (matt@opscode.com) | ++-----------------+-------------------------------------------+ +| **Author** | Craig Tracey (craigtracey@gmail.com) | ++-----------------+-------------------------------------------+ +| **Author** | Ionut Artarisi (iartarisi@suse.cz) | ++-----------------+-------------------------------------------+ +| **Author** | JieHua Jin (jinjhua@cn.ibm.com) | ++-----------------+-------------------------------------------+ +| **Author** | Mark Vanderwiel (vanderwl@us.ibm.com) | ++-----------------+-------------------------------------------+ +| **Author** | Jan Klare (j.klare@x-ion.de) | ++-----------------+-------------------------------------------+ + ++-----------------+-------------------------------------------+ +| **Copyright** | Copyright (c) 2013, Opscode, Inc. | ++-----------------+-------------------------------------------+ +| **Copyright** | Copyright (c) 2013, Craig Tracey | ++-----------------+-------------------------------------------+ +| **Copyright** | Copyright (c) 2013, AT&T Services, Inc. | ++-----------------+-------------------------------------------+ +| **Copyright** | Copyright (c) 2013, SUSE Linux GmbH. | ++-----------------+-------------------------------------------+ +| **Copyright** | Copyright (c) 2013-2014, IBM Corp. | ++-----------------+-------------------------------------------+ + +Licensed under the Apache License, Version 2.0 (the "License"); you may +not use this file except in compliance with the License. You may obtain +a copy of the License at + +:: + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Rakefile b/Rakefile index 137cc2f..6ec521b 100644 --- a/Rakefile +++ b/Rakefile @@ -33,7 +33,7 @@ end desc 'All-in-One Neutron build Infra using Common task' task :integration do # Use the common integration task - sh %(wget -nv -t 3 -O Rakefile-Common https://raw.githubusercontent.com/openstack/cookbook-openstack-common/master/Rakefile) + sh %(wget -nv -t 3 -O Rakefile-Common https://opendev.org/openstack/cookbook-openstack-common/raw/branch/master/Rakefile) load './Rakefile-Common' Rake::Task['common_integration'].invoke end diff --git a/bootstrap.sh b/bootstrap.sh deleted file mode 100755 index fe49ef2..0000000 --- a/bootstrap.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -x -## This script is for installing all the needed packages on trusty to run the chef tests with 'chef exec rake'. -## It relies on the common bootstrap.sh from openstack/cookbook-openstack-common for installing common dependencies. - -curl https://raw.githubusercontent.com/openstack/cookbook-openstack-common/master/bootstrap.sh \ - --retry 3 \ - --silent \ - --show-error \ - | /bin/bash -x diff --git a/metadata.rb b/metadata.rb index 87277c7..e98e838 100644 --- a/metadata.rb +++ b/metadata.rb @@ -5,7 +5,6 @@ license 'Apache-2.0' description 'Provides the shared messaging configuration for Chef for OpenStack.' version '18.0.0' -recipe 'server', 'Installs and configures server packages for messaging queue used by the deployment.' recipe 'rabbitmq-server', 'Installs and configures RabbitMQ and is called via the server recipe' %w(ubuntu redhat centos).each do |os| @@ -15,6 +14,6 @@ end depends 'openstack-common', '>= 18.0.0' depends 'rabbitmq', '~> 5.7' -issues_url 'https://launchpad.net/openstack-chef' if respond_to?(:issues_url) -source_url 'https://github.com/openstack/cookbook-openstack-ops-messaging' if respond_to?(:source_url) -chef_version '>= 12.5' if respond_to?(:chef_version) +issues_url 'https://launchpad.net/openstack-chef' +source_url 'https://opendev.org/openstack/cookbook-openstack-ops-messaging' +chef_version '>= 14.0'