Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 1 | {% from 'virtual-mcp10-contrail/underlay.yaml' import HOSTNAME_CFG01 with context %} |
| 2 | |
| 3 | # Install OpenStack control services |
| 4 | |
| 5 | - description: Install glance on all controllers |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 6 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 7 | -C 'I@glance:server' state.sls glance -b 1 |
| 8 | node_name: {{ HOSTNAME_CFG01 }} |
| 9 | retry: {count: 1, delay: 5} |
| 10 | skip_fail: false |
| 11 | |
| 12 | - description: Install keystone service (note that different fernet keys are created on different nodes) |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 13 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 14 | -C 'I@keystone:server' state.sls keystone.server -b 1 |
| 15 | node_name: {{ HOSTNAME_CFG01 }} |
| 16 | retry: {count: 2, delay: 15} |
| 17 | skip_fail: false |
| 18 | |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 19 | #- description: Restart apache due to PROD-10477 |
| 20 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl restart apache2" |
| 21 | # node_name: {{ HOSTNAME_CFG01 }} |
| 22 | # retry: {count: 1, delay: 15} |
| 23 | # skip_fail: false |
| 24 | # |
| 25 | #- description: Check apache status to PROD-10477 |
| 26 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl status apache2" |
| 27 | # node_name: {{ HOSTNAME_CFG01 }} |
| 28 | # retry: {count: 1, delay: 15} |
| 29 | # skip_fail: false |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 30 | |
| 31 | - description: Mount glusterfs.client volumes (resuires created 'keystone' and 'glusterfs' system users) |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 32 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 33 | -C 'I@glance:server' state.sls glusterfs.client |
| 34 | node_name: {{ HOSTNAME_CFG01 }} |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 35 | retry: {count: 2, delay: 5} |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 36 | skip_fail: false |
| 37 | |
| 38 | - description: Update fernet keys for keystone server on the mounted glusterfs volume |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 39 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 40 | -C 'I@keystone:server' state.sls keystone.server -b 1 |
| 41 | node_name: {{ HOSTNAME_CFG01 }} |
| 42 | retry: {count: 1, delay: 5} |
| 43 | skip_fail: false |
| 44 | |
| 45 | - description: Populate keystone services/tenants/admins |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 46 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 47 | -C 'I@keystone:client' state.sls keystone.client |
| 48 | node_name: {{ HOSTNAME_CFG01 }} |
| 49 | retry: {count: 1, delay: 5} |
| 50 | skip_fail: false |
| 51 | |
| 52 | - description: Check keystone service-list |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 53 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 54 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; openstack service list' |
| 55 | node_name: {{ HOSTNAME_CFG01 }} |
| 56 | retry: {count: 1, delay: 5} |
| 57 | skip_fail: false |
| 58 | |
| 59 | - description: Check glance image-list |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 60 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 61 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; glance image-list' |
| 62 | node_name: {{ HOSTNAME_CFG01 }} |
| 63 | retry: {count: 1, delay: 5} |
| 64 | skip_fail: false |
| 65 | |
| 66 | |
| 67 | - description: Install nova on all controllers |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 68 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 69 | -C 'I@nova:controller' state.sls nova -b 1 |
| 70 | node_name: {{ HOSTNAME_CFG01 }} |
| 71 | retry: {count: 2, delay: 5} |
| 72 | skip_fail: false |
| 73 | |
| 74 | - description: Check nova service-list |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 75 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 76 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; nova service-list' |
| 77 | node_name: {{ HOSTNAME_CFG01 }} |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 78 | retry: {count: 3, delay: 5} |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 79 | skip_fail: false |
| 80 | |
| 81 | |
| 82 | - description: Install cinder |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 83 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 84 | -C 'I@cinder:controller' state.sls cinder -b 1 |
| 85 | node_name: {{ HOSTNAME_CFG01 }} |
| 86 | retry: {count: 1, delay: 5} |
| 87 | skip_fail: false |
| 88 | |
| 89 | - description: Check cinder list |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 90 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 91 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list' |
| 92 | node_name: {{ HOSTNAME_CFG01 }} |
| 93 | retry: {count: 1, delay: 5} |
| 94 | skip_fail: false |
| 95 | |
| 96 | |
| 97 | - description: Install neutron service |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 98 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 99 | -C 'I@neutron:server' state.sls neutron -b 1 |
| 100 | node_name: {{ HOSTNAME_CFG01 }} |
| 101 | retry: {count: 1, delay: 5} |
| 102 | skip_fail: false |
| 103 | |
| 104 | # |
| 105 | #- description: Install neutron on gtw node |
| 106 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 107 | # -C 'I@neutron:gateway' state.sls neutron |
| 108 | # node_name: {{ HOSTNAME_CFG01 }} |
| 109 | # retry: {count: 1, delay: 5} |
| 110 | # skip_fail: false |
| 111 | |
| 112 | |
| 113 | #- description: Check neutron agent-list |
| 114 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 115 | # -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list' |
| 116 | # node_name: {{ HOSTNAME_CFG01 }} |
| 117 | # retry: {count: 1, delay: 5} |
| 118 | # skip_fail: false |
| 119 | |
| 120 | # install contrail |
| 121 | - description: Install contrail db |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 122 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 123 | -C 'I@opencontrail:database' state.sls opencontrail.database |
| 124 | node_name: {{ HOSTNAME_CFG01 }} |
| 125 | retry: {count: 2, delay: 20} |
| 126 | skip_fail: false |
| 127 | |
| 128 | - description: Install contrail on 1st node and skip client part |
| 129 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 130 | -C 'I@opencontrail:control and *01*' state.sls opencontrail exclude=opencontrail.client |
| 131 | node_name: {{ HOSTNAME_CFG01 }} |
| 132 | retry: {count: 3, delay: 5} |
| 133 | skip_fail: false |
| 134 | |
| 135 | - description: Install contrail on all nodes still skipping client |
| 136 | cmd: salt --hard-crash --state-output=mixed --state-verbose=Falsa |
| 137 | -C 'I@opencontrail:control' state.sls opencontrail exclude=opencontrail.client |
| 138 | node_name: {{ HOSTNAME_CFG01 }} |
| 139 | retry: {count: 2, delay: 5} |
| 140 | skip_fail: false |
| 141 | |
| 142 | - description: Install contrail and do client part as well |
| 143 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 144 | -C 'I@opencontrail:control' state.sls opencontrail |
| 145 | node_name: {{ HOSTNAME_CFG01 }} |
| 146 | retry: {count: 1, delay: 5} |
| 147 | skip_fail: false |
| 148 | |
| 149 | - description: Configure contrail |
| 150 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 151 | -C 'I@opencontrail:database:id:1' state.sls opencontrail.client |
| 152 | node_name: {{ HOSTNAME_CFG01 }} |
| 153 | retry: {count: 1, delay: 5} |
| 154 | skip_fail: false |
| 155 | |
| 156 | - description: Check contrail status |
| 157 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 158 | -C 'I@opencontrail:control' cmd.run contrail-status |
| 159 | node_name: {{ HOSTNAME_CFG01 }} |
| 160 | retry: {count: 1, delay: 5} |
| 161 | skip_fail: false |
| 162 | |
| 163 | - description: Install heat service |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 164 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 165 | -C 'I@heat:server' state.sls heat -b 1 |
| 166 | node_name: {{ HOSTNAME_CFG01 }} |
| 167 | retry: {count: 1, delay: 5} |
| 168 | skip_fail: false |
| 169 | |
| 170 | - description: Check heat service |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 171 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 172 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; heat resource-type-list' |
| 173 | node_name: {{ HOSTNAME_CFG01 }} |
| 174 | retry: {count: 1, delay: 5} |
| 175 | skip_fail: false |
| 176 | |
| 177 | |
| 178 | - description: Deploy horizon dashboard |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 179 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 180 | -C 'I@horizon:server' state.sls horizon |
| 181 | node_name: {{ HOSTNAME_CFG01 }} |
| 182 | retry: {count: 1, delay: 5} |
| 183 | skip_fail: true |
| 184 | |
| 185 | - description: Deploy nginx proxy |
Illia Polliul | 323d727 | 2017-05-29 18:24:28 +0200 | [diff] [blame] | 186 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 187 | -C 'I@nginx:server' state.sls nginx |
| 188 | node_name: {{ HOSTNAME_CFG01 }} |
| 189 | retry: {count: 1, delay: 5} |
| 190 | skip_fail: true |
| 191 | |
| 192 | |
| 193 | # Install compute node |
| 194 | |
| 195 | - description: Apply formulas for compute node |
| 196 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 197 | node_name: {{ HOSTNAME_CFG01 }} |
| 198 | retry: {count: 1, delay: 5} |
| 199 | skip_fail: true |
| 200 | |
| 201 | - description: Re-apply(as in doc) formulas for compute node |
| 202 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 203 | node_name: {{ HOSTNAME_CFG01 }} |
| 204 | retry: {count: 1, delay: 5} |
| 205 | skip_fail: true |
| 206 | |
| 207 | - description: Check IP on computes |
| 208 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run |
| 209 | 'ip a' |
| 210 | node_name: {{ HOSTNAME_CFG01 }} |
| 211 | retry: {count: 10, delay: 30} |
| 212 | skip_fail: false |
| 213 | |
Illia Polliul | ea26c1e | 2017-06-10 14:13:51 +0200 | [diff] [blame] | 214 | - description: Provision Contrail-vRouter on Computes |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 215 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Illia Polliul | ea26c1e | 2017-06-10 14:13:51 +0200 | [diff] [blame] | 216 | -C 'I@opencontrail:compute' state.sls 'opencontrail.client' |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 217 | node_name: {{ HOSTNAME_CFG01 }} |
| 218 | retry: {count: 1, delay: 5} |
| 219 | skip_fail: false |
| 220 | |
Illia Polliul | ea26c1e | 2017-06-10 14:13:51 +0200 | [diff] [blame] | 221 | - description: Install Opencontrail on computes |
| 222 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 223 | -C 'I@opencontrail:compute' state.sls 'opencontrail' |
Illia Polliul | 2a2b6d1 | 2017-05-29 17:05:11 +0200 | [diff] [blame] | 224 | node_name: {{ HOSTNAME_CFG01 }} |
| 225 | retry: {count: 1, delay: 5} |
| 226 | skip_fail: false |
Illia Polliul | ea26c1e | 2017-06-10 14:13:51 +0200 | [diff] [blame] | 227 | |
| 228 | - description: Reboot Opencontrail compute nodes |
| 229 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 230 | -C 'I@opencontrail:compute' system.reboot |
| 231 | node_name: {{ HOSTNAME_CFG01 }} |
| 232 | retry: {count: 1, delay: 5} |
| 233 | skip_fail: false |