Dennis Dmitriev | ab83ea4 | 2017-05-12 16:52:45 +0300 | [diff] [blame] | 1 | {% from 'virtual-mcp11-ovs-dpdk/underlay.yaml' import HOSTNAME_CFG01 with context %} |
Tatyana Leontovich | 6238ba5 | 2017-06-22 19:31:56 +0300 | [diff] [blame] | 2 | {% from 'virtual-mcp11-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL01 with context %} |
| 3 | {% from 'virtual-mcp11-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL02 with context %} |
| 4 | {% from 'virtual-mcp11-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL03 with context %} |
Sergii Golovatiuk | 50f9189 | 2017-08-04 18:11:06 +0200 | [diff] [blame] | 5 | {% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %} |
| 6 | {% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %} |
Dennis Dmitriev | d926248 | 2017-04-26 13:12:40 +0300 | [diff] [blame] | 7 | |
| 8 | # Install OpenStack control services |
| 9 | |
Dennis Dmitriev | 45396db | 2017-04-26 15:29:47 +0300 | [diff] [blame] | 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) |
Dennis Dmitriev | d926248 | 2017-04-26 13:12:40 +0300 | [diff] [blame] | 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 | |
Dennis Dmitriev | 45396db | 2017-04-26 15:29:47 +0300 | [diff] [blame] | 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 | |
Dennis Dmitriev | d926248 | 2017-04-26 13:12:40 +0300 | [diff] [blame] | 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 |
Tatyana Leontovich | b148869 | 2017-11-22 18:39:51 +0200 | [diff] [blame] | 59 | -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack service list' |
Dennis Dmitriev | d926248 | 2017-04-26 13:12:40 +0300 | [diff] [blame] | 60 | node_name: {{ HOSTNAME_CFG01 }} |
| 61 | retry: {count: 1, delay: 5} |
| 62 | skip_fail: false |
| 63 | |
Dennis Dmitriev | d926248 | 2017-04-26 13:12:40 +0300 | [diff] [blame] | 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 }} |
Dennis Dmitriev | 4ab889c | 2017-04-27 14:11:04 +0300 | [diff] [blame] | 76 | retry: {count: 2, delay: 5} |
Dennis Dmitriev | d926248 | 2017-04-26 13:12:40 +0300 | [diff] [blame] | 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 | |
| 102 | - description: Install neutron service |
| 103 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 104 | -C 'I@neutron:server' state.sls neutron -b 1 |
| 105 | node_name: {{ HOSTNAME_CFG01 }} |
| 106 | retry: {count: 1, delay: 5} |
| 107 | skip_fail: false |
| 108 | |
| 109 | - description: Install neutron on gtw node |
| 110 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 111 | -C 'I@neutron:gateway' state.sls neutron |
| 112 | node_name: {{ HOSTNAME_CFG01 }} |
| 113 | retry: {count: 1, delay: 5} |
| 114 | skip_fail: false |
| 115 | |
| 116 | |
| 117 | - description: Check neutron agent-list |
| 118 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 119 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list' |
| 120 | node_name: {{ HOSTNAME_CFG01 }} |
| 121 | retry: {count: 1, delay: 5} |
| 122 | skip_fail: false |
| 123 | |
| 124 | |
| 125 | - description: Install heat service |
| 126 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 127 | -C 'I@heat:server' state.sls heat -b 1 |
| 128 | node_name: {{ HOSTNAME_CFG01 }} |
| 129 | retry: {count: 1, delay: 5} |
| 130 | skip_fail: false |
| 131 | |
| 132 | - description: Check heat service |
| 133 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Tatyana Leontovich | b148869 | 2017-11-22 18:39:51 +0200 | [diff] [blame] | 134 | -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack orchestration resource type list' |
Dennis Dmitriev | d926248 | 2017-04-26 13:12:40 +0300 | [diff] [blame] | 135 | node_name: {{ HOSTNAME_CFG01 }} |
Igor Yozhikov | 8ec6d2f | 2017-05-23 16:17:29 +0300 | [diff] [blame] | 136 | retry: {count: 5, delay: 10} |
Dennis Dmitriev | d926248 | 2017-04-26 13:12:40 +0300 | [diff] [blame] | 137 | skip_fail: false |
| 138 | |
| 139 | |
| 140 | - description: Deploy horizon dashboard |
| 141 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 142 | -C 'I@horizon:server' state.sls horizon |
| 143 | node_name: {{ HOSTNAME_CFG01 }} |
| 144 | retry: {count: 1, delay: 5} |
| 145 | skip_fail: true |
| 146 | |
| 147 | - description: Deploy nginx proxy |
| 148 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 149 | -C 'I@nginx:server' state.sls nginx |
| 150 | node_name: {{ HOSTNAME_CFG01 }} |
| 151 | retry: {count: 1, delay: 5} |
| 152 | skip_fail: true |
| 153 | |
| 154 | |
| 155 | # Install compute node |
| 156 | |
| 157 | - description: Apply formulas for compute node |
| 158 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 159 | node_name: {{ HOSTNAME_CFG01 }} |
| 160 | retry: {count: 1, delay: 5} |
| 161 | skip_fail: true |
| 162 | |
| 163 | - description: Re-apply(as in doc) 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} |
Oleksii Butenko | 9f2601c | 2018-02-08 15:13:21 +0200 | [diff] [blame] | 167 | skip_fail: false |
Dennis Dmitriev | d926248 | 2017-04-26 13:12:40 +0300 | [diff] [blame] | 168 | |
| 169 | - description: Check IP on computes |
| 170 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run |
| 171 | 'ip a' |
| 172 | node_name: {{ HOSTNAME_CFG01 }} |
| 173 | retry: {count: 10, delay: 30} |
| 174 | skip_fail: false |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 175 | |
| 176 | |
| 177 | # Upload cirros image |
| 178 | |
| 179 | - description: Upload cirros image on ctl01 |
| 180 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 181 | 'wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img' |
| 182 | node_name: {{ HOSTNAME_CFG01 }} |
| 183 | retry: {count: 2, delay: 30} |
| 184 | skip_fail: false |
| 185 | |
| 186 | - description: Register image in glance |
| 187 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
Dmitry Tyzhnenko | 30f5804 | 2017-11-28 17:00:40 +0200 | [diff] [blame] | 188 | '. /root/keystonercv3; glance --timeout 120 image-create --name cirros --visibility public --disk-format qcow2 --container-format bare --progress < /root/cirros-0.3.4-i386-disk.img' |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 189 | node_name: {{ HOSTNAME_CFG01 }} |
| 190 | retry: {count: 1, delay: 30} |
| 191 | skip_fail: false |
| 192 | |
| 193 | - description: Create net04_external |
| 194 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
Alexey Stupnikov | e157709 | 2017-08-10 20:59:31 +0300 | [diff] [blame] | 195 | '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat' |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 196 | node_name: {{ HOSTNAME_CFG01 }} |
| 197 | retry: {count: 1, delay: 30} |
| 198 | skip_fail: false |
| 199 | |
| 200 | - description: Create subnet_external |
| 201 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 202 | '. /root/keystonercv3; neutron subnet-create net04_ext {{ IPV4_NET_EXTERNAL_PREFIX }}.0/24 --name net04_ext__subnet --disable-dhcp --allocation-pool start={{ IPV4_NET_EXTERNAL_PREFIX }}.150,end={{ IPV4_NET_EXTERNAL_PREFIX }}.180 --gateway {{ IPV4_NET_EXTERNAL_PREFIX }}.1' |
| 203 | node_name: {{ HOSTNAME_CFG01 }} |
| 204 | retry: {count: 1, delay: 30} |
| 205 | skip_fail: false |
| 206 | |
| 207 | - description: Create net04 |
| 208 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
Dmitry Tyzhnenko | 188f1f7 | 2017-10-18 15:29:00 +0300 | [diff] [blame] | 209 | '. /root/keystonercv3; neutron net-create net04 --provider:network_type gre' |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 210 | node_name: {{ HOSTNAME_CFG01 }} |
| 211 | retry: {count: 1, delay: 30} |
| 212 | skip_fail: false |
| 213 | |
| 214 | - description: Create subnet_net04 |
| 215 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 216 | '. /root/keystonercv3; neutron subnet-create net04 {{ IPV4_NET_TENANT_PREFIX }}.0/24 --name net04__subnet --allocation-pool start={{ IPV4_NET_TENANT_PREFIX }}.120,end={{ IPV4_NET_TENANT_PREFIX }}.240' |
| 217 | node_name: {{ HOSTNAME_CFG01 }} |
| 218 | retry: {count: 1, delay: 30} |
| 219 | skip_fail: false |
| 220 | |
| 221 | - description: Create router |
| 222 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
Dmitry Tyzhnenko | 188f1f7 | 2017-10-18 15:29:00 +0300 | [diff] [blame] | 223 | '. /root/keystonercv3; neutron router-create net04_router01 --ha False' |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 224 | node_name: {{ HOSTNAME_CFG01 }} |
| 225 | retry: {count: 1, delay: 30} |
| 226 | skip_fail: false |
| 227 | |
| 228 | - description: Set geteway |
| 229 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 230 | '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext' |
| 231 | node_name: {{ HOSTNAME_CFG01 }} |
| 232 | retry: {count: 1, delay: 30} |
| 233 | skip_fail: false |
| 234 | |
| 235 | - description: Add interface |
| 236 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 237 | '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet' |
| 238 | node_name: {{ HOSTNAME_CFG01 }} |
| 239 | retry: {count: 1, delay: 30} |
| 240 | skip_fail: false |
| 241 | |
| 242 | - description: Allow all tcp |
| 243 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 244 | '. /root/keystonercv3; nova secgroup-add-rule default tcp 1 65535 0.0.0.0/0' |
| 245 | node_name: {{ HOSTNAME_CFG01 }} |
| 246 | retry: {count: 1, delay: 30} |
| 247 | skip_fail: false |
| 248 | |
| 249 | - description: Allow all icmp |
| 250 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 251 | '. /root/keystonercv3; nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0' |
| 252 | node_name: {{ HOSTNAME_CFG01 }} |
| 253 | retry: {count: 1, delay: 30} |
| 254 | skip_fail: false |
| 255 | |
| 256 | # Configure cinder-volume salt-call |
| 257 | - description: Set disks 01 |
| 258 | cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb' |
| 259 | node_name: {{ HOSTNAME_CTL01 }} |
| 260 | retry: {count: 1, delay: 30} |
| 261 | skip_fail: false |
| 262 | |
| 263 | - description: Set disks 02 |
| 264 | cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb' |
| 265 | node_name: {{ HOSTNAME_CTL02 }} |
| 266 | retry: {count: 1, delay: 30} |
| 267 | skip_fail: false |
| 268 | |
| 269 | - description: Set disks 03 |
| 270 | cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb' |
| 271 | node_name: {{ HOSTNAME_CTL03 }} |
| 272 | retry: {count: 1, delay: 30} |
| 273 | skip_fail: false |
| 274 | |
| 275 | - description: Create partitions 01 |
| 276 | cmd: salt-call cmd.run 'pvcreate /dev/vdb1' |
| 277 | node_name: {{ HOSTNAME_CTL01 }} |
| 278 | retry: {count: 1, delay: 30} |
| 279 | skip_fail: false |
| 280 | |
| 281 | - description: Create partitions 02 |
| 282 | cmd: salt-call cmd.run 'pvcreate /dev/vdb1' |
sgudz | 2e39339 | 2017-10-17 12:51:26 +0300 | [diff] [blame] | 283 | node_name: {{ HOSTNAME_CTL02 }} |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 284 | retry: {count: 1, delay: 30} |
| 285 | skip_fail: false |
| 286 | |
| 287 | - description: Create partitions 03 |
| 288 | cmd: salt-call cmd.run 'pvcreate /dev/vdb1' |
sgudz | 2e39339 | 2017-10-17 12:51:26 +0300 | [diff] [blame] | 289 | node_name: {{ HOSTNAME_CTL03 }} |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 290 | retry: {count: 1, delay: 30} |
Alexey Stupnikov | e157709 | 2017-08-10 20:59:31 +0300 | [diff] [blame] | 291 | skip_fail: false |