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