blob: ca5636154a5a3fb3f3654a0be343969527459c9d [file] [log] [blame]
Jeepyb Userdd14e0b2017-02-28 15:19:32 +00001#!/bin/bash -x
2exec > >(tee -i /tmp/"$(basename "$0" .sh)"_"$(date '+%Y-%m-%d_%H-%M-%S')".log) 2>&1
3
4# Install keepaliveds
5salt -C 'I@keepalived:cluster' state.sls keepalived -b 1
6# Check the VIPs
7salt -C 'I@keepalived:cluster' cmd.run "ip a | grep 172.16.10.2"
8
9# Install gluster
10salt -C 'I@glusterfs:server' state.sls glusterfs.server.service
11salt -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1
12# Check the gluster status
13salt -C 'I@glusterfs:server' cmd.run "gluster peer status; gluster volume status" -b 1
14
15# Install rabbitmq
16salt -C 'I@rabbitmq:server' state.sls rabbitmq
17# Check the rabbitmq status
18salt -C 'I@rabbitmq:server' cmd.run "rabbitmqctl cluster_status"
19
20# Install galera
21salt -C 'I@galera:master' state.sls galera
22salt -C 'I@galera:slave' state.sls galera
23# Check galera status
24salt -C 'I@galera:master' mysql.status | grep -A1 wsrep_cluster_size
25salt -C 'I@galera:slave' mysql.status | grep -A1 wsrep_cluster_size
26
27# Install haproxy
28salt -C 'I@haproxy:proxy' state.sls haproxy
29salt -C 'I@haproxy:proxy' service.status haproxy
30salt -I 'haproxy:proxy' service.restart rsyslog
31
32# Install memcached
33salt -C 'I@memcached:server' state.sls memcached