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 |
| 6 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False \ |
| 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) |
| 13 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False \ |
| 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 | |
| 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 |
| 30 | |
| 31 | - description: Mount glusterfs.client volumes (resuires created 'keystone' and 'glusterfs' system users) |
| 32 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False \ |
| 33 | -C 'I@glance:server' state.sls glusterfs.client |
| 34 | node_name: {{ HOSTNAME_CFG01 }} |
| 35 | retry: {count: 1, delay: 5} |
| 36 | skip_fail: false |
| 37 | |
| 38 | - description: Update fernet keys for keystone server on the mounted glusterfs volume |
| 39 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False \ |
| 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 |
| 46 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False \ |
| 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 |
| 53 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False \ |
| 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 |
| 60 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False \ |
| 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 |
| 68 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False \ |
| 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 |
| 75 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False \ |
| 76 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; nova service-list' |
| 77 | node_name: {{ HOSTNAME_CFG01 }} |
| 78 | retry: {count: 1, delay: 5} |
| 79 | skip_fail: false |
| 80 | |
| 81 | |
| 82 | - description: Install cinder |
| 83 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False \ |
| 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 |
| 90 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False \ |
| 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 |
| 98 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False \ |
| 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 |
| 122 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False \ |
| 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 |
| 164 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False \ |
| 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 |
| 171 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False \ |
| 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 |
| 179 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False \ |
| 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 |
| 186 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False \ |
| 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 | |
| 214 | |
| 215 | - description: Provision vrouter |
| 216 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 217 | -C 'I@nova:compute' cmd.run 'exec 0>&-; exec 1>&-; exec 2>&-; nohup bash -c "ip link | grep vhost && echo no_reboot || sleep 5 && reboot & "' |
| 218 | node_name: {{ HOSTNAME_CFG01 }} |
| 219 | retry: {count: 1, delay: 5} |
| 220 | skip_fail: false |
| 221 | |
| 222 | - description: contrail client on cmp |
| 223 | cmd: sleep 300; salt --hard-crash --state-output=mixed --state-verbose=False |
| 224 | -C 'I@opencontrail:compute' state.sls opencontrail.client |
| 225 | node_name: {{ HOSTNAME_CFG01 }} |
| 226 | retry: {count: 1, delay: 5} |
| 227 | skip_fail: false |