Skip to content

Commit

Permalink
Merge pull request #625 from wyardley/add_examples_back
Browse files Browse the repository at this point in the history
Add back a few examples removed in #562
  • Loading branch information
bastelfreak committed Sep 9, 2017
2 parents a3fdcb2 + 0615afd commit 0e11237
Showing 1 changed file with 99 additions and 0 deletions.
99 changes: 99 additions & 0 deletions README.md
Expand Up @@ -50,6 +50,105 @@ These are now documented via [Puppet Strings](https://github.com/puppetlabs/pupp

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,
}
```

### 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`
Expand Down

0 comments on commit 0e11237

Please sign in to comment.