Add debian package for puppet-rabbitmq-8.5.0
Aligned with Debian Bullseye version puppet-rabbitmq-8.5.0-6. Did build puppet-rabbitmq-8.5.0 + starlingx patches(adapted from CentOS7). Did build an iso. Story: 2009101 Task: 43300 Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com> Change-Id: I4f859b16e719e0a48c45e99906893362833bddaa
This commit is contained in:
parent
5997bdc453
commit
f15d12a123
@ -0,0 +1,10 @@
|
||||
---
|
||||
debname: puppet-module-puppetlabs-rabbitmq
|
||||
debver: 8.5.0-6
|
||||
dl_path:
|
||||
name: puppet-module-puppetlabs-rabbitmq-8.5.0-6.tar.gz
|
||||
url: https://salsa.debian.org/openstack-team/puppet/puppet-module-puppetlabs-rabbitmq/-/archive/debian/8.5.0-6/puppet-module-puppetlabs-rabbitmq-debian-8.5.0-6.tar.gz
|
||||
md5sum: 0590fe35398a5fd0f1cb96566833228e
|
||||
revision:
|
||||
dist: $STX_DIST
|
||||
PKG_GITREVCOUNT: true
|
@ -0,0 +1,110 @@
|
||||
From fce7ccadec4911ccb9961dc7e915098975464a6a Mon Sep 17 00:00:00 2001
|
||||
From: Dan Voiculeasa <dan.voiculeasa@windriver.com>
|
||||
Date: Mon, 13 Sep 2021 19:33:41 +0300
|
||||
Subject: [PATCH] Adapt first legacy patches
|
||||
|
||||
Adapt 0001-Roll-up-TIS-patches.patch from CentOS.
|
||||
|
||||
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
|
||||
---
|
||||
lib/puppet/provider/rabbitmq_policy/rabbitmqctl.rb | 6 ++++++
|
||||
manifests/config.pp | 2 +-
|
||||
manifests/init.pp | 3 +++
|
||||
manifests/install/rabbitmqadmin.pp | 3 ++-
|
||||
manifests/params.pp | 1 +
|
||||
5 files changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/puppet/provider/rabbitmq_policy/rabbitmqctl.rb b/lib/puppet/provider/rabbitmq_policy/rabbitmqctl.rb
|
||||
index 2082c7c..f9ea18b 100644
|
||||
--- a/lib/puppet/provider/rabbitmq_policy/rabbitmqctl.rb
|
||||
+++ b/lib/puppet/provider/rabbitmq_policy/rabbitmqctl.rb
|
||||
@@ -112,6 +112,12 @@ Puppet::Type.type(:rabbitmq_policy).provide(:rabbitmqctl, parent: Puppet::Provid
|
||||
resource[:definition] ||= definition
|
||||
resource[:pattern] ||= pattern
|
||||
resource[:priority] ||= priority
|
||||
+ # WRS. Values passed in from packstack are in string format. These need
|
||||
+ # to be converted back to integer for certain parameters (e.g. max-length,
|
||||
+ # expires)
|
||||
+ if (resource[:definition].keys & ["max-length", "expires"]).any?
|
||||
+ resource[:definition].each {|k,v| resource[:definition][k] = v.to_i}
|
||||
+ end
|
||||
# rabbitmq>=3.2.0
|
||||
if Puppet::Util::Package.versioncmp(self.class.rabbitmq_version, '3.2.0') >= 0
|
||||
rabbitmqctl(
|
||||
diff --git a/manifests/config.pp b/manifests/config.pp
|
||||
index cb8c748..b85a312 100644
|
||||
--- a/manifests/config.pp
|
||||
+++ b/manifests/config.pp
|
||||
@@ -142,7 +142,7 @@ class rabbitmq::config {
|
||||
ensure => directory,
|
||||
owner => '0',
|
||||
group => '0',
|
||||
- mode => '0755',
|
||||
+ mode => '0750',
|
||||
}
|
||||
|
||||
file { '/etc/rabbitmq/ssl':
|
||||
diff --git a/manifests/init.pp b/manifests/init.pp
|
||||
index 84deff5..61ffcee 100644
|
||||
--- a/manifests/init.pp
|
||||
+++ b/manifests/init.pp
|
||||
@@ -291,6 +291,7 @@ class rabbitmq(
|
||||
Hash $config_shovel_statics = $rabbitmq::params::config_shovel_statics,
|
||||
String $default_user = $rabbitmq::params::default_user,
|
||||
String $default_pass = $rabbitmq::params::default_pass,
|
||||
+ String $default_host = $rabbitmq::params::default_host,
|
||||
Boolean $delete_guest_user = $rabbitmq::params::delete_guest_user,
|
||||
String $env_config = $rabbitmq::params::env_config,
|
||||
Stdlib::Absolutepath $env_config_path = $rabbitmq::params::env_config_path,
|
||||
@@ -413,6 +414,7 @@ class rabbitmq(
|
||||
|
||||
rabbitmq_plugin { 'rabbitmq_management':
|
||||
ensure => present,
|
||||
+ require => [ File['/etc/rabbitmq'],
|
||||
notify => Class['rabbitmq::service'],
|
||||
provider => 'rabbitmqplugins',
|
||||
}
|
||||
@@ -431,6 +433,7 @@ class rabbitmq(
|
||||
if ($ldap_auth) {
|
||||
rabbitmq_plugin { 'rabbitmq_auth_backend_ldap':
|
||||
ensure => present,
|
||||
+ require => [ File['/etc/rabbitmq'],
|
||||
notify => Class['rabbitmq::service'],
|
||||
}
|
||||
}
|
||||
diff --git a/manifests/install/rabbitmqadmin.pp b/manifests/install/rabbitmqadmin.pp
|
||||
index 89d8998..110d30b 100644
|
||||
--- a/manifests/install/rabbitmqadmin.pp
|
||||
+++ b/manifests/install/rabbitmqadmin.pp
|
||||
@@ -29,6 +29,7 @@ class rabbitmq::install::rabbitmqadmin {
|
||||
|
||||
$default_user = $rabbitmq::default_user
|
||||
$default_pass = $rabbitmq::default_pass
|
||||
+ $default_host = $rabbitmq::default_host
|
||||
$management_ip_address = $rabbitmq::management_ip_address
|
||||
$archive_options = $rabbitmq::archive_options
|
||||
|
||||
@@ -46,7 +47,7 @@ class rabbitmq::install::rabbitmqadmin {
|
||||
|
||||
archive { 'rabbitmqadmin':
|
||||
path => "${rabbitmq::rabbitmq_home}/rabbitmqadmin",
|
||||
- source => "${protocol}://${sanitized_ip}:${management_port}/cli/rabbitmqadmin",
|
||||
+ source => "${protocol}://${default_host}:${management_port}/cli/rabbitmqadmin",
|
||||
username => $default_user,
|
||||
password => $default_pass,
|
||||
allow_insecure => true,
|
||||
diff --git a/manifests/params.pp b/manifests/params.pp
|
||||
index ac136e5..e0646a4 100644
|
||||
--- a/manifests/params.pp
|
||||
+++ b/manifests/params.pp
|
||||
@@ -100,6 +100,7 @@ class rabbitmq::params {
|
||||
$config_shovel_statics = {}
|
||||
$default_user = 'guest'
|
||||
$default_pass = 'guest'
|
||||
+ $default_host = 'localhost'
|
||||
$delete_guest_user = false
|
||||
$env_config = 'rabbitmq/rabbitmq-env.conf.erb'
|
||||
$env_config_path = '/etc/rabbitmq/rabbitmq-env.conf'
|
||||
--
|
||||
2.30.0
|
||||
|
@ -0,0 +1,35 @@
|
||||
From 9bccb304fba160beff7cf6c8301bc08abcb2dfc8 Mon Sep 17 00:00:00 2001
|
||||
From: Al Bailey <Al.Bailey@windriver.com>
|
||||
Date: Thu, 2 Nov 2017 09:22:58 -0500
|
||||
Subject: [PATCH] WRS: Patch2:
|
||||
0002-Changed-cipher-specification-to-openssl-format.patch
|
||||
|
||||
---
|
||||
templates/rabbitmq.config.erb | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/templates/rabbitmq.config.erb b/templates/rabbitmq.config.erb
|
||||
index af45aa8..606034a 100644
|
||||
--- a/templates/rabbitmq.config.erb
|
||||
+++ b/templates/rabbitmq.config.erb
|
||||
@@ -79,7 +79,7 @@
|
||||
<%- end -%>
|
||||
<%- if @ssl_ciphers and @ssl_ciphers.size > 0 -%>
|
||||
,{ciphers,[
|
||||
- <%= @ssl_ciphers.sort.map{|k| "{#{k}}"}.join(",\n ") %>
|
||||
+ <%= @ssl_ciphers.sort.map{|k| "\"#{k}\""}.join(",\n ") %>
|
||||
]}
|
||||
<%- end -%>
|
||||
]},
|
||||
@@ -122,7 +122,7 @@
|
||||
<%- end -%>
|
||||
<%- if @ssl_ciphers and @ssl_ciphers.size > 0 -%>
|
||||
,{ciphers,[
|
||||
- <%= @ssl_ciphers.sort.map{|k| "{#{k}}"}.join(",\n ") %>
|
||||
+ <%= @ssl_ciphers.sort.map{|k| "\"#{k}\""}.join(",\n ") %>
|
||||
]}
|
||||
<%- end -%>
|
||||
]}
|
||||
--
|
||||
2.30.0
|
||||
|
@ -0,0 +1,125 @@
|
||||
From 7f96ef518f58f80071541a7780877a3ed29c088c Mon Sep 17 00:00:00 2001
|
||||
From: Dan Voiculeasa <dan.voiculeasa@windriver.com>
|
||||
Date: Mon, 13 Sep 2021 20:25:50 +0300
|
||||
Subject: [PATCH] Remove the rabbitmq_nodename fact
|
||||
|
||||
The work represents an adaptation of
|
||||
0005-Remove-the-rabbitmq_nodename-fact.patch from CentOS.
|
||||
|
||||
This fact will not work on a standby node. It requires a drbd folder in
|
||||
order for rabbitmqctl status to work.
|
||||
|
||||
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
|
||||
---
|
||||
lib/facter/rabbitmq_nodename.rb | 8 --
|
||||
.../util/fact_rabbitmq_nodename_spec.rb | 83 -------------------
|
||||
2 files changed, 91 deletions(-)
|
||||
delete mode 100644 lib/facter/rabbitmq_nodename.rb
|
||||
delete mode 100644 spec/unit/facter/util/fact_rabbitmq_nodename_spec.rb
|
||||
|
||||
diff --git a/lib/facter/rabbitmq_nodename.rb b/lib/facter/rabbitmq_nodename.rb
|
||||
deleted file mode 100644
|
||||
index 8dee93c..0000000
|
||||
--- a/lib/facter/rabbitmq_nodename.rb
|
||||
+++ /dev/null
|
||||
@@ -1,8 +0,0 @@
|
||||
-Facter.add(:rabbitmq_nodename) do
|
||||
- setcode do
|
||||
- if Facter::Util::Resolution.which('rabbitmqctl')
|
||||
- rabbitmq_nodename = Facter::Core::Execution.execute('rabbitmqctl status 2>&1')
|
||||
- %r{^Status of node '?([\w\.\-]+@[\w\.\-]+)'?}.match(rabbitmq_nodename)[1]
|
||||
- end
|
||||
- end
|
||||
-end
|
||||
diff --git a/spec/unit/facter/util/fact_rabbitmq_nodename_spec.rb b/spec/unit/facter/util/fact_rabbitmq_nodename_spec.rb
|
||||
deleted file mode 100644
|
||||
index 0abf833..0000000
|
||||
--- a/spec/unit/facter/util/fact_rabbitmq_nodename_spec.rb
|
||||
+++ /dev/null
|
||||
@@ -1,83 +0,0 @@
|
||||
-require 'spec_helper'
|
||||
-
|
||||
-describe Facter::Util::Fact do
|
||||
- before { Facter.clear }
|
||||
-
|
||||
- describe 'rabbitmq_nodename' do
|
||||
- context 'with value' do
|
||||
- it do
|
||||
- Facter::Util::Resolution.expects(:which).with('rabbitmqctl').returns(true)
|
||||
- Facter::Core::Execution.expects(:execute).with('rabbitmqctl status 2>&1').returns('Status of node monty@rabbit1 ...')
|
||||
- expect(Facter.fact(:rabbitmq_nodename).value).to eq('monty@rabbit1')
|
||||
- end
|
||||
- end
|
||||
-
|
||||
- context 'with dashes in hostname' do
|
||||
- it do
|
||||
- Facter::Util::Resolution.expects(:which).with('rabbitmqctl').returns(true)
|
||||
- Facter::Core::Execution.expects(:execute).with('rabbitmqctl status 2>&1').returns('Status of node monty@rabbit-1 ...')
|
||||
- expect(Facter.fact(:rabbitmq_nodename).value).to eq('monty@rabbit-1')
|
||||
- end
|
||||
- end
|
||||
-
|
||||
- context 'with dashes in nodename/hostname' do
|
||||
- it do
|
||||
- Facter::Util::Resolution.expects(:which).with('rabbitmqctl').returns(true)
|
||||
- Facter::Core::Execution.expects(:execute).with('rabbitmqctl status 2>&1').returns('Status of node monty-python@rabbit-1 ...')
|
||||
- expect(Facter.fact(:rabbitmq_nodename).value).to eq('monty-python@rabbit-1')
|
||||
- end
|
||||
- end
|
||||
-
|
||||
- context 'with quotes around node name' do
|
||||
- it do
|
||||
- Facter::Util::Resolution.expects(:which).with('rabbitmqctl').returns(true)
|
||||
- Facter::Core::Execution.expects(:execute).with('rabbitmqctl status 2>&1').returns('Status of node \'monty@rabbit-1\' ...')
|
||||
- expect(Facter.fact(:rabbitmq_nodename).value).to eq('monty@rabbit-1')
|
||||
- end
|
||||
- end
|
||||
-
|
||||
- context 'without trailing points' do
|
||||
- it do
|
||||
- Facter::Util::Resolution.expects(:which).with('rabbitmqctl').returns(true)
|
||||
- Facter::Core::Execution.expects(:execute).with('rabbitmqctl status 2>&1').returns('Status of node monty@rabbit-1')
|
||||
- expect(Facter.fact(:rabbitmq_nodename).value).to eq('monty@rabbit-1')
|
||||
- end
|
||||
- end
|
||||
-
|
||||
- context 'rabbitmq is not running' do
|
||||
- it do
|
||||
- error_string = <<-EOS
|
||||
-Status of node 'monty@rabbit-1' ...
|
||||
-Error: unable to connect to node 'monty@rabbit-1': nodedown
|
||||
-
|
||||
-DIAGNOSTICS
|
||||
-===========
|
||||
-
|
||||
-attempted to contact: ['monty@rabbit-1']
|
||||
-
|
||||
-monty@rabbit-1:
|
||||
- * connected to epmd (port 4369) on centos-7-x64
|
||||
- * epmd reports: node 'rabbit' not running at all
|
||||
- no other nodes on centos-7-x64
|
||||
- * suggestion: start the node
|
||||
-
|
||||
-current node details:
|
||||
-- node name: 'rabbitmq-cli-73@centos-7-x64'
|
||||
-- home dir: /var/lib/rabbitmq
|
||||
-- cookie hash: 6WdP0nl6d3HYqA5vTKMkIg==
|
||||
-
|
||||
- EOS
|
||||
- Facter::Util::Resolution.expects(:which).with('rabbitmqctl').returns(true)
|
||||
- Facter::Core::Execution.expects(:execute).with('rabbitmqctl status 2>&1').returns(error_string)
|
||||
- expect(Facter.fact(:rabbitmq_nodename).value).to eq('monty@rabbit-1')
|
||||
- end
|
||||
- end
|
||||
-
|
||||
- context 'rabbitmqctl is not in path' do
|
||||
- it do
|
||||
- Facter::Util::Resolution.expects(:which).with('rabbitmqctl').returns(false)
|
||||
- expect(Facter.fact(:rabbitmq_nodename).value).to be_nil
|
||||
- end
|
||||
- end
|
||||
- end
|
||||
-end
|
||||
--
|
||||
2.30.0
|
||||
|
@ -0,0 +1,3 @@
|
||||
0001-Adapt-first-legacy-patches.patch
|
||||
0002-Changed-cipher-specification-to-open.patch
|
||||
0003-Remove-the-rabbitmq_nodename-fact.patch
|
Loading…
Reference in New Issue
Block a user