]> git.immae.eu Git - github/fretlink/ansible-rabbitmq.git/blame - Vagrant/roles/ansible-rabbitmq/README.md
Allow debian install from bintray with erlang from bintray
[github/fretlink/ansible-rabbitmq.git] / Vagrant / roles / ansible-rabbitmq / README.md
CommitLineData
109c6b75
LSJ
1Role Name
2=========
3
4Installs rabbitmq https://www.rabbitmq.com/ (Configurable...HA and Clustering ready)
5
3a55d2ab
LSJ
6Build Status
7------------
8
9[![Build Status](https://travis-ci.org/mrlesmithjr/ansible-rabbitmq.svg?branch=master)](https://travis-ci.org/mrlesmithjr/ansible-rabbitmq)
10
109c6b75
LSJ
11Requirements
12------------
13
14Ensure hostnames are resolvable prior to clustering...either update /etc/hosts or ensure DNS is working.
15
16Vagrant
17-------
18
19Spin up a 3 node HA Cluster for testing...
20Install Ansible role on your host:
21````
22sudo ansible-galaxy install -r requirements.yml -f
23````
24Now spin up your environment...
25````
26vagrant up
27````
28When you are done testing, tear it all down...
29````
30./cleanup.sh
31````
32
33Role Variables
34--------------
35
36````
37---
38# defaults file for ansible-rabbitmq
39rabbitmq_config_ha: false #defines if rabbitmq ha should be configured...define here or in group_vars/group
40rabbitmq_enable_clustering: false #defines if setting up a rabbitmq cluster...define here or in group_vars/group
41rabbitmq_erlang_cookie: 'LSKNKBELKPSTDBBCHETL' #define erlang cookie for cluster...define here or in group_vars/group
42rabbitmq_erlang_cookie_file: '/var/lib/rabbitmq/.erlang.cookie'
43rabbitmq_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'
50rabbitmq_debian_repo: 'deb http://www.rabbitmq.com/debian/ testing main'
51rabbitmq_debian_repo_key: 'http://www.rabbitmq.com/rabbitmq-signing-key-public.asc'
52rabbitmq_master: [] #defines the inventory host that should be considered master...define here or in group_vars/group
53rabbitmq_redhat_repo_key: 'https://www.rabbitmq.com/rabbitmq-signing-key-public.asc'
54rabbitmq_redhat_package: 'rabbitmq-server-{{ rabbitmq_redhat_version }}-1.noarch.rpm'
55rabbitmq_redhat_url: 'http://www.rabbitmq.com/releases/rabbitmq-server/v{{ rabbitmq_redhat_version }}'
56rabbitmq_redhat_version: '3.6.1'
57rabbitmq_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
67example...
68group_vars/rabbitmq-cluster-nodes
69````
70---
71rabbitmq_enable_clustering: true
72rabbitmq_config_ha: false
73rabbitmq_master: ans-test-1
74````
75
76Dependencies
77------------
78
79None
80
81Example Playbook
82----------------
83
84````
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
3a55d2ab 98 with_items: "{{ groups['all'] }}"
109c6b75
LSJ
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
112License
113-------
114
115BSD
116
117Author Information
118------------------
119
120Larry Smith Jr.
121- @mrlesmithjr
122- http://everythingshouldbevirtual.com
123- mrlesmithjr [at] gmail.com