ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 1 | {# Collection of common macroses shared across openstack services #} |
| 2 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 3 | {%- macro MACRO_INSTALL_KEYSTONE(USE_ORCHESTRATE=true) %} |
| 4 | {%- if USE_ORCHESTRATE %} |
| 5 | - description: | |
Oleksii Butenko | e0fc5f2 | 2018-09-25 14:29:42 +0300 | [diff] [blame] | 6 | Execute salt orchestration state to configure all needed |
ibumarskov | 330bc12 | 2018-08-23 13:02:04 +0400 | [diff] [blame] | 7 | prerequisites like creating SSH public key ant etc. |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 8 | Workaround for PROD-22488, use for PROD-22535. |
ibumarskov | 330bc12 | 2018-08-23 13:02:04 +0400 | [diff] [blame] | 9 | cmd: salt-run state.orchestrate keystone.orchestrate.deploy |
| 10 | node_name: {{ HOSTNAME_CFG01 }} |
| 11 | retry: {count: 1, delay: 5} |
| 12 | skip_fail: false |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 13 | {%- endif %} |
ibumarskov | 330bc12 | 2018-08-23 13:02:04 +0400 | [diff] [blame] | 14 | |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 15 | - description: Install keystone service on primary node |
| 16 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 17 | -C 'I@keystone:server and *01*' state.sls keystone.server |
| 18 | node_name: {{ HOSTNAME_CFG01 }} |
| 19 | retry: {count: 2, delay: 15} |
| 20 | skip_fail: false |
| 21 | |
| 22 | - description: Install keystone service on other nodes |
| 23 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 24 | -C 'I@keystone:server' state.sls keystone.server |
| 25 | node_name: {{ HOSTNAME_CFG01 }} |
| 26 | retry: {count: 2, delay: 15} |
| 27 | skip_fail: false |
| 28 | |
| 29 | - description: Restart apache due to PROD-10477 |
| 30 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' |
ibumarskov | 1b85e89 | 2018-08-30 11:54:47 +0400 | [diff] [blame] | 31 | cmd.run "service apache2 restart" |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 32 | node_name: {{ HOSTNAME_CFG01 }} |
| 33 | retry: {count: 1, delay: 15} |
| 34 | skip_fail: false |
| 35 | |
| 36 | - description: Check apache status to PROD-10477 |
| 37 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' |
ibumarskov | 1b85e89 | 2018-08-30 11:54:47 +0400 | [diff] [blame] | 38 | cmd.run "service apache2 status" |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 39 | node_name: {{ HOSTNAME_CFG01 }} |
| 40 | retry: {count: 1, delay: 15} |
| 41 | skip_fail: false |
| 42 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 43 | - description: Mount glusterfs.client volumes (resuires created 'keystone' system user) |
| 44 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 45 | -C 'I@keystone:server' state.sls glusterfs.client -b 1 |
| 46 | node_name: {{ HOSTNAME_CFG01 }} |
| 47 | retry: {count: 1, delay: 5} |
| 48 | skip_fail: false |
| 49 | |
| 50 | - description: Update fernet keys for keystone server on the mounted glusterfs volume |
| 51 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 52 | -C 'I@keystone:server' state.sls keystone.server -b 1 |
| 53 | node_name: {{ HOSTNAME_CFG01 }} |
| 54 | retry: {count: 1, delay: 5} |
| 55 | skip_fail: false |
| 56 | |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 57 | - description: Populate keystone services/tenants/admins |
| 58 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 59 | -C 'I@keystone:client' state.sls keystone.client |
| 60 | node_name: {{ HOSTNAME_CFG01 }} |
| 61 | retry: {count: 2, delay: 5} |
| 62 | skip_fail: false |
| 63 | |
| 64 | - description: Check keystone service-list |
| 65 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Oleksii Butenko | 8b49a76 | 2018-09-18 11:46:35 +0300 | [diff] [blame] | 66 | -C "I@keystone:server" cmd.run ". /root/keystonercv3; |
| 67 | openstack service list" |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 68 | node_name: {{ HOSTNAME_CFG01 }} |
| 69 | retry: {count: 1, delay: 5} |
| 70 | skip_fail: false |
| 71 | {%- endmacro %} |
| 72 | |
| 73 | {%- macro MACRO_INSTALL_GLANCE() %} |
| 74 | - description: Install glance service on primary node |
| 75 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 76 | -C 'I@glance:server and *01*' state.sls glance.server |
| 77 | node_name: {{ HOSTNAME_CFG01 }} |
| 78 | retry: {count: 1, delay: 5} |
| 79 | skip_fail: false |
| 80 | |
| 81 | - description: Install glance service on other nodes |
| 82 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 83 | -C 'I@glance:server' state.sls glance.server |
| 84 | node_name: {{ HOSTNAME_CFG01 }} |
| 85 | retry: {count: 1, delay: 5} |
| 86 | skip_fail: false |
| 87 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 88 | - description: Mount glusterfs.client volumes (resuires created 'glusterfs' system user) |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 89 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 90 | -C 'I@glance:server' state.sls glusterfs.client -b 1 |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 91 | node_name: {{ HOSTNAME_CFG01 }} |
| 92 | retry: {count: 1, delay: 5} |
| 93 | skip_fail: false |
| 94 | |
| 95 | - description: Check glance image-list |
| 96 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Oleksii Butenko | 8b49a76 | 2018-09-18 11:46:35 +0300 | [diff] [blame] | 97 | -C "I@keystone:server" cmd.run ". /root/keystonercv3; |
| 98 | openstack image list" |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 99 | node_name: {{ HOSTNAME_CFG01 }} |
| 100 | retry: {count: 1, delay: 5} |
| 101 | skip_fail: false |
| 102 | {%- endmacro %} |
| 103 | |
| 104 | {%- macro MACRO_INSTALL_NOVA() %} |
| 105 | - description: Install nova service on primary node |
| 106 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 107 | -C "I@nova:controller and *01*" state.sls nova.controller |
| 108 | node_name: {{ HOSTNAME_CFG01 }} |
| 109 | retry: {count: 1, delay: 5} |
| 110 | skip_fail: false |
| 111 | |
| 112 | - description: Install nova service on other nodes |
| 113 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 114 | -C "I@nova:controller" state.sls nova.controller |
| 115 | node_name: {{ HOSTNAME_CFG01 }} |
| 116 | retry: {count: 1, delay: 5} |
| 117 | skip_fail: false |
| 118 | |
| 119 | - description: Check nova service-list |
| 120 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Oleksii Butenko | 8b49a76 | 2018-09-18 11:46:35 +0300 | [diff] [blame] | 121 | -C "I@keystone:server" cmd.run ". /root/keystonercv3; |
| 122 | openstack compute service list" |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 123 | node_name: {{ HOSTNAME_CFG01 }} |
| 124 | retry: {count: 1, delay: 5} |
| 125 | skip_fail: false |
| 126 | |
| 127 | - description: Check nova list |
| 128 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Oleksii Butenko | 8b49a76 | 2018-09-18 11:46:35 +0300 | [diff] [blame] | 129 | -C "I@keystone:server" cmd.run ". /root/keystonercv3; |
| 130 | openstack server list" |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 131 | node_name: {{ HOSTNAME_CFG01 }} |
| 132 | retry: {count: 1, delay: 5} |
| 133 | skip_fail: false |
| 134 | {%- endmacro %} |
| 135 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 136 | {%- macro MACRO_INSTALL_CINDER(INSTALL_VOLUME=false) %} |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 137 | - description: Install cinder on primary node |
| 138 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 139 | -C "I@cinder:controller and *01*" state.sls cinder |
| 140 | node_name: {{ HOSTNAME_CFG01 }} |
| 141 | retry: {count: 1, delay: 5} |
| 142 | skip_fail: false |
| 143 | |
| 144 | - description: Install cinder on other nodes |
| 145 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 146 | -C "I@cinder:controller" state.sls cinder |
| 147 | node_name: {{ HOSTNAME_CFG01 }} |
| 148 | retry: {count: 1, delay: 5} |
| 149 | skip_fail: false |
| 150 | |
| 151 | - description: Check cinder list |
| 152 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Oleksii Butenko | 8b49a76 | 2018-09-18 11:46:35 +0300 | [diff] [blame] | 153 | -C "I@keystone:server" cmd.run ". /root/keystonercv3; |
| 154 | openstack volume list" |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 155 | node_name: {{ HOSTNAME_CFG01 }} |
| 156 | retry: {count: 1, delay: 5} |
| 157 | skip_fail: false |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 158 | |
| 159 | {%- if INSTALL_VOLUME %} |
| 160 | - description: Install cinder volume |
| 161 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 162 | -C 'I@cinder:volume' state.sls cinder |
| 163 | node_name: {{ HOSTNAME_CFG01 }} |
| 164 | retry: {count: 1, delay: 5} |
| 165 | skip_fail: false |
| 166 | {%- endif %} |
| 167 | |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 168 | {%- endmacro %} |
| 169 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 170 | {%- macro MACRO_INSTALL_NEUTRON(INSTALL_GATEWAY=true) %} |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 171 | - description: Install neutron service on primary node |
| 172 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 173 | -C "I@neutron:server and *01*" state.sls neutron.server |
| 174 | node_name: {{ HOSTNAME_CFG01 }} |
| 175 | retry: {count: 1, delay: 5} |
| 176 | skip_fail: false |
| 177 | |
| 178 | - description: Install neutron service on other nodes |
| 179 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 180 | -C "I@neutron:server" state.sls neutron.server |
| 181 | node_name: {{ HOSTNAME_CFG01 }} |
| 182 | retry: {count: 1, delay: 5} |
| 183 | skip_fail: false |
| 184 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 185 | {%- if INSTALL_GATEWAY %} |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 186 | - description: Install neutron on gtw node |
| 187 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 188 | -C 'I@neutron:gateway' state.sls neutron |
| 189 | node_name: {{ HOSTNAME_CFG01 }} |
| 190 | retry: {count: 1, delay: 5} |
| 191 | skip_fail: false |
| 192 | |
| 193 | - description: Check neutron agent-list |
| 194 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Oleksii Butenko | 16f8691 | 2018-09-20 11:47:00 +0300 | [diff] [blame] | 195 | -C 'I@keystone:server' cmd.run '. /root/keystonercv3; neutron agent-list' |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 196 | node_name: {{ HOSTNAME_CFG01 }} |
| 197 | retry: {count: 1, delay: 5} |
| 198 | skip_fail: false |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 199 | {%- endif %} |
| 200 | |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 201 | {%- endmacro %} |
| 202 | |
| 203 | {%- macro MACRO_INSTALL_HEAT() %} |
| 204 | - description: Install heat service on primary node |
| 205 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 206 | -C "I@heat:server and *01*" state.sls heat.server |
| 207 | node_name: {{ HOSTNAME_CFG01 }} |
| 208 | retry: {count: 1, delay: 5} |
| 209 | skip_fail: false |
| 210 | |
| 211 | - description: Install heat service on other nodes |
| 212 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 213 | -C "I@heat:server" state.sls heat.server |
| 214 | node_name: {{ HOSTNAME_CFG01 }} |
| 215 | retry: {count: 1, delay: 5} |
| 216 | skip_fail: false |
| 217 | |
| 218 | - description: Check heat service |
| 219 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Oleksii Butenko | 8b49a76 | 2018-09-18 11:46:35 +0300 | [diff] [blame] | 220 | -C 'I@keystone:server' cmd.run '. /root/keystonercv3; |
| 221 | openstack orchestration resource type list' |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 222 | node_name: {{ HOSTNAME_CFG01 }} |
| 223 | retry: {count: 5, delay: 10} |
| 224 | skip_fail: false |
| 225 | {%- endmacro %} |
| 226 | |
| 227 | {%- macro MACRO_INSTALL_HORIZON() %} |
| 228 | - description: Deploy horizon dashboard |
| 229 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 230 | -C 'I@horizon:server' state.sls horizon |
| 231 | node_name: {{ HOSTNAME_CFG01 }} |
| 232 | retry: {count: 1, delay: 5} |
| 233 | skip_fail: true |
| 234 | |
| 235 | - description: Deploy nginx proxy |
| 236 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 237 | -C 'I@nginx:server' state.sls nginx |
| 238 | node_name: {{ HOSTNAME_CFG01 }} |
| 239 | retry: {count: 1, delay: 5} |
| 240 | skip_fail: true |
| 241 | {%- endmacro %} |
| 242 | |
Oleksii Butenko | 81d8a7f | 2018-09-26 16:09:27 +0300 | [diff] [blame] | 243 | {%- macro MACRO_INSTALL_DESIGNATE(INSTALL_POWERDNS=false, INSTALL_BIND=false) %} |
Oleksii Butenko | e0fc5f2 | 2018-09-25 14:29:42 +0300 | [diff] [blame] | 244 | {%- if INSTALL_POWERDNS %} |
| 245 | - description: Install powerdns |
| 246 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 247 | -C 'I@powerdns:server' state.sls powerdns.server |
| 248 | node_name: {{ HOSTNAME_CFG01 }} |
| 249 | retry: {count: 1, delay: 5} |
| 250 | skip_fail: false |
| 251 | {%- endif %} |
| 252 | |
Oleksii Butenko | 81d8a7f | 2018-09-26 16:09:27 +0300 | [diff] [blame] | 253 | {%- if INSTALL_BIND %} |
| 254 | - description: Install bind |
| 255 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 256 | -C 'I@bind:server' state.sls bind |
| 257 | node_name: {{ HOSTNAME_CFG01 }} |
| 258 | retry: {count: 1, delay: 5} |
| 259 | skip_fail: false |
| 260 | {%- endif %} |
| 261 | |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 262 | - description: Install designate on primary node |
| 263 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 264 | -C "I@designate:server and *01*" state.sls designate.server |
| 265 | node_name: {{ HOSTNAME_CFG01 }} |
| 266 | retry: {count: 5, delay: 10} |
| 267 | skip_fail: false |
| 268 | |
| 269 | - description: Install designate on other nodes |
| 270 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 271 | -C "I@designate:server" state.sls designate |
| 272 | node_name: {{ HOSTNAME_CFG01 }} |
| 273 | retry: {count: 5, delay: 10} |
| 274 | skip_fail: false |
| 275 | {%- endmacro %} |
| 276 | |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 277 | {%- macro MACRO_INSTALL_BARBICAN() %} |
| 278 | # TO DO |
| 279 | {%- endmacro %} |
| 280 | |
| 281 | {%- macro MACRO_INSTALL_IRONIC() %} |
| 282 | # TO DO |
| 283 | {%- endmacro %} |
| 284 | |
| 285 | {%- macro MACRO_INSTALL_MANILA() %} |
Oleksii Butenko | f57d1ff | 2018-09-28 17:59:45 +0300 | [diff] [blame] | 286 | - description: Install manila-api on first node |
| 287 | cmd: | |
| 288 | salt -C 'I@manila:api and *01*' state.sls manila.api; |
| 289 | node_name: {{ HOSTNAME_CFG01 }} |
| 290 | retry: {count: 1, delay: 5} |
| 291 | skip_fail: false |
| 292 | |
| 293 | - description: Install manila-api on other nodes |
| 294 | cmd: | |
| 295 | salt -C 'I@manila:api and not *01*' state.sls manila.api; |
| 296 | node_name: {{ HOSTNAME_CFG01 }} |
| 297 | retry: {count: 1, delay: 5} |
| 298 | skip_fail: false |
| 299 | |
| 300 | - description: Install manila-scheduler |
| 301 | cmd: | |
| 302 | salt -C 'I@manila:scheduler' state.sls manila.scheduler; |
| 303 | node_name: {{ HOSTNAME_CFG01 }} |
| 304 | retry: {count: 1, delay: 5} |
| 305 | skip_fail: false |
| 306 | |
| 307 | - description: Install manila-share |
| 308 | cmd: | |
| 309 | salt -C 'I@manila:share' state.sls manila.share; |
| 310 | node_name: {{ HOSTNAME_CFG01 }} |
| 311 | retry: {count: 1, delay: 5} |
| 312 | skip_fail: false |
| 313 | |
Oleksii Butenko | f57d1ff | 2018-09-28 17:59:45 +0300 | [diff] [blame] | 314 | - description: Check manila-services |
| 315 | cmd: | |
| 316 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila service-list' |
| 317 | node_name: {{ HOSTNAME_CFG01 }} |
| 318 | retry: {count: 3, delay: 15} |
| 319 | skip_fail: false |
| 320 | |
| 321 | - description: Create manila type |
| 322 | cmd: | |
Oleksii Butenko | 4077242 | 2018-10-01 16:52:49 +0300 | [diff] [blame] | 323 | salt -C "I@manila:client" state.sls manila.client |
Oleksii Butenko | f57d1ff | 2018-09-28 17:59:45 +0300 | [diff] [blame] | 324 | node_name: {{ HOSTNAME_CFG01 }} |
| 325 | retry: {count: 1, delay: 5} |
| 326 | skip_fail: false |
| 327 | |
| 328 | - description: Create CIFS and NFS share and check it status |
| 329 | cmd: | |
| 330 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create CIFS 1 --share-type=default'; |
| 331 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create NFS 1 --share-type=default'; |
| 332 | sleep 5; |
| 333 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila list'; |
| 334 | node_name: {{ HOSTNAME_CFG01 }} |
| 335 | retry: {count: 1, delay: 5} |
| 336 | skip_fail: false |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 337 | {%- endmacro %} |
| 338 | |
| 339 | {%- macro MACRO_INSTALL_OCTAVIA_API() %} |
Tatyana Leontovich | 931892e | 2018-10-18 14:27:12 +0300 | [diff] [blame^] | 340 | - description: Install octavia api service on primary node |
| 341 | cmd: salt -C 'I@octavia:api:role:primary' state.sls octavia.api |
| 342 | node_name: {{ HOSTNAME_CFG01 }} |
| 343 | retry: {count: 1, delay: 5} |
| 344 | skip_fail: false |
| 345 | |
| 346 | - description: Install octavia api service |
| 347 | cmd: salt -C 'I@octavia:api' state.sls octavia.api |
| 348 | node_name: {{ HOSTNAME_CFG01 }} |
| 349 | retry: {count: 1, delay: 5} |
| 350 | skip_fail: false |
| 351 | |
| 352 | {%- endmacro %} |
| 353 | |
| 354 | {%- macro MACRO_INSTALL_OCTAVIA_MANAGER() %} |
| 355 | - description: Update mine |
| 356 | cmd: salt -C 'I@neutron:client' mine.update && sleep 60 |
| 357 | node_name: {{ HOSTNAME_CFG01 }} |
| 358 | retry: {count: 1, delay: 5} |
| 359 | skip_fail: false |
| 360 | |
| 361 | - description: Install octavia manager |
| 362 | cmd: salt -C 'I@octavia:manager' state.sls octavia.manager |
| 363 | node_name: {{ HOSTNAME_CFG01 }} |
| 364 | retry: {count: 1, delay: 5} |
| 365 | skip_fail: false |
| 366 | |
| 367 | - description: Execute octavia ca |
| 368 | cmd: salt -C 'I@octavia:manager' state.sls salt.minion.ca |
| 369 | node_name: {{ HOSTNAME_CFG01 }} |
| 370 | retry: {count: 1, delay: 5} |
| 371 | skip_fail: false |
| 372 | |
| 373 | - description: Execute octavia cert |
| 374 | cmd: salt -C 'I@octavia:manager' state.sls salt.minion.cert |
| 375 | node_name: {{ HOSTNAME_CFG01 }} |
| 376 | retry: {count: 1, delay: 5} |
| 377 | skip_fail: false |
| 378 | |
| 379 | - description: Execute octavia client |
| 380 | cmd: salt -C 'I@octavia:client' state.sls octavia.client |
| 381 | node_name: {{ HOSTNAME_CFG01 }} |
| 382 | retry: {count: 1, delay: 5} |
| 383 | skip_fail: false |
| 384 | |
ibumarskov | b521006 | 2018-08-22 16:18:15 +0400 | [diff] [blame] | 385 | {%- endmacro %} |
| 386 | |
| 387 | {%- macro MACRO_INSTALL_DOGTAG() %} |
| 388 | # TO DO |
| 389 | {%- endmacro %} |
| 390 | |
Oleksii Butenko | de0c5ee | 2018-09-24 15:29:45 +0300 | [diff] [blame] | 391 | {%- macro MACRO_INSTALL_COMPUTE(CELL_MAPPING=false) %} |
Oleksii Butenko | 20947f2 | 2018-08-29 15:48:21 +0300 | [diff] [blame] | 392 | # Install compute node |
| 393 | - description: Apply formulas for compute node |
| 394 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 395 | node_name: {{ HOSTNAME_CFG01 }} |
| 396 | retry: {count: 1, delay: 5} |
| 397 | skip_fail: true |
| 398 | |
| 399 | - description: Re-apply(as in doc) formulas for compute node |
| 400 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 401 | node_name: {{ HOSTNAME_CFG01 }} |
| 402 | retry: {count: 1, delay: 5} |
| 403 | skip_fail: false |
| 404 | |
| 405 | - description: Check IP on computes |
| 406 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run |
| 407 | 'ip a' |
| 408 | node_name: {{ HOSTNAME_CFG01 }} |
| 409 | retry: {count: 10, delay: 30} |
| 410 | skip_fail: false |
Oleksii Butenko | de0c5ee | 2018-09-24 15:29:45 +0300 | [diff] [blame] | 411 | |
| 412 | {%- if CELL_MAPPING %} |
| 413 | - description: Re-run nova for map cell mapping |
| 414 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 415 | -C "I@nova:controller and *01*" state.sls nova.controller |
| 416 | node_name: {{ HOSTNAME_CFG01 }} |
| 417 | retry: {count: 1, delay: 5} |
| 418 | skip_fail: false |
| 419 | {%- endif %} |
Oleksii Butenko | 48f9a7b | 2018-10-11 14:04:45 +0300 | [diff] [blame] | 420 | {%- endmacro %} |
Oleksii Butenko | de0c5ee | 2018-09-24 15:29:45 +0300 | [diff] [blame] | 421 | |
Oleksii Butenko | 48f9a7b | 2018-10-11 14:04:45 +0300 | [diff] [blame] | 422 | {%- macro MACRO_INSTALL_REDIS() %} |
| 423 | - description: Install redis service |
| 424 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@redis:cluster:role:master' state.sls redis && |
| 425 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@redis:server' state.sls redis |
| 426 | node_name: {{ HOSTNAME_CFG01 }} |
| 427 | retry: {count: 1, delay: 5} |
| 428 | skip_fail: false |
| 429 | {%- endmacro %} |
| 430 | |
| 431 | {%- macro MACRO_INSTALL_GNOCCHI() %} |
| 432 | - description: Install gnocchi server |
| 433 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@gnocchi:server and *01*' state.sls gnocchi.server && |
| 434 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@gnocchi:server' state.sls gnocchi.server |
| 435 | node_name: {{ HOSTNAME_CFG01 }} |
| 436 | retry: {count: 1, delay: 5} |
| 437 | skip_fail: false |
| 438 | |
| 439 | - description: Setup gnocchi client |
| 440 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@gnocchi:client and *01*' state.sls gnocchi.client && |
| 441 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@gnocchi:client' state.sls gnocchi.client |
| 442 | node_name: {{ HOSTNAME_CFG01 }} |
| 443 | retry: {count: 1, delay: 5} |
| 444 | skip_fail: false |
| 445 | {%- endmacro %} |
| 446 | |
| 447 | {%- macro MACRO_INSTALL_PANKO() %} |
| 448 | - description: Install panko server |
| 449 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@panko:server and *01*' state.sls panko && |
| 450 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@panko:server' state.sls panko |
| 451 | node_name: {{ HOSTNAME_CFG01 }} |
| 452 | retry: {count: 1, delay: 5} |
| 453 | skip_fail: false |
| 454 | {%- endmacro %} |
| 455 | |
| 456 | {%- macro MACRO_INSTALL_CEILOMETER() %} |
| 457 | - description: Install ceilometer server on first node |
| 458 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceilometer:server and *01*' state.sls ceilometer |
| 459 | node_name: {{ HOSTNAME_CFG01 }} |
| 460 | retry: {count: 2, delay: 5} |
| 461 | skip_fail: false |
| 462 | |
| 463 | - description: Install ceilometer server on other nodes |
| 464 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceilometer:server' state.sls ceilometer |
| 465 | node_name: {{ HOSTNAME_CFG01 }} |
| 466 | retry: {count: 2, delay: 5} |
| 467 | skip_fail: false |
| 468 | {%- endmacro %} |
| 469 | |
| 470 | {%- macro MACRO_INSTALL_AODH() %} |
| 471 | - description: Install aodh server |
| 472 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@aodh:server and *01*' state.sls aodh && |
| 473 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@aodh:server' state.sls aodh |
| 474 | node_name: {{ HOSTNAME_CFG01 }} |
| 475 | retry: {count: 1, delay: 5} |
| 476 | skip_fail: false |
Oleksii Butenko | 20947f2 | 2018-08-29 15:48:21 +0300 | [diff] [blame] | 477 | {%- endmacro %} |
Oleksii Butenko | ffc0922 | 2018-09-21 12:37:16 +0300 | [diff] [blame] | 478 | |
| 479 | {%- macro OVERRIDE_POLICY() %} |
| 480 | - description: Upload policy override |
| 481 | upload: |
| 482 | local_path: {{ config.salt_deploy.templates_dir }}{{ LAB_CONFIG_NAME }}/ |
| 483 | local_filename: overrides-policy.yml |
| 484 | remote_path: /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/ |
| 485 | node_name: {{ HOSTNAME_CFG01 }} |
| 486 | |
| 487 | - description: Create custom cluster control class |
| 488 | cmd: echo -e "classes:\n- cluster.{{ LAB_CONFIG_NAME }}.openstack.control_orig\n$(cat /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/overrides-policy.yml)" > /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/overrides-policy.yml |
| 489 | node_name: {{ HOSTNAME_CFG01 }} |
| 490 | |
| 491 | - description: Rename control classes |
| 492 | cmd: mv /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/control.yml /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/control_orig.yml && |
| 493 | ln -s /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/overrides-policy.yml /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/control.yml && |
| 494 | salt --hard-crash --state-output=mixed --state-verbose=False '*' saltutil.sync_all && |
| 495 | salt --hard-crash --state-output=mixed --state-verbose=False '*' saltutil.refresh_pillar |
| 496 | node_name: {{ HOSTNAME_CFG01 }} |
| 497 | {%- endmacro %} |