|
1 | | -# Announce |
2 | | - |
3 | | -Long time no update. I'm back on this playbook again, I'll be merging fixes (url, |
4 | | -key checking,...) in master and releasing a working tagged version. |
5 | | - |
6 | | -Then I'll focus on creating a next branche that will be the version 2.0 of this |
7 | | -playbook. The main things I plan to do with the version 2 is going to separate |
8 | | -the installation steps from the pure configuration. I don't want to support a |
9 | | -gazillion OS in one playbook. Thus, you'll be able to make a |
10 | | -ansible-playbook-rabbitmq-install-my-little-snowflak-os yourself :) |
11 | | - |
12 | | -Thank you all for all the participation! |
13 | | - |
14 | 1 | # Rabbitmq Playbook |
15 | 2 |
|
| 3 | +HelloFresh extension of the RabbitMQ playbook which allows clustering. Originally written by [Mayeu](https://github.com/Mayeu/ansible-playbook-rabbitmq). |
| 4 | + |
16 | 5 | Playbook to install and configure rabbitmq. Will come with various |
17 | 6 | configuration tweaking later on. |
18 | 7 |
|
19 | 8 | If you wish to discuss modifications, or help to support more platforms, open |
20 | 9 | an issue. |
21 | 10 |
|
22 | | -## Installation |
23 | | - |
24 | | -Use Ansible galaxy to install this playbook: |
25 | | - |
26 | | - $ ansible-galaxy install Mayeu.RabbitMQ,1.4.0 |
27 | | - |
28 | | -The `master` branch should currently be considered instable. Please avoid using |
29 | | -it for something else than test purpose :) |
30 | | - |
31 | | -## Supported system |
32 | | - |
33 | | -Currently only Debian Jessie and Wheezy on amd64 are supported. Patch welcome |
34 | | -to support other distribution or OS. |
35 | | - |
36 | | -## Semantic versioning 2.0.0 |
37 | | - |
38 | | -Starting with the commit |
39 | | -[67c608826a140868a71854ce3129b5f3d67ddcce](https://github.com/Mayeu/ansible-playbook-rabbitmq/commit/67c608826a140868a71854ce3129b5f3d67ddcce), |
40 | | -this playbook use semantic versioning. Following the specification, and since |
41 | | -the playbook is used in production and I want to avoid breaking the |
42 | | -compatibility, the first version number is 1.0.0 |
43 | | - |
44 | | -The public API defined in the semantic versioning correspond to the settings |
45 | | -available to the user. Breaking the API (incrementing from `X.Y.Z` to |
46 | | -`(X+1).Y.Z`) in this context mean that the user need to change variable name |
47 | | -for its playbook to run. |
48 | | - |
49 | | -Any new feature added (from `X.Y.Z` to `X.(Y+1).Z`) should have a working |
50 | | -default value that need no user interaction by default. If a feature addition |
51 | | -require user interaction, then it is not a minor upgrade, but a major one. |
52 | | - |
53 | | -## Role Variables |
54 | | - |
55 | | -### Installation |
56 | | - |
57 | | -|Name|Type|Description|Default| |
58 | | -|----|----|-----------|-------| |
59 | | -`rabbitmq_os_package`|Bool|When true uses the default package proposed by the OS or distribution instead of the one distributed by RabbitMQ.|`false`| |
60 | | - |
61 | | - |
62 | 11 | ### Environment |
63 | 12 |
|
64 | 13 | |Name|Type|Description|Default| |
65 | 14 | |----|----|-----------|-------| |
66 | 15 | `rabbitmq_conf_env`|Hash|Set environment variable|undef| |
67 | 16 |
|
68 | | -Exemple: |
| 17 | +Example: |
69 | 18 |
|
70 | 19 | ```yaml |
71 | 20 | rabbitmq_conf_env: |
@@ -195,17 +144,89 @@ And then configure the role: |
195 | 144 | rabbitmq_server_cert: files/myserver_cert.crt |
196 | 145 | ``` |
197 | 146 |
|
198 | | -## Testing |
199 | | - |
200 | | -There is some tests that try to provision a VM using Vagrant. Just launch them |
201 | | -with: |
| 147 | +## Variables |
202 | 148 |
|
203 | | - $ vagrant up # for test with Debian jessie |
204 | | - $ export VAGRANT_BOX_NAME='chef/centos-6.5' vagrant up # for test with Centos |
| 149 | +```yaml |
| 150 | +# Take the package given by the OS/distrib |
| 151 | +rabbitmq_os_package : false |
| 152 | +
|
| 153 | +# Plugins |
| 154 | +rabbitmq_plugins : [] |
| 155 | +rabbitmq_new_only : 'no' |
| 156 | +
|
| 157 | +# VHOST |
| 158 | +rabbitmq_vhost_definitions : [] |
| 159 | +rabbitmq_users_definitions : [] |
| 160 | +
|
| 161 | +# Avoid setting up federation |
| 162 | +rabbitmq_federation : false |
| 163 | +
|
| 164 | +# defaults file for rabbitmq |
| 165 | +rabbitmq_cacert : "files/rabbitmq_cacert.pem" |
| 166 | +rabbitmq_server_key : "files/rabbitmq_server_key.pem" |
| 167 | +rabbitmq_server_cert : "files/rabbitmq_server_cert.pem" |
| 168 | +rabbitmq_ssl : true |
| 169 | +
|
| 170 | +## Optional logging |
| 171 | +## none, error, warnings, info, debug |
| 172 | +# rabbitmq_log_level : |
| 173 | +# channel : error |
| 174 | +# connection : error |
| 175 | +# federation : error |
| 176 | +# mirroring : error |
| 177 | +
|
| 178 | +# ###################### |
| 179 | +# RabbitMQ Configuration |
| 180 | +# ###################### |
| 181 | +
|
| 182 | +# rabbitmq TCP configuration |
| 183 | +rabbitmq_conf_tcp_listeners_address : '0.0.0.0' |
| 184 | +rabbitmq_conf_tcp_listeners_port : 5672 |
| 185 | +
|
| 186 | +# rabbitmq SSL configuration |
| 187 | +rabbitmq_conf_ssl_listeners_address : '0.0.0.0' |
| 188 | +rabbitmq_conf_ssl_listeners_port : 5671 |
| 189 | +rabbitmq_conf_ssl_options_cacertfile : "/etc/rabbitmq/ssl/{{ rabbitmq_cacert | basename }}" |
| 190 | +rabbitmq_conf_ssl_options_certfile : "/etc/rabbitmq/ssl/{{ rabbitmq_server_cert | basename }}" |
| 191 | +rabbitmq_conf_ssl_options_keyfile : "/etc/rabbitmq/ssl/{{ rabbitmq_server_key | basename }}" |
| 192 | +rabbitmq_conf_ssl_options_fail_if_no_peer_cert: "true" |
| 193 | +
|
| 194 | +rabbitmq_env : false |
| 195 | +# Guest options |
| 196 | +remove_guest_user : true |
| 197 | +
|
| 198 | +# Enable cluster |
| 199 | +rabbitmq_clustering : false |
| 200 | +## Erlang cookie |
| 201 | +rabbitmq_erlang_cookie_path : "/var/lib/rabbitmq/.erlang.cookie" |
| 202 | +rabbitmq_erlang_cookie : beKSqkmoLrtvVfjOytLOQpATbGVEGbVA #test cookie, override for production |
| 203 | +## Cluster options |
| 204 | +rabbitmq_cluster_instance_to_join_index : 0 |
| 205 | +rabbitmq_cluster_instance_to_join : "{{ groups[rabbitmq_cluster_group][rabbitmq_cluster_instance_to_join_index].split('.')[0] }}" |
| 206 | +rabbitmq_cluster_group : rabbit_cluster |
| 207 | +rabbitmq_cluster_post_fix_domain : "production.example.com" |
| 208 | +# Automation user for cluster. You should encrypt |
| 209 | +rabbitmq_cluster_api_user : "api-automation" |
| 210 | +rabbitmq_cluster_api_password : "api-password" |
| 211 | +
|
| 212 | +# How to get the IPs of cluster |
| 213 | +rabbitmq_clustering_resolve_names : "ansible" # ['ansible', dns] |
| 214 | +
|
| 215 | +## Probably dont need to change that stuff |
| 216 | +### Construct a regex to match group before . |
| 217 | +rabbitmq_cluster_post_fix_domain_regex_replace: "([^.]*).*" |
| 218 | +# Print extra message related to inventory |
| 219 | +rabbitmq_cluster_debug : false |
| 220 | +``` |
205 | 221 |
|
206 | | -You can change the VM used during test by setting the `VAGRANT_BOX_NAME` env |
207 | | -variable to something else than `deb/jessie`. |
| 222 | +## Testing |
208 | 223 |
|
209 | 224 | ## License |
210 | 225 |
|
211 | 226 | BSD |
| 227 | + |
| 228 | +<p align="center"> |
| 229 | + <a href="https://hellofresh.com"> |
| 230 | + <img width="120" src="https://www.hellofresh.de/images/hellofresh/press/HelloFresh_Logo.png"> |
| 231 | + </a> |
| 232 | +</p> |
0 commit comments