blob: 276d495570b01d04664b31767f4df673157628f8 [file] [log] [blame]
{% from 'virtual-mcp10-ovs/map.jinja' import HOSTNAME_CFG01 with context %}
################### Install OpenStack infra ##########################
# salt.enforceState(saltMaster, 'I@glusterfs:server', 'glusterfs.server.service', true)
- description: Install and run GlusterFS
do: enforceState
target: I@glusterfs:server
state: glusterfs.server.service
# // Install keepaliveds
# //runSaltProcessStep(master, 'I@keepalived:cluster', 'state.sls', ['keepalived'], 1)
# salt.enforceState(saltMaster, 'I@keepalived:cluster and *01*', 'keepalived', true)
# salt.enforceState(saltMaster, 'I@keepalived:cluster', 'keepalived', true)
- description: Install keepalived
do: enforceState
target: I@keepalived:cluster and *01*
state: keepalived
- description: Re run installation of keepalived
do: enforceState
target: I@keepalived:cluster
state: keepalived
# // Check the keepalived VIPs
# salt.runSaltProcessStep(saltMaster, 'I@keepalived:cluster', 'cmd.run', ['ip a | grep 172.16.10.2'])
# salt.enforceState(saltMaster, 'I@glusterfs:server and *01*', 'glusterfs.server.setup', true)
# salt.runSaltProcessStep(saltMaster, 'I@glusterfs:server', 'cmd.run', ['gluster peer status'], null, true)
# salt.runSaltProcessStep(saltMaster, 'I@glusterfs:server', 'cmd.run', ['gluster volume status'], null, true)
- description: Show VIPs
do: runState
target: I@keepalived:cluster
state: cmd.run
args: ['ip a | grep 172.16.10.2']
- description: Re run Gluster sertver setup
do: enforceState
target: I@glusterfs:server and *01*
state: glusterfs.server.setup
- description: Show Gluster peer status
do: runState
target: I@glusterfs:server
state: cmd.run
args: ['gluster peer status']
- description: Show Gluster volumes status
do: runState
target: I@glusterfs:server
state: cmd.run
args: ['gluster volume status']
# // Install rabbitmq
# withEnv(['ASK_ON_ERROR=false']){
# retry(2) {
# salt.enforceState(saltMaster, 'I@rabbitmq:server', 'rabbitmq', true)
# }
# }
# // Check the rabbitmq status
# salt.runSaltProcessStep(saltMaster, 'I@rabbitmq:server', 'cmd.run', ['rabbitmqctl cluster_status'])
- description: Install rabbitmq
do: enforceState
target: I@rabbitmq:server
state: rabbitmq
retry: {count: 2, delay: 5}
- description: Show rabbitmq status
do: runState
target: I@glusterfs:server
state: cmd.run
args: ['rabbitmqctl cluster_status']
# // Install galera
# withEnv(['ASK_ON_ERROR=false']){
# retry(2) {
# salt.enforceState(saltMaster, 'I@galera:master', 'galera', true)
# }
# }
# salt.enforceState(saltMaster, 'I@galera:slave', 'galera', true)
# // Check galera status
# salt.runSaltProcessStep(saltMaster, 'I@galera:master', 'mysql.status')
# salt.runSaltProcessStep(saltMaster, 'I@galera:slave', 'mysql.status')
# // // Setup mysql client
# // salt.enforceState(saltMaster, 'I@mysql:client', 'mysql.client', true)
- description: Install Galera (master)
do: enforceState
target: I@galera:master
state: galera
retry: {count: 2, delay: 5}
- description: Install Galera (slaves)
do: enforceState
target: I@galera:slave
state: galera
- description: Show master galera status
do: runState
target: I@galera:master
state: mysql.status
- description: Show master galera status
do: runState
target: I@galera:master
state: mysql.status
# - description: Install mysql client
# do: enforceState
# target: I@mysql:client
# state: mysql.client
# // Install haproxy
# salt.enforceState(saltMaster, 'I@haproxy:proxy', 'haproxy', true)
# salt.runSaltProcessStep(saltMaster, 'I@haproxy:proxy', 'service.status', ['haproxy'])
# salt.runSaltProcessStep(saltMaster, 'I@haproxy:proxy', 'service.restart', ['rsyslog'])
- description: Install HAProxy
do: enforceState
target: I@haproxy:proxy
state: haproxy
- description: Show HAProxy service status
do: runState
target: I@haproxy:proxy
state: service.status
args: ['haproxy']
- description: Restart HAProxy service
do: runState
target: I@haproxy:proxy
state: service.restart
args: ['haproxy']
# // Install memcached
# salt.enforceState(saltMaster, 'I@memcached:server', 'memcached', true)
- description: Install Memcached
do: enforceState
target: I@memcached:server
state: memcached