aboutsummaryrefslogtreecommitdiffhomepage
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md69
1 files changed, 62 insertions, 7 deletions
diff --git a/README.md b/README.md
index a4a7c45..8685452 100644
--- a/README.md
+++ b/README.md
@@ -8,14 +8,33 @@ Requirements
8 8
9Ensure hostnames are resolvable prior to clustering...either update /etc/hosts or ensure DNS is working. 9Ensure hostnames are resolvable prior to clustering...either update /etc/hosts or ensure DNS is working.
10 10
11Vagrant
12-------
13
14Spin up a 3 node HA Cluster for testing...
15Install Ansible role on your host:
16````
17sudo ansible-galaxy install -r requirements.yml -f
18````
19Now spin up your environment...
20````
21vagrant up
22````
23When you are done testing, tear it all down...
24````
25./cleanup.sh
26````
27
11Role Variables 28Role Variables
12-------------- 29--------------
13 30
14```` 31````
32---
33# defaults file for ansible-rabbitmq
15config_rabbitmq_ha: false #defines if rabbitmq ha should be configured...define here or in group_vars/group 34config_rabbitmq_ha: false #defines if rabbitmq ha should be configured...define here or in group_vars/group
16enable_rabbitmq_clustering: false #defines if setting up a rabbitmq cluster...define here or in group_vars/group 35enable_rabbitmq_clustering: false #defines if setting up a rabbitmq cluster...define here or in group_vars/group
17erlang_cookie: LSKNKBELKPSTDBBCHETL #define erlang cookie for cluster...define here or in group_vars/group 36erlang_cookie: 'LSKNKBELKPSTDBBCHETL' #define erlang cookie for cluster...define here or in group_vars/group
18erlang_cookie_file: /var/lib/rabbitmq/.erlang.cookie 37erlang_cookie_file: '/var/lib/rabbitmq/.erlang.cookie'
19rabbitmq_config: 38rabbitmq_config:
20 - queue_name: logstash 39 - queue_name: logstash
21 durable: true 40 durable: true
@@ -23,7 +42,21 @@ rabbitmq_config:
23 type: direct 42 type: direct
24 routing_key: logstash 43 routing_key: logstash
25 tags: 'ha-mode=all,ha-sync-mode=automatic' 44 tags: 'ha-mode=all,ha-sync-mode=automatic'
45rabbitmq_debian_repo: 'deb http://www.rabbitmq.com/debian/ testing main'
46rabbitmq_debian_repo_key: 'http://www.rabbitmq.com/rabbitmq-signing-key-public.asc'
26rabbitmq_master: [] #defines the inventory host that should be considered master...define here or in group_vars/group 47rabbitmq_master: [] #defines the inventory host that should be considered master...define here or in group_vars/group
48rabbitmq_redhat_repo_key: 'https://www.rabbitmq.com/rabbitmq-signing-key-public.asc'
49rabbitmq_redhat_package: 'rabbitmq-server-{{ rabbitmq_redhat_version }}-1.noarch.rpm'
50rabbitmq_redhat_url: 'http://www.rabbitmq.com/releases/rabbitmq-server/v{{ rabbitmq_redhat_version }}'
51rabbitmq_redhat_version: '3.6.1'
52rabbitmq_users: #define admin user to create in order to login to WebUI
53 - name: rabbitmqadmin
54 password: rabbitmqadmin
55 vhost: /
56 configure_priv: '.*'
57 read_priv: '.*'
58 write_priv: '.*'
59 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
27```` 60````
28 61
29example... 62example...
@@ -38,16 +71,38 @@ rabbitmq_master: ans-test-1
38Dependencies 71Dependencies
39------------ 72------------
40 73
41A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 74None
42 75
43Example Playbook 76Example Playbook
44---------------- 77----------------
45 78
46Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 79````
80---
81- hosts: all
82 become: true
83 vars:
84 - pri_domain_name: 'test.vagrant.local'
85 roles:
86 tasks:
87 - name: updating /etc/hosts
88 lineinfile:
89 dest: /etc/hosts
90 regexp: "^{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}"
91 line: "{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}"
92 state: present
93 with_items: groups['all']
47 94
48 - hosts: servers 95- hosts: all
49 roles: 96 become: true
50 - { role: mrlesmithjr.rabbitmq } 97 vars:
98 - config_rabbitmq_ha: true
99 - enable_rabbitmq_clustering: true
100 - pri_domain_name: 'test.vagrant.local'
101 - rabbitmq_master: 'node0'
102 roles:
103 - role: ansible-rabbitmq
104 tasks:
105````
51 106
52License 107License
53------- 108-------