blob: 276d495570b01d04664b31767f4df673157628f8 [file] [log] [blame]
Dennis Dmitrievab83ea42017-05-12 16:52:45 +03001{% from 'virtual-mcp10-ovs/map.jinja' import HOSTNAME_CFG01 with context %}
Tatyana Leontovich78b83482017-04-11 18:57:11 +03002
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +03003################### Install OpenStack infra ##########################
Tatyana Leontovich78b83482017-04-11 18:57:11 +03004
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +03005# salt.enforceState(saltMaster, 'I@glusterfs:server', 'glusterfs.server.service', true)
6- description: Install and run GlusterFS
7 do: enforceState
8 target: I@glusterfs:server
9 state: glusterfs.server.service
10
11# // Install keepaliveds
12# //runSaltProcessStep(master, 'I@keepalived:cluster', 'state.sls', ['keepalived'], 1)
13# salt.enforceState(saltMaster, 'I@keepalived:cluster and *01*', 'keepalived', true)
14# salt.enforceState(saltMaster, 'I@keepalived:cluster', 'keepalived', true)
Tatyana Leontovich78b83482017-04-11 18:57:11 +030015- description: Install keepalived
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030016 do: enforceState
17 target: I@keepalived:cluster and *01*
18 state: keepalived
Tatyana Leontovich78b83482017-04-11 18:57:11 +030019
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030020- description: Re run installation of keepalived
21 do: enforceState
22 target: I@keepalived:cluster
23 state: keepalived
24
25# // Check the keepalived VIPs
26# salt.runSaltProcessStep(saltMaster, 'I@keepalived:cluster', 'cmd.run', ['ip a | grep 172.16.10.2'])
27# salt.enforceState(saltMaster, 'I@glusterfs:server and *01*', 'glusterfs.server.setup', true)
28# salt.runSaltProcessStep(saltMaster, 'I@glusterfs:server', 'cmd.run', ['gluster peer status'], null, true)
29# salt.runSaltProcessStep(saltMaster, 'I@glusterfs:server', 'cmd.run', ['gluster volume status'], null, true)
30
31- description: Show VIPs
32 do: runState
33 target: I@keepalived:cluster
34 state: cmd.run
35 args: ['ip a | grep 172.16.10.2']
36
37- description: Re run Gluster sertver setup
38 do: enforceState
39 target: I@glusterfs:server and *01*
40 state: glusterfs.server.setup
41
42- description: Show Gluster peer status
43 do: runState
44 target: I@glusterfs:server
45 state: cmd.run
46 args: ['gluster peer status']
47
48- description: Show Gluster volumes status
49 do: runState
50 target: I@glusterfs:server
51 state: cmd.run
52 args: ['gluster volume status']
Tatyana Leontovich78b83482017-04-11 18:57:11 +030053
54
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030055 # // Install rabbitmq
56 # withEnv(['ASK_ON_ERROR=false']){
57 # retry(2) {
58 # salt.enforceState(saltMaster, 'I@rabbitmq:server', 'rabbitmq', true)
59 # }
60 # }
61 # // Check the rabbitmq status
62 # salt.runSaltProcessStep(saltMaster, 'I@rabbitmq:server', 'cmd.run', ['rabbitmqctl cluster_status'])
Tatyana Leontovich78b83482017-04-11 18:57:11 +030063
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030064- description: Install rabbitmq
65 do: enforceState
66 target: I@rabbitmq:server
67 state: rabbitmq
68 retry: {count: 2, delay: 5}
Tatyana Leontovich78b83482017-04-11 18:57:11 +030069
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030070- description: Show rabbitmq status
71 do: runState
72 target: I@glusterfs:server
73 state: cmd.run
74 args: ['rabbitmqctl cluster_status']
Tatyana Leontovich78b83482017-04-11 18:57:11 +030075
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030076 # // Install galera
77 # withEnv(['ASK_ON_ERROR=false']){
78 # retry(2) {
79 # salt.enforceState(saltMaster, 'I@galera:master', 'galera', true)
80 # }
81 # }
82 # salt.enforceState(saltMaster, 'I@galera:slave', 'galera', true)
Tatyana Leontovich78b83482017-04-11 18:57:11 +030083
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030084 # // Check galera status
85 # salt.runSaltProcessStep(saltMaster, 'I@galera:master', 'mysql.status')
86 # salt.runSaltProcessStep(saltMaster, 'I@galera:slave', 'mysql.status')
Tatyana Leontovich78b83482017-04-11 18:57:11 +030087
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030088 # // // Setup mysql client
89 # // salt.enforceState(saltMaster, 'I@mysql:client', 'mysql.client', true)
Tatyana Leontovich78b83482017-04-11 18:57:11 +030090
91
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030092- description: Install Galera (master)
93 do: enforceState
94 target: I@galera:master
95 state: galera
96 retry: {count: 2, delay: 5}
Tatyana Leontovich78b83482017-04-11 18:57:11 +030097
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +030098- description: Install Galera (slaves)
99 do: enforceState
100 target: I@galera:slave
101 state: galera
Tatyana Leontovich78b83482017-04-11 18:57:11 +0300102
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +0300103- description: Show master galera status
104 do: runState
105 target: I@galera:master
106 state: mysql.status
Tatyana Leontovich78b83482017-04-11 18:57:11 +0300107
Dmitry Tyzhnenko2b730a02017-04-07 19:31:32 +0300108- description: Show master galera status
109 do: runState
110 target: I@galera:master
111 state: mysql.status
112
113# - description: Install mysql client
114# do: enforceState
115# target: I@mysql:client
116# state: mysql.client
117
118
119# // Install haproxy
120# salt.enforceState(saltMaster, 'I@haproxy:proxy', 'haproxy', true)
121# salt.runSaltProcessStep(saltMaster, 'I@haproxy:proxy', 'service.status', ['haproxy'])
122# salt.runSaltProcessStep(saltMaster, 'I@haproxy:proxy', 'service.restart', ['rsyslog'])
123
124
125- description: Install HAProxy
126 do: enforceState
127 target: I@haproxy:proxy
128 state: haproxy
129
130- description: Show HAProxy service status
131 do: runState
132 target: I@haproxy:proxy
133 state: service.status
134 args: ['haproxy']
135
136- description: Restart HAProxy service
137 do: runState
138 target: I@haproxy:proxy
139 state: service.restart
140 args: ['haproxy']
141
142# // Install memcached
143# salt.enforceState(saltMaster, 'I@memcached:server', 'memcached', true)
144- description: Install Memcached
145 do: enforceState
146 target: I@memcached:server
147 state: memcached