blob: 1362b8e5533c4a4a3e41642a333fe9e853ec4e1d [file] [log] [blame]
{% from 'virtual-mcp11-k8s-calico/underlay.yaml' import HOSTNAME_CFG01 with context %}
# Install support services
- description: Create and distribute SSL certificates for services using salt state
cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' state.sls salt
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 10}
skip_fail: true
- description: Install keepalived
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@keepalived:cluster' state.sls keepalived -b 1
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 10}
skip_fail: true
- description: Install haproxy
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@haproxy:proxy' state.sls haproxy
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
- description: Install haproxy.service
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@haproxy:proxy' service.status haproxy
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
- description: Install docker
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@docker:host' state.sls docker.host
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
- description: Check docker
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@docker:host' cmd.run 'docker ps'
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
# Isntall SL core services
#- description: Install glusterfs
# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
# -C 'I@glusterfs:server' state.sls glusterfs.server.service
# node_name: {{ HOSTNAME_CFG01 }}
# retry: {count: 1, delay: 5}
# skip_fail: false
#- description: Setup glusterfs on primary controller
# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
# -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1
# node_name: {{ HOSTNAME_CFG01 }}
# retry: {count: 2, delay: 5}
# skip_fail: false
#- description: Check the gluster status
# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
# -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1
# node_name: {{ HOSTNAME_CFG01 }}
# retry: {count: 1, delay: 5}
# skip_fail: false
#- description: Install gluserfs client
# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
# -C 'I@glusterfs:client' state.sls glusterfs.client
# node_name: {{ HOSTNAME_CFG01 }}
# retry: {count: 1, delay: 5}
# skip_fail: false
- description: Install Galera on first server
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@galera:master' state.sls galera
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
- description: Install Galera on other servers
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@galera:slave' state.sls galera -b 1
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
- description: Check mysql status
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size"
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false
- description: Install nginx
cmd: salt --hard-crash --state-output=mixed --state-verbose=False
-C 'I@nginx:server' state.sls nginx
node_name: {{ HOSTNAME_CFG01 }}
retry: {count: 1, delay: 5}
skip_fail: false