diff options
author | Larry Smith Jr <mrlesmithjr@gmail.com> | 2017-05-20 21:19:34 -0400 |
---|---|---|
committer | Larry Smith Jr <mrlesmithjr@gmail.com> | 2017-05-20 21:19:34 -0400 |
commit | a67dde50f26e0f76d91f0744e8e8341dac95dae2 (patch) | |
tree | 2971e931788eddf51b9ec71ac063bfb951215d0c /README.md | |
parent | f36f2edd9429200fbd18eeecfbba4b5fe891f26d (diff) | |
download | ansible-rabbitmq-enhancements/issues-9-10-11.tar.gz ansible-rabbitmq-enhancements/issues-9-10-11.tar.zst ansible-rabbitmq-enhancements/issues-9-10-11.zip |
Cleaned up code as part of issue #10enhancements/issues-9-10-11
Signed-off-by: Larry Smith Jr <mrlesmithjr@gmail.com>
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 92 |
1 files changed, 17 insertions, 75 deletions
@@ -1,7 +1,7 @@ | |||
1 | Role Name | 1 | Role Name |
2 | ========= | 2 | ========= |
3 | 3 | ||
4 | Installs rabbitmq https://www.rabbitmq.com/ (Configurable...HA and Clustering ready) | 4 | An [Ansible] role to install/configure [RabbitMQ] |
5 | 5 | ||
6 | Build Status | 6 | Build Status |
7 | ------------ | 7 | ------------ |
@@ -11,67 +11,30 @@ Build Status | |||
11 | Requirements | 11 | Requirements |
12 | ------------ | 12 | ------------ |
13 | 13 | ||
14 | Ensure hostnames are resolvable prior to clustering...either update /etc/hosts or ensure DNS is working. | 14 | Ensure hostnames are resolvable prior to clustering...either update /etc/hosts |
15 | or ensure DNS is working. | ||
15 | 16 | ||
16 | Vagrant | 17 | Vagrant |
17 | ------- | 18 | ------- |
18 | 19 | ||
19 | Spin up a 3 node HA Cluster for testing... | 20 | Spin up a 3 node HA Cluster for testing... |
20 | Install Ansible role on your host: | 21 | Install Ansible role on your host: |
21 | ```` | 22 | ``` |
22 | sudo ansible-galaxy install -r requirements.yml -f | 23 | sudo ansible-galaxy install -r requirements.yml -f |
23 | ```` | 24 | ``` |
24 | Now spin up your environment... | 25 | Now spin up your environment... |
25 | ```` | 26 | ``` |
26 | vagrant up | 27 | vagrant up |
27 | ```` | 28 | ``` |
28 | When you are done testing, tear it all down... | 29 | When you are done testing, tear it all down... |
29 | ```` | 30 | ``` |
30 | ./cleanup.sh | 31 | ./cleanup.sh |
31 | ```` | 32 | ``` |
32 | 33 | ||
33 | Role Variables | 34 | Role Variables |
34 | -------------- | 35 | -------------- |
35 | 36 | ||
36 | ```` | 37 | [Role Defaults](./defaults/main.yml) |
37 | --- | ||
38 | # defaults file for ansible-rabbitmq | ||
39 | rabbitmq_config_ha: false #defines if rabbitmq ha should be configured...define here or in group_vars/group | ||
40 | rabbitmq_enable_clustering: false #defines if setting up a rabbitmq cluster...define here or in group_vars/group | ||
41 | rabbitmq_erlang_cookie: 'LSKNKBELKPSTDBBCHETL' #define erlang cookie for cluster...define here or in group_vars/group | ||
42 | rabbitmq_erlang_cookie_file: '/var/lib/rabbitmq/.erlang.cookie' | ||
43 | rabbitmq_config: | ||
44 | - queue_name: logstash | ||
45 | durable: true | ||
46 | exchange_name: logstash | ||
47 | type: direct | ||
48 | routing_key: logstash | ||
49 | tags: 'ha-mode=all,ha-sync-mode=automatic' | ||
50 | rabbitmq_debian_repo: 'deb http://www.rabbitmq.com/debian/ testing main' | ||
51 | rabbitmq_debian_repo_key: 'http://www.rabbitmq.com/rabbitmq-signing-key-public.asc' | ||
52 | rabbitmq_master: [] #defines the inventory host that should be considered master...define here or in group_vars/group | ||
53 | rabbitmq_redhat_repo_key: 'https://www.rabbitmq.com/rabbitmq-signing-key-public.asc' | ||
54 | rabbitmq_redhat_package: 'rabbitmq-server-{{ rabbitmq_redhat_version }}-1.noarch.rpm' | ||
55 | rabbitmq_redhat_url: 'http://www.rabbitmq.com/releases/rabbitmq-server/v{{ rabbitmq_redhat_version }}' | ||
56 | rabbitmq_redhat_version: '3.6.1' | ||
57 | rabbitmq_users: #define admin user to create in order to login to WebUI | ||
58 | - name: rabbitmqadmin | ||
59 | password: rabbitmqadmin | ||
60 | vhost: / | ||
61 | configure_priv: '.*' | ||
62 | read_priv: '.*' | ||
63 | write_priv: '.*' | ||
64 | tags: 'administrator' #define comma separated list of tags to assign to user....management,policymaker,monitoring,administrator...required for management plugin. https://www.rabbitmq.com/management.html | ||
65 | ```` | ||
66 | |||
67 | example... | ||
68 | group_vars/rabbitmq-cluster-nodes | ||
69 | ```` | ||
70 | --- | ||
71 | rabbitmq_enable_clustering: true | ||
72 | rabbitmq_config_ha: false | ||
73 | rabbitmq_master: ans-test-1 | ||
74 | ```` | ||
75 | 38 | ||
76 | Dependencies | 39 | Dependencies |
77 | ------------ | 40 | ------------ |
@@ -81,33 +44,7 @@ None | |||
81 | Example Playbook | 44 | Example Playbook |
82 | ---------------- | 45 | ---------------- |
83 | 46 | ||
84 | ```` | 47 | [Example Playbook](./playbook.yml) |
85 | --- | ||
86 | - hosts: all | ||
87 | become: true | ||
88 | vars: | ||
89 | - pri_domain_name: 'test.vagrant.local' | ||
90 | roles: | ||
91 | tasks: | ||
92 | - name: updating /etc/hosts | ||
93 | lineinfile: | ||
94 | dest: /etc/hosts | ||
95 | regexp: "^{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}" | ||
96 | line: "{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}" | ||
97 | state: present | ||
98 | with_items: "{{ groups['all'] }}" | ||
99 | |||
100 | - hosts: all | ||
101 | become: true | ||
102 | vars: | ||
103 | - rabbitmq_config_ha: true | ||
104 | - rabbitmq_enable_clustering: true | ||
105 | - pri_domain_name: 'test.vagrant.local' | ||
106 | - rabbitmq_master: 'node0' | ||
107 | roles: | ||
108 | - role: ansible-rabbitmq | ||
109 | tasks: | ||
110 | ```` | ||
111 | 48 | ||
112 | License | 49 | License |
113 | ------- | 50 | ------- |
@@ -118,6 +55,11 @@ Author Information | |||
118 | ------------------ | 55 | ------------------ |
119 | 56 | ||
120 | Larry Smith Jr. | 57 | Larry Smith Jr. |
121 | - @mrlesmithjr | 58 | - [@mrlesmithjr] |
122 | - http://everythingshouldbevirtual.com | 59 | - http://everythingshouldbevirtual.com |
123 | - mrlesmithjr [at] gmail.com | 60 | - mrlesmithjr [at] gmail.com |
61 | |||
62 | [@mrlesmithjr]: <https://www.twitter.com/mrlesmithjr> | ||
63 | |||
64 | [Ansible]: <https://www.ansible.com> | ||
65 | [RabbitMQ]: <https://www.rabbitmq.com/> | ||