Commit 45341254 by Carson Gee

Modify HAProxy defaults to match with vagrant cluster

- Also adds MariaDB and elasticsearch to default config
- Remove comments from vagrant-cluster playbook
- Add back verbosity to cluster play
- Make the serial play serial
parent 4e6fa3a8
......@@ -49,11 +49,30 @@ haproxy_default_config: |
# desired applications
haproxy_applications:
- |
listen rabbitmq 127.0.0.1:5672
listen rabbitmq 127.0.0.1:35672
mode tcp
balance roundrobin
option tcplog
option tcpka
server rabbit01 172.23.128.10:5672 check inter 5000 rise 2 fall 3
server rabbit02 172.23.129.10:5672 backup check inter 5000 rise 2 fall 3
server rabbit03 172.23.130.10:5672 backup check inter 5000 rise 2 fall 3
server rabbit01 192.168.33.100:5672 check inter 5000 rise 2 fall 3
server rabbit02 192.168.33.110:5672 check inter 5000 rise 2 fall 3
server rabbit03 192.168.33.120:5672 check inter 5000 rise 2 fall 3
listen mariadb 127.0.0.1:13306
mode tcp
balance roundrobin
option tcplog
option tcpka
option mysql-check
server galera1 192.168.33.100:3306 check weight 1
server galera2 192.168.33.110:3306 check weight 1
server galera3 192.168.33.120:3306 check weight 1
listen elasticsearch 127.0.0.1:19200
mode tcp
balance roundrobin
option tcplog
option tcpka
server galera1 192.168.33.100:9200 check weight 1
server galera2 192.168.33.110:9200 check weight 1
server galera3 192.168.33.120:9200 check weight 1
......@@ -18,3 +18,6 @@
# my_role_var0: "foo"
# my_role_var1: "bar"
# }
dependencies:
- common
# this config needs haproxy-1.1.28 or haproxy-1.2.1
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
log /dev/log local0 info
log /dev/log local0 notice
#log loghost local0 info
maxconn 4096
#chroot /usr/share/haproxy
......
---
#
# edX Configuration
#
# github: https://github.com/edx/configuration
# wiki: https://github.com/edx/configuration/wiki
# code style: https://github.com/edx/configuration/wiki/Ansible-Coding-Conventions
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
#
#
# Handlers for role mariadb
#
# Overview:
#
#
- name: notify me
debug: msg="stub handler"
# - name: Configure group cluster
# hosts: all
# sudo: True
# gather_facts: True
# vars:
# mongo_cluster_members:
# - "cluster1"
# - "cluster2"
# - "cluster3"
# MONGO_CLUSTERED: yes
# MONGO_CLUSTER_KEY: 'password'
# mongo_create_users: no
# ELASTICSEARCH_CLUSTERED: yes
# MARIADB_CLUSTERED: yes
# MARIADB_CREATE_DBS: no
# vars_files:
# - "group_vars/all"
# roles:
# - user
# - mongo
# - oraclejdk
# - elasticsearch
# - mariadb
# - edx_ansible
- name: Configure group cluster
hosts: all
sudo: True
gather_facts: True
vars:
mongo_cluster_members:
- "cluster1"
- "cluster2"
- "cluster3"
MONGO_CLUSTERED: yes
MONGO_CLUSTER_KEY: 'password'
mongo_create_users: no
ELASTICSEARCH_CLUSTERED: yes
MARIADB_CLUSTERED: yes
MARIADB_CREATE_DBS: no
vars_files:
- "group_vars/all"
roles:
- user
- mongo
- oraclejdk
- elasticsearch
- mariadb
- edx_ansible
# # Rabbit needs to be built serially
# - name: Configure group cluster serial roles
# hosts: all
# sudo: True
# gather_facts: True
# forks: 1
# vars:
# rabbitmq_clustered_hosts:
# - "rabbit@cluster1"
# - "rabbit@cluster2"
# - "rabbit@cluster3"
# rabbitmq_ip: ""
# vars_files:
# - "group_vars/all"
# roles:
# - rabbitmq
# Rabbit needs to be built serially
- name: Configure group cluster serial roles
hosts: all
sudo: True
serial: 1
gather_facts: True
vars:
rabbitmq_clustered_hosts:
- "rabbit@cluster1"
- "rabbit@cluster2"
- "rabbit@cluster3"
rabbitmq_ip: ""
vars_files:
- "group_vars/all"
roles:
- rabbitmq
# Mongo user doesn't handle slave's gracefully when
# creating users and there are race conditions
......@@ -64,4 +64,4 @@
- "roles/analytics-api/defaults/main.yml"
roles:
- mongo
# - mariadb
- mariadb
......@@ -75,7 +75,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
cluster3_config.vm.provision :ansible do |ansible|
# point Vagrant at the location of your playbook you want to run
ansible.playbook = "../../../playbooks/vagrant-cluster.yml"
#ansible.verbose = "vvv"
ansible.verbose = "vvv"
ansible.inventory_path = "inventory.ini"
ansible.limit = 'all'
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment