Skip to content

Commit

Permalink
Remove duplicated / outdated docs in README
Browse files Browse the repository at this point in the history
Since we are generating REFERENCE.md, point users to here for docs.
  • Loading branch information
wyardley committed Dec 8, 2018
1 parent 2cc0193 commit af1c79b
Showing 1 changed file with 2 additions and 299 deletions.
301 changes: 2 additions & 299 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,308 +48,11 @@ All options and configuration can be done through interacting with the parameter
on the main rabbitmq class.
These are now documented via [Puppet Strings](https://github.com/puppetlabs/puppet-strings)

For convenience, some examples are duplicated here:

## rabbitmq class

To begin with the rabbitmq class controls the installation of rabbitmq. In here
you can control many parameters relating to the package and service, such as
disabling puppet support of the service:

```puppet
class { 'rabbitmq':
service_manage => false,
port => '5672',
delete_guest_user => true,
}
```

For RabbitMQ versions < 3.6.0 (which don't use Ranch), you will need to
manually set `config_ranch` to `false`.

### Environment Variables
To use RabbitMQ Environment Variables, use the parameters `environment_variables` e.g.:

```puppet
class { 'rabbitmq':
port => 5672,
environment_variables => {
'NODENAME' => 'node01',
'SERVICENAME' => 'RabbitMQ'
}
}
```

### Variables Configurable in rabbitmq.config
To change RabbitMQ Config Variables in rabbitmq.config, use the parameters `config_variables` e.g.:

```puppet
class { 'rabbitmq':
port => 5672,
config_variables => {
'hipe_compile' => true,
'frame_max' => 131072,
'log_levels' => "[{connection, info}]"
}
}
```

To change Erlang Kernel Config Variables in rabbitmq.config, use the parameters
`config_kernel_variables` e.g.:

```puppet
class { 'rabbitmq':
port => 5672,
config_kernel_variables => {
'inet_dist_listen_min' => 9100,
'inet_dist_listen_max' => 9105,
}
}
```

To change Management Plugin Config Variables in rabbitmq.config, use the parameters
`config_management_variables` e.g.:

```puppet
class { 'rabbitmq':
config_management_variables => {
'rates_mode' => 'basic',
}
}
```

### Additional Variables Configurable in rabbitmq.config
To change Additional Config Variables in rabbitmq.config, use the parameter
`config_additional_variables` e.g.:

```puppet
class { 'rabbitmq':
config_additional_variables => {
'autocluster' => '[{consul_service, "rabbit"},{cluster_name, "rabbit"}]',
'foo' => '[{bar, "baz"}]'
}
}
```
This will result in the following config appended to the config file:
```
% Additional config
{autocluster, [{consul_service, "rabbit"},{cluster_name, "rabbit"}]},
{foo, [{bar, "baz"}]}
```
(This is required for the [autocluster plugin](https://github.com/aweber/rabbitmq-autocluster)

### Clustering
To use RabbitMQ clustering facilities, use the rabbitmq parameters
`config_cluster`, `cluster_nodes`, and `cluster_node_type`, e.g.:

```puppet
class { 'rabbitmq':
config_cluster => true,
cluster_nodes => ['rabbit1', 'rabbit2'],
cluster_node_type => 'ram',
erlang_cookie => 'A_SECRET_COOKIE_STRING',
wipe_db_on_cookie_change => true,
}
```

### rabbitmq\_user

query all current users: `$ puppet resource rabbitmq_user`

```puppet
rabbitmq_user { 'dan':
admin => true,
password => 'bar',
}
```
Optional parameter tags will set further rabbitmq tags like monitoring, policymaker, etc.
To set the administrator tag use admin-flag.
```puppet
rabbitmq_user { 'dan':
admin => true,
password => 'bar',
tags => ['monitoring', 'tag1'],
}
```

### rabbitmq\_vhost

query all current vhosts: `$ puppet resource rabbitmq_vhost`

```puppet
rabbitmq_vhost { 'myvhost':
ensure => present,
}
```

### rabbitmq\_exchange

```puppet
rabbitmq_exchange { 'myexchange@myvhost':
ensure => present,
user => 'dan',
password => 'bar',
type => 'topic',
internal => false,
auto_delete => false,
durable => true,
arguments => {
hash-header => 'message-distribution-hash'
}
}
```

### rabbitmq\_queue

```puppet
rabbitmq_queue { 'myqueue@myvhost':
ensure => present,
user => 'dan',
password => 'bar',
durable => true,
auto_delete => false,
arguments => {
x-message-ttl => 123,
x-dead-letter-exchange => 'other'
},
}
```

### rabbitmq\_binding

```puppet
rabbitmq_binding { 'myexchange@myqueue@myvhost':
ensure => present,
user => 'dan',
password => 'bar',
destination_type => 'queue',
routing_key => '#',
arguments => {},
}
```

```puppet
rabbitmq_binding { 'binding 1':
ensure => present,
source => 'myexchange',
destination => 'myqueue',
vhost => 'myvhost',
user => 'dan',
password => 'bar',
destination_type => 'queue',
routing_key => 'key1',
arguments => {},
}
rabbitmq_binding { 'binding 2':
ensure => present,
source => 'myexchange',
destination => 'myqueue',
vhost => 'myvhost',
user => 'dan',
password => 'bar',
destination_type => 'queue',
routing_key => 'key2',
arguments => {},
}
```

### rabbitmq\_user\_permissions

```puppet
rabbitmq_user_permissions { 'dan@myvhost':
configure_permission => '.*',
read_permission => '.*',
write_permission => '.*',
}
```

### rabbitmq\_policy

```puppet
rabbitmq_policy { 'ha-all@myvhost':
pattern => '.*',
priority => 0,
applyto => 'all',
definition => {
'ha-mode' => 'all',
'ha-sync-mode' => 'automatic',
},
}
```

### rabbitmq\_plugin

query all currently enabled plugins `$ puppet resource rabbitmq_plugin`

```puppet
rabbitmq_plugin {'rabbitmq_stomp':
ensure => present,
}
```

### rabbitmq\_parameter

```puppet
rabbitmq_parameter { 'documentumShovel@/':
component_name => '',
value => {
'src-uri' => 'amqp://',
'src-queue' => 'my-queue',
'dest-uri' => 'amqp://remote-server',
'dest-queue' => 'another-queue',
},
}
rabbitmq_parameter { 'documentumFed@/':
component_name => 'federation-upstream',
value => {
'uri' => 'amqp://myserver',
'expires' => '360000',
},
}
```
You can view example usage in [REFERENCE](REFERENCE.md).

## Reference

## Classes

* rabbitmq: Main class for installation and service management.
* rabbitmq::config: Main class for rabbitmq configuration/management.
* rabbitmq::install: Handles package installation.
* rabbitmq::params: Different configuration data for different systems.
* rabbitmq::service: Handles the rabbitmq service.
* rabbitmq::repo::apt: Handles apt repo for Debian systems.
* rabbitmq::repo::rhel: Handles rpm repo for Redhat systems.

### Module dependencies

If running CentOS/RHEL, ensure the epel repo, or another repo containing a
suitable Erlang version, is present. On Debian systems, puppetlabs/apt
(>=2.0.0 < 5.0.0) is a soft dependency.

To have a suitable erlang version installed on RedHat and Debian systems,
you have to install another puppet module from http://forge.puppetlabs.com/garethr/erlang with:

puppet module install garethr-erlang

This module handles the packages for erlang.
To use the module, add the following snippet to your site.pp or an appropriate profile class:

For RedHat systems:

include 'erlang'
class { 'erlang': epel_enable => true}

For Debian systems:

include 'erlang'
package { 'erlang-base':
ensure => 'latest',
}

This module also depends on voxpupuli/archive to install rabbitmqadmin.
See [REFERENCE](REFERENCE.md).

## Development

Expand Down

0 comments on commit af1c79b

Please sign in to comment.