File tree Expand file tree Collapse file tree 9 files changed +20
-29
lines changed Expand file tree Collapse file tree 9 files changed +20
-29
lines changed Original file line number Diff line number Diff line change @@ -10,5 +10,4 @@ project_page 'http://github.com/puppetlabs/puppetlabs-rabbitmq'
10
10
# # Add dependencies, if any:
11
11
dependency ' puppetlabs/stdlib' , ' >= 2.0.0'
12
12
dependency ' puppetlabs/apt' , ' >= 1.0.0'
13
- dependency ' garethr/erlang' , ' >= 0.1.0'
14
13
dependency ' nanliu/staging' , ' >= 0.3.1'
Original file line number Diff line number Diff line change 11
11
4 . [ Usage - Configuration options and additional functionality] ( #usage )
12
12
5 . [ Reference - An under-the-hood peek at what the module is doing and how] ( #reference )
13
13
5 . [ Limitations - OS compatibility, etc.] ( #limitations )
14
+ * [ RedHat module dependencies] ( #redhat-module-dependecies )
14
15
6 . [ Development - Guide for contributing to the module] ( #development )
15
16
16
17
##Overview
@@ -315,6 +316,19 @@ The module has been tested on:
315
316
316
317
Testing on other platforms has been light and cannot be guaranteed.
317
318
319
+ ### RedHat module dependencies
320
+ To have a suitable erlang version installed on RedHat systems,
321
+ you have to install another puppet module from http://forge.puppetlabs.com/garethr/erlang with:
322
+
323
+ puppet module install garethr-erlang
324
+
325
+ This module handles the packages for erlang.
326
+ To use the module, add the following snippet to your site.pp or an appropriate profile class:
327
+
328
+ include 'erlang'
329
+ class { 'erlang': epel_enable => true}
330
+ Class['erlang'] -> Class['rabbitmq']
331
+
318
332
##Development
319
333
320
334
Puppet Labs modules on the Puppet Forge are open projects, and community
Original file line number Diff line number Diff line change 15
15
$env_config = $rabbitmq::params::env_config,
16
16
$env_config_path = $rabbitmq::params::env_config_path,
17
17
$erlang_cookie = $rabbitmq::params::erlang_cookie,
18
- $erlang_manage = $rabbitmq::params::erlang_manage,
19
18
$manage_service = $rabbitmq::params::manage_service,
20
19
$management_port = $rabbitmq::params::management_port,
21
20
$node_ip_address = $rabbitmq::params::node_ip_address,
54
53
) inherits rabbitmq::params {
55
54
56
55
validate_bool($admin_enable )
57
- validate_bool($erlang_manage )
58
56
# Validate install parameters.
59
57
validate_re($package_apt_pin , ' ^(|\d +)$' )
60
58
validate_string($package_ensure )
107
105
validate_hash($config_variables )
108
106
validate_hash($config_kernel_variables )
109
107
110
- if $erlang_manage {
111
- include '::erlang'
112
- Class[' ::erlang' ] -> Class[' ::rabbitmq::install' ]
113
- }
114
-
115
108
include '::rabbitmq::install'
116
109
include '::rabbitmq::config'
117
110
include '::rabbitmq::service'
Original file line number Diff line number Diff line change 39
39
40
40
# install
41
41
$admin_enable = true
42
- $erlang_manage = false
43
42
$management_port = ' 15672'
44
43
$package_apt_pin = ' '
45
44
$package_gpg_key = ' http://www.rabbitmq.com/rabbitmq-signing-key-public.asc'
Original file line number Diff line number Diff line change 76
76
end
77
77
end
78
78
79
- context 'with erlang_manage set to true' do
80
- let ( :params ) { { :erlang_manage => true } }
81
- it 'includes erlang' do
82
- should contain_class ( 'erlang' )
83
- end
84
- end
85
-
86
- context 'with erlang_manage set to false' do
87
- let ( :params ) { { :erlang_manage => false } }
88
- it 'doesnt include erlang' do
89
- should_not contain_class ( 'erlang' )
90
- end
91
- end
92
-
93
-
94
79
context 'deprecated parameters' do
95
80
describe 'cluster_disk_nodes' do
96
81
let ( :params ) { { :cluster_disk_nodes => [ 'node1' , 'node2' ] } }
Original file line number Diff line number Diff line change 22
22
# We need EPEL for erlang.
23
23
if node . facts [ 'osfamily' ] == 'RedHat'
24
24
shell ( 'rpm -i http://mirrors.rit.edu/epel/6/i386/epel-release-6-8.noarch.rpm' )
25
+ shell ( 'yum -y install erlang' )
25
26
end
26
27
27
28
# Install modules and dependencies
28
29
puppet_module_install ( :source => proj_root , :module_name => 'rabbitmq' )
29
- shell ( 'puppet module install garethr-erlang' )
30
30
shell ( 'puppet module install puppetlabs-stdlib' )
31
31
shell ( 'puppet module install puppetlabs-apt' )
32
32
shell ( 'puppet module install nanliu-staging' )
Original file line number Diff line number Diff line change 3
3
describe "rabbitmq class:" do
4
4
context 'should run successfully' do
5
5
pp = "
6
- class { 'erlang': epel_enable => true}
7
6
class { 'rabbitmq': }
8
- Class['erlang'] -> Class['rabbitmq']
9
7
"
10
8
11
9
context puppet_apply ( pp ) do
Original file line number Diff line number Diff line change 3
3
describe "rabbitmq class:" do
4
4
context 'should run successfully' do
5
5
pp = "
6
- class { 'erlang': epel_enable => true}
7
6
class { 'rabbitmq':
8
7
config_cluster => true,
9
8
cluster_nodes => ['rabbit1', 'rabbit2'],
10
9
cluster_node_type => 'ram',
11
10
wipe_db_on_cookie_change => true,
12
11
}
13
- Class['erlang'] -> Class['rabbitmq']
14
12
"
15
13
16
14
context puppet_apply ( pp ) do
Original file line number Diff line number Diff line change
1
+ # install first the garethr-erlang module. See README.md
2
+ include 'erlang'
3
+
4
+ class { 'erlang' : epel_enable => true }
5
+ Class[' erlang' ] -> Class[' rabbitmq' ]
You can’t perform that action at this time.
0 commit comments