Unverified Commit 56a01224 authored by Michael Klishin's avatar Michael Klishin

Merge branch 'v5.x'

parents 962b6019 7abd60f6
......@@ -70,7 +70,7 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-1"
version: "1:23.0.3-1"
rabbitmq:
# export RABBITMQ_VERSION="3.7.14-alpha.11"
version: <%= ENV['RABBITMQ_VERSION'] %>
......@@ -90,7 +90,7 @@ suites:
rabbitmq:
erlang:
enabled: true
version: "23.0.2"
version: "23.0.3"
# export RABBITMQ_VERSION="3.7.13-alpha.21"
version: <%= ENV['RABBITMQ_VERSION'] %>
......@@ -109,7 +109,7 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-1"
version: "1:23.0.3-1"
rabbitmq:
# export RABBITMQ_VERSION="3.8.6-alpha.21"
version: <%= ENV['RABBITMQ_VERSION'] %>
......
......@@ -147,9 +147,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-2"
version: "1:23.0.3-2"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
virtualhosts:
- vhost1
- vhost2
......@@ -190,9 +190,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-1"
version: "1:23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/integration/management_plugin
......@@ -207,9 +207,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-1"
version: "1:23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
systemd:
limits:
NOFILE: 54000
......@@ -226,9 +226,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "23.0.2-1"
version: "23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/integration/default
......@@ -243,8 +243,8 @@ suites:
rabbitmq:
erlang:
enabled: true
version: "22.3.4"
version: "3.8.5"
version: "22.3.4.10"
version: "3.8.8"
verifier:
inspec_tests:
- test/integration/default
......@@ -259,9 +259,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "23.0.2-1"
version: "23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
systemd:
limits:
NOFILE: 54000
......@@ -278,9 +278,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-1"
version: "1:23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/integration/default
......@@ -295,9 +295,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-1"
version: "1:23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/integration/default
......@@ -312,9 +312,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "23.0.2-1"
version: "23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/integration/default
......@@ -329,9 +329,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-1"
version: "1:23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
attributes:
apt:
confd:
......@@ -340,9 +340,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-1"
version: "1:23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/integration/default
......@@ -360,9 +360,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-1"
version: "1:23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/integration/default
......@@ -383,7 +383,7 @@ suites:
rabbitmq:
erlang:
enabled: true
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/erlang_package/latest_deb
......@@ -398,8 +398,8 @@ suites:
rabbitmq:
erlang:
enabled: true
version: "1:23.0.2-1"
version: "3.8.5"
version: "1:22.3.4.10.4-1"
version: "3.8.8"
verifier:
inspec_tests:
- test/erlang_package/pinned_deb
......@@ -417,7 +417,7 @@ suites:
rabbitmq:
erlang:
enabled: true
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/erlang_package/latest_rpm
......@@ -432,11 +432,11 @@ suites:
rabbitmq:
erlang:
enabled: true
version: "23.0.2"
version: "23.0.3"
yum:
baseurl: https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/23/el/8
repo_gpgcheck: true
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/erlang_package/pinned_rpm
......@@ -453,7 +453,7 @@ suites:
rabbitmq:
erlang:
enabled: true
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/erlang_package/latest_rpm
......@@ -468,11 +468,11 @@ suites:
rabbitmq:
erlang:
enabled: true
version: "23.0.2"
version: "22.3.4.10.4"
yum:
baseurl: https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/22/el/7
repo_gpgcheck: true
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/erlang_package/pinned_rpm
......@@ -490,7 +490,7 @@ suites:
yum:
baseurl: https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/23/el/6
repo_gpgcheck: false
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/erlang_package/latest_rpm
......@@ -505,11 +505,11 @@ suites:
rabbitmq:
erlang:
enabled: true
version: "23.0.2"
version: "22.3.4.10.4"
yum:
baseurl: https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/22/el/6
repo_gpgcheck: true
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/erlang_package/pinned_rpm
......@@ -526,7 +526,7 @@ suites:
enabled: true
zypper:
baseurl: https://download.opensuse.org/repositories/network:/messaging:/amqp/openSUSE_Leap_15.1/
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/erlang_package/latest_rpm
......
......@@ -40,9 +40,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-1"
version: "1:23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
virtualhosts:
- vhost1
- vhost2
......@@ -83,9 +83,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-1"
version: "1:23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/integration/management_plugin
......@@ -100,9 +100,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-1"
version: "1:23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
systemd:
limits:
NOFILE: 54000
......@@ -119,9 +119,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "23.0.2-1"
version: "23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/integration/default
......@@ -135,8 +135,8 @@ suites:
rabbitmq:
erlang:
enabled: true
version: "22.3.4.4"
version: "3.8.5"
version: "22.3.4.10.4"
version: "3.8.8"
verifier:
inspec_tests:
- test/integration/default
......@@ -152,9 +152,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "23.0.2-1"
version: "23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
systemd:
limits:
NOFILE: 54000
......@@ -171,9 +171,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-1"
version: "1:23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/integration/default
......@@ -188,9 +188,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-1"
version: "1:23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/integration/default
......@@ -205,9 +205,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "23.0.2-1"
version: "23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/integration/default
......@@ -222,9 +222,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-1"
version: "1:23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
attributes:
apt:
confd:
......@@ -233,9 +233,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-1"
version: "1:23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/integration/default
......@@ -253,9 +253,9 @@ suites:
erlang:
install_method: "esl"
esl:
version: "1:23.0.2-1"
version: "1:23.0.3-1"
rabbitmq:
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/integration/default
......@@ -276,7 +276,7 @@ suites:
rabbitmq:
erlang:
enabled: true
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/erlang_package/latest_deb
......@@ -291,8 +291,8 @@ suites:
rabbitmq:
erlang:
enabled: true
version: "1:22.3-1"
version: "3.8.5"
version: "1:22.3.4.10.10-1"
version: "3.8.8"
verifier:
inspec_tests:
- test/erlang_package/pinned_deb
......@@ -309,7 +309,7 @@ suites:
rabbitmq:
erlang:
enabled: true
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/erlang_package/latest_rpm
......@@ -328,7 +328,7 @@ suites:
yum:
baseurl: https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/23/el/8
repo_gpgcheck: true
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/erlang_package/pinned_rpm
......@@ -346,7 +346,7 @@ suites:
yum:
baseurl: https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/23/el/6
repo_gpgcheck: false
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/erlang_package/latest_rpm
......@@ -361,11 +361,11 @@ suites:
rabbitmq:
erlang:
enabled: true
version: "22.3.4.4"
version: "22.3.4.10.4"
yum:
baseurl: https://dl.bintray.com/rabbitmq-erlang/rpm/erlang/22/el/6
repo_gpgcheck: true
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/erlang_package/pinned_rpm
......@@ -382,7 +382,7 @@ suites:
enabled: true
zypper:
baseurl: https://download.opensuse.org/repositories/network:/messaging:/amqp/openSUSE_Leap_15.1
version: "3.8.5"
version: "3.8.8"
verifier:
inspec_tests:
- test/erlang_package/latest_rpm
......
......@@ -10,6 +10,14 @@ This is a cookbook for managing RabbitMQ with Chef.
This cookbook targets Chef 13.0 and later.
## Supported RabbitMQ Versions
`5.x` release series targets RabbitMQ `3.8.x` releases.
It can also provision `3.7.x` series (which are [out of general support](https://www.rabbitmq.com/versions.html)),
For any series used, a [supported Erlang version](http://www.rabbitmq.com/which-erlang.html) must be installed.
## Supported Distributions
The cookbook targets and is tested against
......@@ -171,19 +179,19 @@ Note that Erlang Solutions repositories can be behind the latest Erlang/OTP patc
node['erlang']['install_method'] = "esl"
```
to provision a specific version, e.g. `22.3.4.4`:
to provision a specific version, e.g. `22.3.4.10.4`:
``` ruby
node['erlang']['install_method'] = "esl"
# Ubuntu and Debian
# note the "1:" package epoch prefix
node['erlang']['esl']['version'] = "1:22.3.4.4"
node['erlang']['esl']['version'] = "1:22.3.4.10.4"
```
``` ruby
node['erlang']['install_method'] = "esl"
# CentOS, RHEL, Fedora
node['erlang']['esl']['version'] = "22.3.4.4-1"
node['erlang']['esl']['version'] = "22.3.4.10.4-1"
```
### Seting RabbitMQ Version
......@@ -191,7 +199,7 @@ node['erlang']['esl']['version'] = "22.3.4.4-1"
Set `node['rabbitmq']['version']` to specify a version:
``` ruby
node['rabbitmq']['version'] = "3.8.5"
node['rabbitmq']['version'] = "3.8.8"
```
If you have `node['rabbitmq']['deb_package_url']` or `node['rabbitmq']['rpm_package_url']` overridden
......@@ -230,10 +238,10 @@ To override package version, use `node['rabbitmq']['erlang']['version']`:
``` ruby
# Debian
node['rabbitmq']['erlang']['version'] = '1:22.3.4.4-1'
node['rabbitmq']['erlang']['version'] = '1:22.3.4.10.4-1'
# RPM
node['rabbitmq']['erlang']['version'] = '22.3.4.4'
node['rabbitmq']['erlang']['version'] = '22.3.4.10.4'
```
On Ubuntu and Debian the distribution will be picked from node attributes.
......@@ -286,19 +294,19 @@ The Erlang cookbook will provision packages from Erlang Solutions if `node['erla
node['erlang']['install_method'] = "esl"
```
to provision a specific version, e.g. `22.3.4.4`:
to provision a specific version, e.g. `22.3.4.10.4`:
``` ruby
node['erlang']['install_method'] = "esl"
# Ubuntu and Debian
# note the "1:" package epoch prefix
node['erlang']['esl']['version'] = "1:22.3.4.4"
node['erlang']['esl']['version'] = "1:22.3.4.10.4"
```
``` ruby
node['erlang']['install_method'] = "esl"
# CentOS, RHEL, Fedora
node['erlang']['esl']['version'] = "22.3.4.4-1"
node['erlang']['esl']['version'] = "22.3.4.10.4-1"
```
### Seting RabbitMQ Version
......
# frozen_string_literal: true
# Version to install
default['rabbitmq']['version'] = '3.7.26'
default['rabbitmq']['version'] = '3.7.28'
default['rabbitmq']['package_source'] = 'github'
......
......@@ -84,7 +84,7 @@ def user_has_expected_permissions?(name, vhost, perm_list = nil)
return true
end
# existing match search
if perm_list == cmd.stdout.split.drop(1)
if perm_list == %(\"#{cmd.stdout}\").undump.split.drop(1)
Chef::Log.debug 'rabbitmq_user_has_expected_permissions?: matching permissions already found'
return true
end
......
......@@ -20,10 +20,10 @@ describe 'rabbitmq::community_plugins' do
plugins.each do |plugin, download_url|
it 'creates the remote files with attributes' do
expect(chef_run).to create_remote_file("/usr/lib/rabbitmq/lib/rabbitmq_server-#{node['rabbitmq']['version']}/plugins/#{plugin}.ez").with(
source: download_url,
owner: 'rabbitmq',
group: 'rabbitmq',
mode: 0644
:source => download_url,
:owner => 'rabbitmq',
:group => 'rabbitmq',
:mode => '644'
)
end
......
......@@ -4,7 +4,7 @@ require 'spec_helper'
describe 'rabbitmq::default' do
let(:runner) do
ChefSpec::ServerRunner.new(REDHAT_OPTS) do |node, _|
node.override['rabbitmq']['version'] = '3.7.26'
node.override['rabbitmq']['version'] = '3.7.28'
end
end
let(:node) { runner.node }
......@@ -26,10 +26,10 @@ describe 'rabbitmq::default' do
it 'creates a template rabbitmq-env.conf with attributes' do
expect(chef_run).to create_template(file.name).with(
user: 'root',
group: 'root',
source: 'rabbitmq-env.conf.erb',
mode: 00644)
:user => 'root',
:group => 'root',
:source => 'rabbitmq-env.conf.erb',
:mode => '644')
end
it 'has no erl args by default' do
......@@ -105,7 +105,7 @@ describe 'rabbitmq::default' do
describe 'when Erlang is provisioned from ESL' do
let(:runner) do
ChefSpec::ServerRunner.new(REDHAT_OPTS) do |node, _|
node.override['rabbitmq']['version'] = '3.7.26'
node.override['rabbitmq']['version'] = '3.7.28'
node.override['rabbitmq']['erlang']['enabled'] = false
end
end
......@@ -121,19 +121,19 @@ describe 'rabbitmq::default' do
it 'should create the rabbitmq /etc/default file' do
expect(chef_run).to create_template("/etc/default/#{chef_run.node['rabbitmq']['service_name']}").with(
user: 'root',
group: 'root',
source: 'default.rabbitmq-server.erb',
mode: 00644
:user => 'root',
:group => 'root',
:source => 'default.rabbitmq-server.erb',
:mode => '644'
)
end
it 'creates a template rabbitmq.config with attributes' do
expect(chef_run).to create_template('/etc/rabbitmq/rabbitmq.config').with(
user: 'root',
group: 'root',
source: 'rabbitmq.config.erb',
mode: 00644)
:user => 'root',
:group => 'root',
:source => 'rabbitmq.config.erb',
:mode => '644')
if Gem::Version.new(Chef::VERSION.to_s) >= Gem::Version.new('11.14.2')
expect(chef_run).to create_template('/etc/rabbitmq/rabbitmq.config').with(sensitive: true)
......@@ -258,7 +258,7 @@ describe 'rabbitmq::default' do
describe 'suse' do
let(:runner) do
ChefSpec::ServerRunner.new(SUSE_OPTS) do |node, _|
node.override['rabbitmq']['version'] = '3.7.26'
node.override['rabbitmq']['version'] = '3.7.28'
end
end
let(:node) { runner.node }
......@@ -286,12 +286,12 @@ describe 'rabbitmq::default' do
describe 'ubuntu' do
let(:runner) do
ChefSpec::ServerRunner.new(UBUNTU_OPTS) do |node, _|
node.override['rabbitmq']['version'] = '3.7.26'
node.override['rabbitmq']['version'] = '3.7.28'
end
end
let(:node) { runner.node }
let(:chef_run) do
node.override['rabbitmq']['version'] = '3.7.26'
node.override['rabbitmq']['version'] = '3.7.28'
runner.converge(described_recipe)
end
......@@ -311,7 +311,7 @@ describe 'rabbitmq::default' do
end
it 'creates a rabbitmq-server deb in the cache path' do
expect(chef_run).to create_remote_file_if_missing('/tmp/rabbitmq-server_3.7.26-1_all.deb')
expect(chef_run).to create_remote_file_if_missing('/tmp/rabbitmq-server_3.7.28-1_all.deb')
end
it 'installs the rabbitmq-server deb_package with the default action' do
......@@ -320,17 +320,17 @@ describe 'rabbitmq::default' do
it 'creates a template rabbitmq-server with attributes' do
expect(chef_run).to create_template('/etc/default/rabbitmq-server').with(
user: 'root',
group: 'root',