diff options
author | Larry Smith Jr <mrlesmithjr@gmail.coml> | 2016-03-03 15:28:30 -0500 |
---|---|---|
committer | Larry Smith Jr <mrlesmithjr@gmail.coml> | 2016-03-03 15:28:30 -0500 |
commit | 203ffcbfc31abb06c306d3adbde7e44dce9afca2 (patch) | |
tree | 752378316844898114f23c499bad0a2ae6f28cfc /README.md | |
parent | 93a297c59940c7cfe88afe0f9110af5b4be521e3 (diff) | |
download | ansible-rabbitmq-203ffcbfc31abb06c306d3adbde7e44dce9afca2.tar.gz ansible-rabbitmq-203ffcbfc31abb06c306d3adbde7e44dce9afca2.tar.zst ansible-rabbitmq-203ffcbfc31abb06c306d3adbde7e44dce9afca2.zip |
Added support for CentOS and Vagrant
Signed-off-by: Larry Smith Jr <mrlesmithjr@gmail.coml>
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 69 |
1 files changed, 62 insertions, 7 deletions
@@ -8,14 +8,33 @@ Requirements | |||
8 | 8 | ||
9 | Ensure hostnames are resolvable prior to clustering...either update /etc/hosts or ensure DNS is working. | 9 | Ensure hostnames are resolvable prior to clustering...either update /etc/hosts or ensure DNS is working. |
10 | 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 | |||
11 | Role Variables | 28 | Role Variables |
12 | -------------- | 29 | -------------- |
13 | 30 | ||
14 | ```` | 31 | ```` |
32 | --- | ||
33 | # defaults file for ansible-rabbitmq | ||
15 | config_rabbitmq_ha: false #defines if rabbitmq ha should be configured...define here or in group_vars/group | 34 | config_rabbitmq_ha: false #defines if rabbitmq ha should be configured...define here or in group_vars/group |
16 | enable_rabbitmq_clustering: false #defines if setting up a rabbitmq cluster...define here or in group_vars/group | 35 | enable_rabbitmq_clustering: false #defines if setting up a rabbitmq cluster...define here or in group_vars/group |
17 | erlang_cookie: LSKNKBELKPSTDBBCHETL #define erlang cookie for cluster...define here or in group_vars/group | 36 | erlang_cookie: 'LSKNKBELKPSTDBBCHETL' #define erlang cookie for cluster...define here or in group_vars/group |
18 | erlang_cookie_file: /var/lib/rabbitmq/.erlang.cookie | 37 | erlang_cookie_file: '/var/lib/rabbitmq/.erlang.cookie' |
19 | rabbitmq_config: | 38 | rabbitmq_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' |
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' | ||
26 | rabbitmq_master: [] #defines the inventory host that should be considered master...define here or in group_vars/group | 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 | ||
27 | ```` | 60 | ```` |
28 | 61 | ||
29 | example... | 62 | example... |
@@ -38,16 +71,38 @@ rabbitmq_master: ans-test-1 | |||
38 | Dependencies | 71 | Dependencies |
39 | ------------ | 72 | ------------ |
40 | 73 | ||
41 | A 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. | 74 | None |
42 | 75 | ||
43 | Example Playbook | 76 | Example Playbook |
44 | ---------------- | 77 | ---------------- |
45 | 78 | ||
46 | Including 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 | ||
52 | License | 107 | License |
53 | ------- | 108 | ------- |