Skip to content

Commit

Permalink
Updates to rabbitmq::server docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wyardley committed Dec 7, 2018
1 parent 2378af3 commit 0adc07f
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 131 deletions.
134 changes: 50 additions & 84 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
_Public Classes_

* [`rabbitmq`](#rabbitmq): A module to manage RabbitMQ
* [`rabbitmq::management`](#rabbitmqmanagement):
* [`rabbitmq::server`](#rabbitmqserver): Class: rabbitmq::server This module manages the installation and config of the rabbitmq server it has only been tested on certain version
* [`rabbitmq::server`](#rabbitmqserver): Backwards compatibility layer to support including `rabbitmq::server` directly.

_Private Classes_

* `rabbitmq::config`: Sets all the configuration values for RabbitMQ and creates the directories for config and ssl.
* `rabbitmq::install`: Ensures that rabbitmq-server exists
* `rabbitmq::install::rabbitmqadmin`: Install rabbitmq admin
* `rabbitmq::management`: Manage presence / absence of user resource for guest management user.
* `rabbitmq::params`: OS Specific parameters and other settings
* `rabbitmq::repo::apt`: requires puppetlabs-apt puppetlabs-stdlib
* `rabbitmq::repo::rhel`: Makes sure that the Packagecloud repo is installed
Expand Down Expand Up @@ -916,176 +916,142 @@ Data type: `Boolean`

Default value: $rabbitmq::params::ssl_management_fail_if_no_peer_cert

### rabbitmq::management

The rabbitmq::management class.

### rabbitmq::server

Class: rabbitmq::server

This module manages the installation and config of the rabbitmq server
it has only been tested on certain version of debian-ish systems
Parameters:
[*port*] - port where rabbitmq server is hosted
[*delete_guest_user*] - rather or not to delete the default user
[*version*] - deprecated -- does nothing
[*package_name*] - name of rabbitmq package
[*service_name*] - name of rabbitmq service
[*service_ensure*] - desired ensure state for service
[*stomp_port*] - port stomp should be listening on
[*node_ip_address*] - ip address for rabbitmq to bind to
[*config*] - contents of config file
[*env_config*] - contents of env-config file
[*config_cluster*] - whether to configure a RabbitMQ cluster
[*cluster_nodes*] - which nodes to cluster with (including the current one)
[*cluster_node_type*] - Type of cluster node (disc/disk or ram)
[*erlang_cookie*] - erlang cookie, must be the same for all nodes in a cluster
[*wipe_db_on_cookie_change*] - whether to wipe the RabbitMQ data if the specified
erlang_cookie differs from the current one. This is a sad parameter: actually,
if the cookie indeed differs, then wiping the database is the *only* thing you
can do. You're only required to set this parameter to true as a sign that you
realise this.
Requires:
stdlib
Sample Usage:

This module is used as backward compability layer for modules
which require rabbitmq::server instead of rabbitmq class.
It's still common uasge in many modules.


[Remember: No empty lines between comments and class definition]
This module manages the installation and config of the rabbitmq server. It is used as backward compability layer for modules which
require rabbitmq::server instead of rabbitmq class.

#### Parameters

The following parameters are available in the `rabbitmq::server` class.

##### `port`

Data type: `Any`

Data type: `Integer`

Port that rabbitmq server should listen to

Default value: $rabbitmq::params::port

##### `delete_guest_user`

Data type: `Any`

Data type: `Boolean`

Whether or not to delete the default user

Default value: $rabbitmq::params::delete_guest_user

##### `package_name`

Data type: `Any`

Data type: `Variant[String, Array]`

Name of rabbitmq package

Default value: $rabbitmq::params::package_name

##### `service_name`

Data type: `Any`

Data type: `String`

Name of rabbitmq service

Default value: $rabbitmq::params::service_name

##### `service_ensure`

Data type: `Any`

Data type: `Enum['running', 'stopped']`

Desired ensure state for service

Default value: $rabbitmq::params::service_ensure

##### `service_manage`

Data type: `Any`

Data type: `Boolean`

Determines if the service is managed

Default value: $rabbitmq::params::service_manage

##### `config_stomp`

Data type: `Any`

Data type: `Boolean`

Enable or disable stomp

Default value: $rabbitmq::params::config_stomp

##### `stomp_port`

Data type: `Any`

Data type: `Integer[1, 65535]`

Port stomp should be listening on

Default value: $rabbitmq::params::stomp_port

##### `config_cluster`

Data type: `Any`



Default value: $rabbitmq::params::config_cluster

##### `cluster_nodes`

Data type: `Any`
##### `node_ip_address`

Data type: `Optional[String]`

IP address for rabbitmq to bind to

Default value: $rabbitmq::params::cluster_nodes
Default value: $rabbitmq::params::node_ip_address

##### `cluster_node_type`
##### `config`

Data type: `Any`
Data type: `String`

Contents of config file

Default value: $rabbitmq::params::config

Default value: $rabbitmq::params::cluster_node_type
##### `env_config`

##### `node_ip_address`
Data type: `String`

Data type: `Any`
Contents of env-config file

Default value: $rabbitmq::params::env_config

##### `config_cluster`

Default value: $rabbitmq::params::node_ip_address
Data type: `Boolean`

##### `config`
Whether to configure a RabbitMQ cluster

Data type: `Any`
Default value: $rabbitmq::params::config_cluster

##### `cluster_nodes`

Data type: `Array`

Default value: $rabbitmq::params::config
Which nodes to cluster with (including the current one)

##### `env_config`
Default value: $rabbitmq::params::cluster_nodes

Data type: `Any`
##### `cluster_node_type`

Data type: `Enum['ram', 'disk', 'disc']`

Type of cluster node (disc/disk or ram)

Default value: $rabbitmq::params::env_config
Default value: $rabbitmq::params::cluster_node_type

##### `erlang_cookie`

Data type: `Any`

Data type: `Optional[String]`

Erlang cookie, must be the same for all nodes in a cluster

Default value: $rabbitmq::params::erlang_cookie

##### `wipe_db_on_cookie_change`

Data type: `Any`

Data type: `Boolean`

Whether to wipe the RabbitMQ data if the specified erlang_cookie differs from the current one. This is a sad parameter: actually, if
the cookie indeed differs, then wiping the database is the *only* thing you can do. You're only required to set this parameter to
true as a sign that you realise this.

Default value: $rabbitmq::params::wipe_db_on_cookie_change

Expand Down
2 changes: 2 additions & 0 deletions manifests/management.pp
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Manage presence / absence of user resource for guest management user.
#
# @api private
class rabbitmq::management {

$delete_guest_user = $rabbitmq::delete_guest_user
Expand Down
100 changes: 53 additions & 47 deletions manifests/server.pp
Original file line number Diff line number Diff line change
@@ -1,54 +1,60 @@
# Class: rabbitmq::server
# @summary Backwards compatibility layer to support including `rabbitmq::server` directly.
#
# This module manages the installation and config of the rabbitmq server
# it has only been tested on certain version of debian-ish systems
# Parameters:
# [*port*] - port where rabbitmq server is hosted
# [*delete_guest_user*] - rather or not to delete the default user
# [*version*] - deprecated -- does nothing
# [*package_name*] - name of rabbitmq package
# [*service_name*] - name of rabbitmq service
# [*service_ensure*] - desired ensure state for service
# [*stomp_port*] - port stomp should be listening on
# [*node_ip_address*] - ip address for rabbitmq to bind to
# [*config*] - contents of config file
# [*env_config*] - contents of env-config file
# [*config_cluster*] - whether to configure a RabbitMQ cluster
# [*cluster_nodes*] - which nodes to cluster with (including the current one)
# [*cluster_node_type*] - Type of cluster node (disc/disk or ram)
# [*erlang_cookie*] - erlang cookie, must be the same for all nodes in a cluster
# [*wipe_db_on_cookie_change*] - whether to wipe the RabbitMQ data if the specified
# erlang_cookie differs from the current one. This is a sad parameter: actually,
# if the cookie indeed differs, then wiping the database is the *only* thing you
# can do. You're only required to set this parameter to true as a sign that you
# realise this.
# Requires:
# stdlib
# Sample Usage:
# This module manages the installation and config of the rabbitmq server. It is used as backward compability layer for modules which
# require rabbitmq::server instead of rabbitmq class.
#
# This module is used as backward compability layer for modules
# which require rabbitmq::server instead of rabbitmq class.
# It's still common uasge in many modules.
# @param port
# Port that rabbitmq server should listen to
# @param delete_guest_user
# Whether or not to delete the default user
# @param package_name
# Name of rabbitmq package
# @param service_name
# Name of rabbitmq service
# @param service_ensure
# Desired ensure state for service
# @param service_manage
# Determines if the service is managed
# @param config_stomp
# Enable or disable stomp
# @param stomp_port
# Port stomp should be listening on
# @param node_ip_address
# IP address for rabbitmq to bind to
# @param config
# Contents of config file
# @param env_config
# Contents of env-config file
# @param config_cluster
# Whether to configure a RabbitMQ cluster
# @param cluster_nodes
# Which nodes to cluster with (including the current one)
# @param cluster_node_type
# Type of cluster node (disc/disk or ram)
# @param erlang_cookie
# Erlang cookie, must be the same for all nodes in a cluster
# @param wipe_db_on_cookie_change
# Whether to wipe the RabbitMQ data if the specified erlang_cookie differs from the current one. This is a sad parameter: actually, if
# the cookie indeed differs, then wiping the database is the *only* thing you can do. You're only required to set this parameter to
# true as a sign that you realise this.
#
#
# [Remember: No empty lines between comments and class definition]
class rabbitmq::server(
$port = $rabbitmq::params::port,
$delete_guest_user = $rabbitmq::params::delete_guest_user,
$package_name = $rabbitmq::params::package_name,
$service_name = $rabbitmq::params::service_name,
$service_ensure = $rabbitmq::params::service_ensure,
$service_manage = $rabbitmq::params::service_manage,
$config_stomp = $rabbitmq::params::config_stomp,
$stomp_port = $rabbitmq::params::stomp_port,
$config_cluster = $rabbitmq::params::config_cluster,
$cluster_nodes = $rabbitmq::params::cluster_nodes,
$cluster_node_type = $rabbitmq::params::cluster_node_type,
$node_ip_address = $rabbitmq::params::node_ip_address,
$config = $rabbitmq::params::config,
$env_config = $rabbitmq::params::env_config,
$erlang_cookie = $rabbitmq::params::erlang_cookie,
$wipe_db_on_cookie_change = $rabbitmq::params::wipe_db_on_cookie_change,
Integer $port = $rabbitmq::params::port,
Boolean $delete_guest_user = $rabbitmq::params::delete_guest_user,
Variant[String, Array] $package_name = $rabbitmq::params::package_name,
String $service_name = $rabbitmq::params::service_name,
Enum['running', 'stopped'] $service_ensure = $rabbitmq::params::service_ensure,
Boolean $service_manage = $rabbitmq::params::service_manage,
Boolean $config_stomp = $rabbitmq::params::config_stomp,
Integer[1, 65535] $stomp_port = $rabbitmq::params::stomp_port,
Boolean $config_cluster = $rabbitmq::params::config_cluster,
Array $cluster_nodes = $rabbitmq::params::cluster_nodes,
Enum['ram', 'disk', 'disc'] $cluster_node_type = $rabbitmq::params::cluster_node_type,
Optional[String] $node_ip_address = $rabbitmq::params::node_ip_address,
String $config = $rabbitmq::params::config,
String $env_config = $rabbitmq::params::env_config,
Optional[String] $erlang_cookie = $rabbitmq::params::erlang_cookie,
Boolean $wipe_db_on_cookie_change = $rabbitmq::params::wipe_db_on_cookie_change,
) inherits rabbitmq::params {

class { 'rabbitmq':
Expand Down

0 comments on commit 0adc07f

Please sign in to comment.