4 Installs rabbitmq https://www.rabbitmq.com/ (Configurable...HA and Clustering ready)
9 Ensure hostnames are resolvable prior to clustering...either update /etc/hosts or ensure DNS is working.
14 Spin up a 3 node HA Cluster for testing...
15 Install Ansible role on your host:
17 sudo ansible-galaxy install -r requirements.yml -f
19 Now spin up your environment...
23 When you are done testing, tear it all down...
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'
39 - queue_name: logstash
41 exchange_name: 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
54 password: rabbitmqadmin
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
63 group_vars/rabbitmq-cluster-nodes
66 rabbitmq_enable_clustering: true
67 rabbitmq_config_ha: false
68 rabbitmq_master: ans-test-1
84 - pri_domain_name: 'test.vagrant.local'
87 - name: updating /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 }}"
93 with_items: groups['all']
98 - rabbitmq_config_ha: true
99 - rabbitmq_enable_clustering: true
100 - pri_domain_name: 'test.vagrant.local'
101 - rabbitmq_master: 'node0'
103 - role: ansible-rabbitmq
117 - http://everythingshouldbevirtual.com
118 - mrlesmithjr [at] gmail.com