Oleksii Butenko | ade9c6c | 2018-03-05 15:16:40 +0200 | [diff] [blame] | 1 | {% from 'cookied-bm-mcp-ovs-dpdk/underlay.yaml' import HOSTNAME_CFG01 with context %} |
| 2 | {% from 'cookied-bm-mcp-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL01 with context %} |
| 3 | {% from 'cookied-bm-mcp-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL02 with context %} |
| 4 | {% from 'cookied-bm-mcp-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL03 with context %} |
| 5 | {% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %} |
| 6 | {% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %} |
Oleksii Butenko | f65a004 | 2018-06-27 13:38:43 +0300 | [diff] [blame^] | 7 | {% import 'shared-salt.yaml' as SHARED with context %} |
| 8 | |
Oleksii Butenko | ade9c6c | 2018-03-05 15:16:40 +0200 | [diff] [blame] | 9 | |
| 10 | # Install OpenStack control services |
| 11 | |
| 12 | - description: Install glance on all controllers |
| 13 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 14 | -C 'I@glance:server' state.sls glance -b 1 |
| 15 | node_name: {{ HOSTNAME_CFG01 }} |
| 16 | retry: {count: 1, delay: 5} |
| 17 | skip_fail: false |
| 18 | |
| 19 | - description: Install keystone service (note that different fernet keys are created on different nodes) |
| 20 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 21 | -C 'I@keystone:server' state.sls keystone.server -b 1 |
| 22 | node_name: {{ HOSTNAME_CFG01 }} |
| 23 | retry: {count: 2, delay: 15} |
| 24 | skip_fail: false |
| 25 | |
| 26 | - description: Restart apache due to PROD-10477 |
| 27 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl restart apache2" |
| 28 | node_name: {{ HOSTNAME_CFG01 }} |
| 29 | retry: {count: 1, delay: 15} |
| 30 | skip_fail: false |
| 31 | |
| 32 | - description: Check apache status to PROD-10477 |
| 33 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl status apache2" |
| 34 | node_name: {{ HOSTNAME_CFG01 }} |
| 35 | retry: {count: 1, delay: 15} |
| 36 | skip_fail: false |
| 37 | |
| 38 | - description: Mount glusterfs.client volumes (resuires created 'keystone' and 'glusterfs' system users) |
| 39 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 40 | -C 'I@glance:server' state.sls glusterfs.client |
| 41 | node_name: {{ HOSTNAME_CFG01 }} |
| 42 | retry: {count: 1, delay: 5} |
| 43 | skip_fail: false |
| 44 | |
| 45 | - description: Update fernet keys for keystone server on the mounted glusterfs volume |
| 46 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 47 | -C 'I@keystone:server' state.sls keystone.server -b 1 |
| 48 | node_name: {{ HOSTNAME_CFG01 }} |
| 49 | retry: {count: 1, delay: 5} |
| 50 | skip_fail: false |
| 51 | |
| 52 | - description: Populate keystone services/tenants/admins |
| 53 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 54 | -C 'I@keystone:client' state.sls keystone.client |
| 55 | node_name: {{ HOSTNAME_CFG01 }} |
| 56 | retry: {count: 1, delay: 5} |
| 57 | skip_fail: false |
| 58 | |
| 59 | - description: Check keystone service-list |
| 60 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 61 | -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack service list' |
| 62 | node_name: {{ HOSTNAME_CFG01 }} |
| 63 | retry: {count: 1, delay: 5} |
| 64 | skip_fail: false |
| 65 | |
| 66 | - description: Check glance image-list |
| 67 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 68 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; glance image-list' |
| 69 | node_name: {{ HOSTNAME_CFG01 }} |
| 70 | retry: {count: 1, delay: 5} |
| 71 | skip_fail: false |
| 72 | |
| 73 | |
| 74 | - description: Install nova on all controllers |
| 75 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 76 | -C 'I@nova:controller' state.sls nova -b 1 |
| 77 | node_name: {{ HOSTNAME_CFG01 }} |
| 78 | retry: {count: 2, delay: 5} |
| 79 | skip_fail: false |
| 80 | |
| 81 | - description: Check nova service-list |
| 82 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 83 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; nova service-list' |
| 84 | node_name: {{ HOSTNAME_CFG01 }} |
| 85 | retry: {count: 1, delay: 5} |
| 86 | skip_fail: false |
| 87 | |
| 88 | |
| 89 | - description: Install cinder |
| 90 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 91 | -C 'I@cinder:controller' state.sls cinder -b 1 |
| 92 | node_name: {{ HOSTNAME_CFG01 }} |
| 93 | retry: {count: 1, delay: 5} |
| 94 | skip_fail: false |
| 95 | |
| 96 | - description: Check cinder list |
| 97 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 98 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list' |
| 99 | node_name: {{ HOSTNAME_CFG01 }} |
| 100 | retry: {count: 1, delay: 5} |
| 101 | skip_fail: false |
| 102 | |
| 103 | - description: Install cinder volume |
| 104 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 105 | -C 'I@cinder:volume' state.sls cinder |
| 106 | node_name: {{ HOSTNAME_CFG01 }} |
| 107 | retry: {count: 1, delay: 5} |
| 108 | skip_fail: false |
| 109 | |
| 110 | - description: Install neutron service |
| 111 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 112 | -C 'I@neutron:server' state.sls neutron -b 1 |
| 113 | node_name: {{ HOSTNAME_CFG01 }} |
| 114 | retry: {count: 1, delay: 5} |
| 115 | skip_fail: false |
| 116 | |
| 117 | - description: Install neutron on gtw node |
| 118 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 119 | -C 'I@neutron:gateway' state.sls neutron |
| 120 | node_name: {{ HOSTNAME_CFG01 }} |
| 121 | retry: {count: 1, delay: 5} |
| 122 | skip_fail: false |
| 123 | |
| 124 | |
| 125 | - description: Check neutron agent-list |
| 126 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 127 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list' |
| 128 | node_name: {{ HOSTNAME_CFG01 }} |
| 129 | retry: {count: 1, delay: 5} |
| 130 | skip_fail: false |
| 131 | |
| 132 | |
| 133 | - description: Install heat service |
| 134 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 135 | -C 'I@heat:server' state.sls heat -b 1 |
| 136 | node_name: {{ HOSTNAME_CFG01 }} |
| 137 | retry: {count: 1, delay: 5} |
| 138 | skip_fail: false |
| 139 | |
| 140 | - description: Check heat service |
| 141 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 142 | -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack orchestration resource type list' |
| 143 | node_name: {{ HOSTNAME_CFG01 }} |
| 144 | retry: {count: 5, delay: 10} |
| 145 | skip_fail: false |
| 146 | |
| 147 | |
| 148 | - description: Deploy horizon dashboard |
| 149 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 150 | -C 'I@horizon:server' state.sls horizon |
| 151 | node_name: {{ HOSTNAME_CFG01 }} |
| 152 | retry: {count: 1, delay: 5} |
| 153 | skip_fail: true |
| 154 | |
| 155 | - description: Deploy nginx proxy |
| 156 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 157 | -C 'I@nginx:server' state.sls nginx |
| 158 | node_name: {{ HOSTNAME_CFG01 }} |
| 159 | retry: {count: 1, delay: 5} |
| 160 | skip_fail: true |
| 161 | |
| 162 | |
| 163 | # Install compute node |
| 164 | |
| 165 | - description: Apply formulas for compute node |
| 166 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 167 | node_name: {{ HOSTNAME_CFG01 }} |
| 168 | retry: {count: 1, delay: 5} |
| 169 | skip_fail: true |
| 170 | |
| 171 | - description: Re-apply(as in doc) formulas for compute node |
| 172 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 173 | node_name: {{ HOSTNAME_CFG01 }} |
| 174 | retry: {count: 1, delay: 5} |
| 175 | skip_fail: false |
| 176 | |
| 177 | - description: Check IP on computes |
| 178 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run |
| 179 | 'ip a' |
| 180 | node_name: {{ HOSTNAME_CFG01 }} |
| 181 | retry: {count: 10, delay: 30} |
| 182 | skip_fail: false |
| 183 | |
Oleksii Butenko | ade9c6c | 2018-03-05 15:16:40 +0200 | [diff] [blame] | 184 | - description: Create net04_external |
| 185 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 186 | '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat' |
| 187 | node_name: {{ HOSTNAME_CFG01 }} |
| 188 | retry: {count: 1, delay: 30} |
| 189 | skip_fail: false |
| 190 | |
| 191 | - description: Create subnet_external |
| 192 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 193 | '. /root/keystonercv3; neutron subnet-create net04_ext 172.17.42.128/26 --name net04_ext__subnet --disable-dhcp --allocation-pool start=172.17.42.130,end=172.17.42.180 --gateway 172.17.42.129' |
| 194 | node_name: {{ HOSTNAME_CFG01 }} |
| 195 | retry: {count: 1, delay: 30} |
| 196 | skip_fail: false |
| 197 | |
| 198 | - description: Create net04 |
| 199 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 200 | '. /root/keystonercv3; neutron net-create net04 --provider:network_type vxlan' |
| 201 | node_name: {{ HOSTNAME_CFG01 }} |
| 202 | retry: {count: 1, delay: 30} |
| 203 | skip_fail: false |
| 204 | |
| 205 | - description: Create subnet_net04 |
| 206 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 207 | '. /root/keystonercv3; neutron subnet-create net04 10.167.12.0/24 --name net04__subnet --allocation-pool start=10.167.12.150,end=10.167.12.240' |
| 208 | node_name: {{ HOSTNAME_CFG01 }} |
| 209 | retry: {count: 1, delay: 30} |
| 210 | skip_fail: false |
| 211 | |
| 212 | - description: Create router |
| 213 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 214 | '. /root/keystonercv3; neutron router-create net04_router01 --ha False' |
| 215 | node_name: {{ HOSTNAME_CFG01 }} |
| 216 | retry: {count: 1, delay: 30} |
| 217 | skip_fail: false |
| 218 | |
| 219 | - description: Set geteway |
| 220 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 221 | '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext' |
| 222 | node_name: {{ HOSTNAME_CFG01 }} |
| 223 | retry: {count: 1, delay: 30} |
| 224 | skip_fail: false |
| 225 | |
| 226 | - description: Add interface |
| 227 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 228 | '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet' |
| 229 | node_name: {{ HOSTNAME_CFG01 }} |
| 230 | retry: {count: 1, delay: 30} |
Oleksii Butenko | f65a004 | 2018-06-27 13:38:43 +0300 | [diff] [blame^] | 231 | skip_fail: false |
| 232 | |
| 233 | - description: temp WR |
| 234 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run |
| 235 | 'ifdown br-prv; ifup br-prv' |
| 236 | node_name: {{ HOSTNAME_CFG01 }} |
| 237 | retry: {count: 1, delay: 30} |
| 238 | skip_fail: false |
| 239 | |
| 240 | {{ SHARED.INSTALL_DOCKER_ON_GTW() }} |