diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 118 |
1 files changed, 118 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..03cd1aa --- /dev/null +++ b/README.md | |||
@@ -0,0 +1,118 @@ | |||
1 | Role Name | ||
2 | ========= | ||
3 | |||
4 | Installs rabbitmq https://www.rabbitmq.com/ (Configurable...HA and Clustering ready) | ||
5 | |||
6 | Requirements | ||
7 | ------------ | ||
8 | |||
9 | Ensure hostnames are resolvable prior to clustering...either update /etc/hosts or ensure DNS is working. | ||
10 | |||
11 | Vagrant | ||
12 | ------- | ||
13 | |||
14 | Spin up a 3 node HA Cluster for testing... | ||
15 | Install Ansible role on your host: | ||
16 | ```` | ||
17 | sudo ansible-galaxy install -r requirements.yml -f | ||
18 | ```` | ||
19 | Now spin up your environment... | ||
20 | ```` | ||
21 | vagrant up | ||
22 | ```` | ||
23 | When you are done testing, tear it all down... | ||
24 | ```` | ||
25 | ./cleanup.sh | ||
26 | ```` | ||
27 | |||
28 | Role Variables | ||
29 | -------------- | ||
30 | |||
31 | ```` | ||
32 | --- | ||
33 | # defaults file for ansible-rabbitmq | ||
34 | rabbitmq_config_ha: false #defines if rabbitmq ha should be configured...define here or in group_vars/group | ||
35 | rabbitmq_enable_clustering: false #defines if setting up a rabbitmq cluster...define here or in group_vars/group | ||
36 | rabbitmq_erlang_cookie: 'LSKNKBELKPSTDBBCHETL' #define erlang cookie for cluster...define here or in group_vars/group | ||
37 | rabbitmq_erlang_cookie_file: '/var/lib/rabbitmq/.erlang.cookie' | ||
38 | rabbitmq_config: | ||
39 | - queue_name: logstash | ||
40 | durable: true | ||
41 | exchange_name: logstash | ||
42 | type: direct | ||
43 | routing_key: logstash | ||
44 | tags: 'ha-mode=all,ha-sync-mode=automatic' | ||
45 | rabbitmq_debian_repo: 'deb http://www.rabbitmq.com/debian/ testing main' | ||
46 | rabbitmq_debian_repo_key: 'http://www.rabbitmq.com/rabbitmq-signing-key-public.asc' | ||
47 | rabbitmq_master: [] #defines the inventory host that should be considered master...define here or in group_vars/group | ||
48 | rabbitmq_redhat_repo_key: 'https://www.rabbitmq.com/rabbitmq-signing-key-public.asc' | ||
49 | rabbitmq_redhat_package: 'rabbitmq-server-{{ rabbitmq_redhat_version }}-1.noarch.rpm' | ||
50 | rabbitmq_redhat_url: 'http://www.rabbitmq.com/releases/rabbitmq-server/v{{ rabbitmq_redhat_version }}' | ||
51 | rabbitmq_redhat_version: '3.6.1' | ||
52 | rabbitmq_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 | ||
60 | ```` | ||
61 | |||
62 | example... | ||
63 | group_vars/rabbitmq-cluster-nodes | ||
64 | ```` | ||
65 | --- | ||
66 | rabbitmq_enable_clustering: true | ||
67 | rabbitmq_config_ha: false | ||
68 | rabbitmq_master: ans-test-1 | ||
69 | ```` | ||
70 | |||
71 | Dependencies | ||
72 | ------------ | ||
73 | |||
74 | None | ||
75 | |||
76 | Example Playbook | ||
77 | ---------------- | ||
78 | |||
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'] | ||
94 | |||
95 | - hosts: all | ||
96 | become: true | ||
97 | vars: | ||
98 | - rabbitmq_config_ha: true | ||
99 | - rabbitmq_enable_clustering: true | ||
100 | - pri_domain_name: 'test.vagrant.local' | ||
101 | - rabbitmq_master: 'node0' | ||
102 | roles: | ||
103 | - role: ansible-rabbitmq | ||
104 | tasks: | ||
105 | ```` | ||
106 | |||
107 | License | ||
108 | ------- | ||
109 | |||
110 | BSD | ||
111 | |||
112 | Author Information | ||
113 | ------------------ | ||
114 | |||
115 | Larry Smith Jr. | ||
116 | - @mrlesmithjr | ||
117 | - http://everythingshouldbevirtual.com | ||
118 | - mrlesmithjr [at] gmail.com | ||