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: | ...@@ -49,11 +49,30 @@ haproxy_default_config: |
# desired applications # desired applications
haproxy_applications: haproxy_applications:
- | - |
listen rabbitmq 127.0.0.1:5672 listen rabbitmq 127.0.0.1:35672
mode tcp mode tcp
balance roundrobin balance roundrobin
option tcplog option tcplog
option tcpka option tcpka
server rabbit01 172.23.128.10:5672 check inter 5000 rise 2 fall 3 server rabbit01 192.168.33.100:5672 check inter 5000 rise 2 fall 3
server rabbit02 172.23.129.10:5672 backup check inter 5000 rise 2 fall 3 server rabbit02 192.168.33.110:5672 check inter 5000 rise 2 fall 3
server rabbit03 172.23.130.10:5672 backup 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 @@ ...@@ -18,3 +18,6 @@
# my_role_var0: "foo" # my_role_var0: "foo"
# my_role_var1: "bar" # my_role_var1: "bar"
# } # }
dependencies:
- common
# this config needs haproxy-1.1.28 or haproxy-1.2.1 # this config needs haproxy-1.1.28 or haproxy-1.2.1
global global
log 127.0.0.1 local0 log /dev/log local0 info
log 127.0.0.1 local1 notice log /dev/log local0 notice
#log loghost local0 info #log loghost local0 info
maxconn 4096 maxconn 4096
#chroot /usr/share/haproxy #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 - name: Configure group cluster
# hosts: all hosts: all
# sudo: True sudo: True
# gather_facts: True gather_facts: True
# vars: vars:
# mongo_cluster_members: mongo_cluster_members:
# - "cluster1" - "cluster1"
# - "cluster2" - "cluster2"
# - "cluster3" - "cluster3"
# MONGO_CLUSTERED: yes MONGO_CLUSTERED: yes
# MONGO_CLUSTER_KEY: 'password' MONGO_CLUSTER_KEY: 'password'
# mongo_create_users: no mongo_create_users: no
# ELASTICSEARCH_CLUSTERED: yes ELASTICSEARCH_CLUSTERED: yes
# MARIADB_CLUSTERED: yes MARIADB_CLUSTERED: yes
# MARIADB_CREATE_DBS: no MARIADB_CREATE_DBS: no
# vars_files: vars_files:
# - "group_vars/all" - "group_vars/all"
# roles: roles:
# - user - user
# - mongo - mongo
# - oraclejdk - oraclejdk
# - elasticsearch - elasticsearch
# - mariadb - mariadb
# - edx_ansible - edx_ansible
# # Rabbit needs to be built serially # Rabbit needs to be built serially
# - name: Configure group cluster serial roles - name: Configure group cluster serial roles
# hosts: all hosts: all
# sudo: True sudo: True
# gather_facts: True serial: 1
# forks: 1 gather_facts: True
# vars: vars:
# rabbitmq_clustered_hosts: rabbitmq_clustered_hosts:
# - "rabbit@cluster1" - "rabbit@cluster1"
# - "rabbit@cluster2" - "rabbit@cluster2"
# - "rabbit@cluster3" - "rabbit@cluster3"
# rabbitmq_ip: "" rabbitmq_ip: ""
# vars_files: vars_files:
# - "group_vars/all" - "group_vars/all"
# roles: roles:
# - rabbitmq - rabbitmq
# Mongo user doesn't handle slave's gracefully when # Mongo user doesn't handle slave's gracefully when
# creating users and there are race conditions # creating users and there are race conditions
...@@ -64,4 +64,4 @@ ...@@ -64,4 +64,4 @@
- "roles/analytics-api/defaults/main.yml" - "roles/analytics-api/defaults/main.yml"
roles: roles:
- mongo - mongo
# - mariadb - mariadb
...@@ -75,7 +75,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| ...@@ -75,7 +75,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
cluster3_config.vm.provision :ansible do |ansible| cluster3_config.vm.provision :ansible do |ansible|
# point Vagrant at the location of your playbook you want to run # point Vagrant at the location of your playbook you want to run
ansible.playbook = "../../../playbooks/vagrant-cluster.yml" ansible.playbook = "../../../playbooks/vagrant-cluster.yml"
#ansible.verbose = "vvv" ansible.verbose = "vvv"
ansible.inventory_path = "inventory.ini" ansible.inventory_path = "inventory.ini"
ansible.limit = 'all' ansible.limit = 'all'
end 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