Dennis Dmitriev | ab83ea4 | 2017-05-12 16:52:45 +0300 | [diff] [blame] | 1 | {% from 'virtual-mcp-ocata-dvr/underlay.yaml' import HOSTNAME_CFG01 with context %} |
Tatyana Leontovich | 6238ba5 | 2017-06-22 19:31:56 +0300 | [diff] [blame] | 2 | {% from 'virtual-mcp-ocata-dvr/underlay.yaml' import HOSTNAME_CTL01 with context %} |
| 3 | {% from 'virtual-mcp-ocata-dvr/underlay.yaml' import HOSTNAME_CTL02 with context %} |
| 4 | {% from 'virtual-mcp-ocata-dvr/underlay.yaml' import HOSTNAME_CTL03 with context %} |
Tatyana Leontovich | 7c97e80 | 2017-07-19 17:08:39 +0300 | [diff] [blame] | 5 | {% from 'virtual-mcp-ocata-dvr/underlay.yaml' import HOSTNAME_GTW01 with context %} |
Sergii Golovatiuk | 50f9189 | 2017-08-04 18:11:06 +0200 | [diff] [blame] | 6 | {% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %} |
| 7 | {% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %} |
Dmitry Tyzhnenko | 8f6a63e | 2017-09-05 15:37:23 +0300 | [diff] [blame] | 8 | {% set LAB_CONFIG_NAME = os_env('LAB_CONFIG_NAME') %} |
Tatyana Leontovich | d08f881 | 2017-11-09 12:52:21 +0200 | [diff] [blame] | 9 | {% set OVERRIDE_POLICY = os_env('OVERRIDE_POLICY', '') %} |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 10 | |
| 11 | # Install OpenStack control services |
| 12 | |
Tatyana Leontovich | d08f881 | 2017-11-09 12:52:21 +0200 | [diff] [blame] | 13 | {%- if OVERRIDE_POLICY != '' %} |
Dmitry Tyzhnenko | 8f6a63e | 2017-09-05 15:37:23 +0300 | [diff] [blame] | 14 | - description: Upload policy override |
| 15 | upload: |
| 16 | local_path: {{ config.salt_deploy.templates_dir }}{{ LAB_CONFIG_NAME }}/ |
| 17 | local_filename: overrides-policy.yml |
| 18 | remote_path: /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/ |
| 19 | node_name: {{ HOSTNAME_CFG01 }} |
| 20 | |
| 21 | - description: Create custom cluster control class |
| 22 | cmd: echo -e "classes:\n- cluster.{{ LAB_CONFIG_NAME }}.openstack.control_orig\n$(cat /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/overrides-policy.yml)" > /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/overrides-policy.yml |
| 23 | node_name: {{ HOSTNAME_CFG01 }} |
| 24 | |
| 25 | - description: Rename control classes |
| 26 | cmd: mv /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/control.yml /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/control_orig.yml && |
| 27 | ln -s /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/overrides-policy.yml /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/control.yml && |
| 28 | salt --hard-crash --state-output=mixed --state-verbose=False '*' saltutil.sync_all && |
| 29 | salt --hard-crash --state-output=mixed --state-verbose=False '*' saltutil.refresh_pillar |
| 30 | node_name: {{ HOSTNAME_CFG01 }} |
Dmitry Tyzhnenko | 33eea15 | 2017-11-02 23:25:09 +0200 | [diff] [blame] | 31 | {%- endif %} |
Dmitry Tyzhnenko | 8f6a63e | 2017-09-05 15:37:23 +0300 | [diff] [blame] | 32 | |
Dennis Dmitriev | 4ab889c | 2017-04-27 14:11:04 +0300 | [diff] [blame] | 33 | - description: Install glance on all controllers |
| 34 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 35 | -C 'I@glance:server' state.sls glance -b 1 |
| 36 | node_name: {{ HOSTNAME_CFG01 }} |
| 37 | retry: {count: 1, delay: 5} |
| 38 | skip_fail: false |
| 39 | |
| 40 | - description: Install keystone service (note that different fernet keys are created on different nodes) |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 41 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 42 | -C 'I@keystone:server' state.sls keystone.server -b 1 |
| 43 | node_name: {{ HOSTNAME_CFG01 }} |
Tatyana Leontovich | d4f1fd3 | 2017-04-21 13:31:44 +0300 | [diff] [blame] | 44 | retry: {count: 2, delay: 15} |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 45 | skip_fail: false |
| 46 | |
Tatyana Leontovich | fa7ae4d | 2017-04-25 13:46:14 +0300 | [diff] [blame] | 47 | - description: Restart apache due to PROD-10477 |
| 48 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl restart apache2" |
| 49 | node_name: {{ HOSTNAME_CFG01 }} |
| 50 | retry: {count: 1, delay: 15} |
| 51 | skip_fail: false |
| 52 | |
| 53 | - description: Check apache status to PROD-10477 |
| 54 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl status apache2" |
| 55 | node_name: {{ HOSTNAME_CFG01 }} |
| 56 | retry: {count: 1, delay: 15} |
| 57 | skip_fail: false |
| 58 | |
Dennis Dmitriev | 4ab889c | 2017-04-27 14:11:04 +0300 | [diff] [blame] | 59 | - description: Mount glusterfs.client volumes (resuires created 'keystone' and 'glusterfs' system users) |
| 60 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 61 | -C 'I@glance:server' state.sls glusterfs.client |
| 62 | node_name: {{ HOSTNAME_CFG01 }} |
| 63 | retry: {count: 1, delay: 5} |
| 64 | skip_fail: false |
| 65 | |
| 66 | - description: Update fernet keys for keystone server on the mounted glusterfs volume |
| 67 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 68 | -C 'I@keystone:server' state.sls keystone.server -b 1 |
| 69 | node_name: {{ HOSTNAME_CFG01 }} |
| 70 | retry: {count: 1, delay: 5} |
| 71 | skip_fail: false |
| 72 | |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 73 | - description: Populate keystone services/tenants/admins |
| 74 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 75 | -C 'I@keystone:client' state.sls keystone.client |
| 76 | node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | f073e6f | 2018-02-06 23:45:15 +0200 | [diff] [blame] | 77 | retry: {count: 2, delay: 5} |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 78 | skip_fail: false |
| 79 | |
| 80 | - description: Check keystone service-list |
| 81 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Tatyana Leontovich | b148869 | 2017-11-22 18:39:51 +0200 | [diff] [blame] | 82 | -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack service list' |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 83 | node_name: {{ HOSTNAME_CFG01 }} |
| 84 | retry: {count: 1, delay: 5} |
| 85 | skip_fail: false |
| 86 | |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 87 | - description: Check glance image-list |
| 88 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 89 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; glance image-list' |
| 90 | node_name: {{ HOSTNAME_CFG01 }} |
| 91 | retry: {count: 1, delay: 5} |
| 92 | skip_fail: false |
| 93 | |
| 94 | |
| 95 | - description: Install nova on all controllers |
| 96 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 97 | -C 'I@nova:controller' state.sls nova -b 1 |
| 98 | node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | 4ab889c | 2017-04-27 14:11:04 +0300 | [diff] [blame] | 99 | retry: {count: 2, delay: 5} |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 100 | skip_fail: false |
| 101 | |
| 102 | - description: Check nova service-list |
| 103 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Tatyana Leontovich | 902f1b4 | 2017-07-27 17:00:19 +0300 | [diff] [blame] | 104 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; nova --debug service-list' |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 105 | node_name: {{ HOSTNAME_CFG01 }} |
Tatyana Leontovich | 902f1b4 | 2017-07-27 17:00:19 +0300 | [diff] [blame] | 106 | retry: {count: 3, delay: 5} |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 107 | skip_fail: false |
| 108 | |
| 109 | |
| 110 | - description: Install cinder |
| 111 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 112 | -C 'I@cinder:controller' state.sls cinder -b 1 |
| 113 | node_name: {{ HOSTNAME_CFG01 }} |
| 114 | retry: {count: 1, delay: 5} |
| 115 | skip_fail: false |
| 116 | |
| 117 | - description: Check cinder list |
| 118 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 119 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list' |
| 120 | node_name: {{ HOSTNAME_CFG01 }} |
| 121 | retry: {count: 1, delay: 5} |
| 122 | skip_fail: false |
| 123 | |
| 124 | |
| 125 | - description: Install neutron service |
| 126 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 127 | -C 'I@neutron:server' state.sls neutron -b 1 |
| 128 | node_name: {{ HOSTNAME_CFG01 }} |
| 129 | retry: {count: 1, delay: 5} |
| 130 | skip_fail: false |
| 131 | |
| 132 | - description: Install neutron on gtw node |
| 133 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 134 | -C 'I@neutron:gateway' state.sls neutron |
| 135 | node_name: {{ HOSTNAME_CFG01 }} |
| 136 | retry: {count: 1, delay: 5} |
| 137 | skip_fail: false |
| 138 | |
Tatyana Leontovich | c33be1f | 2017-07-19 17:38:30 +0300 | [diff] [blame] | 139 | # isntall designate |
| 140 | - description: Install powerdns |
| 141 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Tatyana Leontovich | 8d815a8 | 2017-10-05 16:01:26 +0300 | [diff] [blame] | 142 | -C 'I@powerdns:server' state.sls powerdns.server |
Tatyana Leontovich | c33be1f | 2017-07-19 17:38:30 +0300 | [diff] [blame] | 143 | node_name: {{ HOSTNAME_CFG01 }} |
| 144 | retry: {count: 1, delay: 5} |
| 145 | skip_fail: false |
| 146 | |
| 147 | - description: Install designate |
| 148 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 149 | -C 'I@designate:server' state.sls designate -b 1 |
| 150 | node_name: {{ HOSTNAME_CFG01 }} |
| 151 | retry: {count: 5, delay: 10} |
| 152 | skip_fail: false |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 153 | |
| 154 | - description: Check neutron agent-list |
| 155 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 156 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list' |
| 157 | node_name: {{ HOSTNAME_CFG01 }} |
| 158 | retry: {count: 1, delay: 5} |
| 159 | skip_fail: false |
| 160 | |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 161 | - description: Install heat service |
| 162 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 163 | -C 'I@heat:server' state.sls heat -b 1 |
| 164 | node_name: {{ HOSTNAME_CFG01 }} |
| 165 | retry: {count: 1, delay: 5} |
| 166 | skip_fail: false |
| 167 | |
| 168 | - description: Check heat service |
| 169 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Tatyana Leontovich | b148869 | 2017-11-22 18:39:51 +0200 | [diff] [blame] | 170 | -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack orchestration resource type list' |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 171 | node_name: {{ HOSTNAME_CFG01 }} |
Igor Yozhikov | 8ec6d2f | 2017-05-23 16:17:29 +0300 | [diff] [blame] | 172 | retry: {count: 5, delay: 10} |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 173 | skip_fail: false |
| 174 | |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 175 | - description: Deploy horizon dashboard |
| 176 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 177 | -C 'I@horizon:server' state.sls horizon |
| 178 | node_name: {{ HOSTNAME_CFG01 }} |
| 179 | retry: {count: 1, delay: 5} |
| 180 | skip_fail: true |
| 181 | |
| 182 | - description: Deploy nginx proxy |
| 183 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 184 | -C 'I@nginx:server' state.sls nginx |
| 185 | node_name: {{ HOSTNAME_CFG01 }} |
| 186 | retry: {count: 1, delay: 5} |
| 187 | skip_fail: true |
| 188 | |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 189 | # Install compute node |
| 190 | |
| 191 | - description: Apply formulas for compute node |
| 192 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 193 | node_name: {{ HOSTNAME_CFG01 }} |
| 194 | retry: {count: 1, delay: 5} |
| 195 | skip_fail: true |
| 196 | |
| 197 | - description: Re-apply(as in doc) formulas for compute node |
| 198 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 199 | node_name: {{ HOSTNAME_CFG01 }} |
| 200 | retry: {count: 1, delay: 5} |
Oleksii Butenko | 9f2601c | 2018-02-08 15:13:21 +0200 | [diff] [blame] | 201 | skip_fail: false |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 202 | |
| 203 | - description: Check IP on computes |
| 204 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run |
| 205 | 'ip a' |
| 206 | node_name: {{ HOSTNAME_CFG01 }} |
| 207 | retry: {count: 10, delay: 30} |
| 208 | skip_fail: false |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 209 | |
| 210 | |
| 211 | # Upload cirros image |
| 212 | |
| 213 | - description: Upload cirros image on ctl01 |
| 214 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
ibumarskov | 2cea0d4 | 2018-07-24 08:40:50 +0400 | [diff] [blame] | 215 | 'wget http://images.mirantis.com.s3.amazonaws.com/cirros-x64-20170828.qcow2' |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 216 | node_name: {{ HOSTNAME_CFG01 }} |
| 217 | retry: {count: 2, delay: 30} |
| 218 | skip_fail: false |
| 219 | |
| 220 | - description: Register image in glance |
| 221 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
ibumarskov | 2cea0d4 | 2018-07-24 08:40:50 +0400 | [diff] [blame] | 222 | '. /root/keystonercv3; glance --timeout 120 image-create --name cirros --visibility public --disk-format qcow2 --container-format bare --progress < /root/cirros-x64-20170828.qcow2' |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 223 | node_name: {{ HOSTNAME_CFG01 }} |
| 224 | retry: {count: 1, delay: 30} |
| 225 | skip_fail: false |
| 226 | |
| 227 | - description: Create net04_external |
| 228 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
Tatyana Leontovich | 674abf8 | 2017-07-20 15:44:15 +0300 | [diff] [blame] | 229 | '. /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] | 230 | node_name: {{ HOSTNAME_CFG01 }} |
| 231 | retry: {count: 1, delay: 30} |
| 232 | skip_fail: false |
| 233 | |
| 234 | - description: Create subnet_external |
| 235 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 236 | '. /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' |
| 237 | node_name: {{ HOSTNAME_CFG01 }} |
| 238 | retry: {count: 1, delay: 30} |
| 239 | skip_fail: false |
| 240 | |
| 241 | - description: Create net04 |
| 242 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 243 | '. /root/keystonercv3; neutron net-create net04' |
| 244 | node_name: {{ HOSTNAME_CFG01 }} |
| 245 | retry: {count: 1, delay: 30} |
| 246 | skip_fail: false |
| 247 | |
| 248 | - description: Create subnet_net04 |
| 249 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 250 | '. /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' |
| 251 | node_name: {{ HOSTNAME_CFG01 }} |
| 252 | retry: {count: 1, delay: 30} |
| 253 | skip_fail: false |
| 254 | |
| 255 | - description: Create router |
| 256 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 257 | '. /root/keystonercv3; neutron router-create net04_router01' |
| 258 | node_name: {{ HOSTNAME_CFG01 }} |
| 259 | retry: {count: 1, delay: 30} |
| 260 | skip_fail: false |
| 261 | |
ibumarskov | c075df8 | 2018-07-30 13:23:07 +0400 | [diff] [blame^] | 262 | - description: Set gateway |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 263 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 264 | '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext' |
| 265 | node_name: {{ HOSTNAME_CFG01 }} |
| 266 | retry: {count: 1, delay: 30} |
| 267 | skip_fail: false |
| 268 | |
| 269 | - description: Add interface |
| 270 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 271 | '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet' |
| 272 | node_name: {{ HOSTNAME_CFG01 }} |
| 273 | retry: {count: 1, delay: 30} |
| 274 | skip_fail: false |
| 275 | |
| 276 | - description: Allow all tcp |
| 277 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 278 | '. /root/keystonercv3; nova secgroup-add-rule default tcp 1 65535 0.0.0.0/0' |
| 279 | node_name: {{ HOSTNAME_CFG01 }} |
| 280 | retry: {count: 1, delay: 30} |
| 281 | skip_fail: false |
| 282 | |
| 283 | - description: Allow all icmp |
| 284 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 285 | '. /root/keystonercv3; nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0' |
| 286 | node_name: {{ HOSTNAME_CFG01 }} |
| 287 | retry: {count: 1, delay: 30} |
| 288 | skip_fail: false |
| 289 | |
Tatyana Leontovich | fa31b39 | 2017-07-24 18:37:41 +0300 | [diff] [blame] | 290 | - description: sync time |
| 291 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run |
| 292 | 'service ntp stop; ntpd -gq; service ntp start' |
| 293 | node_name: {{ HOSTNAME_CFG01 }} |
| 294 | retry: {count: 1, delay: 30} |
| 295 | skip_fail: false |
| 296 | |
Tatyana Leontovich | fa31b39 | 2017-07-24 18:37:41 +0300 | [diff] [blame] | 297 | # Configure cinder-volume salt-call PROD-13167 |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 298 | - description: Set disks 01 |
| 299 | cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb' |
| 300 | node_name: {{ HOSTNAME_CTL01 }} |
| 301 | retry: {count: 1, delay: 30} |
| 302 | skip_fail: false |
| 303 | |
| 304 | - description: Set disks 02 |
| 305 | cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb' |
| 306 | node_name: {{ HOSTNAME_CTL02 }} |
| 307 | retry: {count: 1, delay: 30} |
| 308 | skip_fail: false |
| 309 | |
| 310 | - description: Set disks 03 |
| 311 | cmd: salt-call cmd.run 'echo -e "nn\np\n\n\n\nw" | fdisk /dev/vdb' |
| 312 | node_name: {{ HOSTNAME_CTL03 }} |
| 313 | retry: {count: 1, delay: 30} |
| 314 | skip_fail: false |
| 315 | |
| 316 | - description: Create partitions 01 |
| 317 | cmd: salt-call cmd.run 'pvcreate /dev/vdb1' |
| 318 | node_name: {{ HOSTNAME_CTL01 }} |
| 319 | retry: {count: 1, delay: 30} |
| 320 | skip_fail: false |
| 321 | |
| 322 | - description: Create partitions 02 |
| 323 | cmd: salt-call cmd.run 'pvcreate /dev/vdb1' |
sgudz | 2e39339 | 2017-10-17 12:51:26 +0300 | [diff] [blame] | 324 | node_name: {{ HOSTNAME_CTL02 }} |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 325 | retry: {count: 1, delay: 30} |
| 326 | skip_fail: false |
| 327 | |
| 328 | - description: Create partitions 03 |
| 329 | cmd: salt-call cmd.run 'pvcreate /dev/vdb1' |
sgudz | 2e39339 | 2017-10-17 12:51:26 +0300 | [diff] [blame] | 330 | node_name: {{ HOSTNAME_CTL03 }} |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 331 | retry: {count: 1, delay: 30} |
Tatyana Leontovich | 7c97e80 | 2017-07-19 17:08:39 +0300 | [diff] [blame] | 332 | skip_fail: false |
| 333 | |
| 334 | - description: create volume_group |
| 335 | cmd: salt "ctl*" cmd.run 'vgcreate cinder-volumes /dev/vdb1' |
| 336 | node_name: {{ HOSTNAME_CFG01 }} |
| 337 | retry: {count: 1, delay: 30} |
| 338 | skip_fail: false |
| 339 | |
| 340 | - description: Install cinder-volume |
| 341 | cmd: salt 'ctl*' cmd.run 'apt-get install cinder-volume -y' |
| 342 | node_name: {{ HOSTNAME_CFG01 }} |
| 343 | retry: {count: 1, delay: 30} |
| 344 | skip_fail: false |
| 345 | |
| 346 | - description: Install crudini |
| 347 | cmd: salt "ctl*" cmd.run 'apt-get install crudini -y' |
| 348 | node_name: {{ HOSTNAME_CFG01 }} |
| 349 | retry: {count: 1, delay: 30} |
| 350 | skip_fail: false |
| 351 | |
| 352 | - description: Temporary WR set enabled backends value 01 |
| 353 | cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm' |
| 354 | node_name: {{ HOSTNAME_CTL01 }} |
| 355 | retry: {count: 1, delay: 30} |
| 356 | skip_fail: false |
| 357 | |
| 358 | - description: Temporary WR set enabled backends value 02 |
| 359 | cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm' |
| 360 | node_name: {{ HOSTNAME_CTL02 }} |
| 361 | retry: {count: 1, delay: 30} |
| 362 | skip_fail: false |
| 363 | |
| 364 | - description: Temporary WR set enabled backends value 03 |
| 365 | cmd: salt-call cmd.run 'crudini --verbose --set /etc/cinder/cinder.conf DEFAULT enabled_backends lvm' |
| 366 | node_name: {{ HOSTNAME_CTL03 }} |
| 367 | retry: {count: 1, delay: 30} |
| 368 | skip_fail: false |
| 369 | |
| 370 | - description: Install docker.io on gtw |
| 371 | cmd: salt-call cmd.run 'apt-get install docker.io -y' |
| 372 | node_name: {{ HOSTNAME_GTW01 }} |
| 373 | retry: {count: 1, delay: 30} |
| 374 | skip_fail: false |
| 375 | |
Tatyana Leontovich | d6bcbc9 | 2018-03-23 15:02:28 +0200 | [diff] [blame] | 376 | - description: Enable forward policy |
| 377 | cmd: iptables --policy FORWARD ACCEPT |
| 378 | node_name: {{ HOSTNAME_GTW01 }} |
| 379 | retry: {count: 1, delay: 30} |
| 380 | skip_fail: false |
| 381 | |
Tatyana Leontovich | 47f7bfe | 2018-01-05 13:36:09 +0200 | [diff] [blame] | 382 | - description: Restart cinder volume |
| 383 | cmd: | |
| 384 | salt -C 'I@cinder:controller' service.restart cinder-volume; |
| 385 | node_name: {{ HOSTNAME_CFG01 }} |
| 386 | retry: {count: 2, delay: 5} |
| 387 | skip_fail: false |
| 388 | |
Tatyana Leontovich | 7c97e80 | 2017-07-19 17:08:39 +0300 | [diff] [blame] | 389 | - description: create rc file on cfg |
| 390 | cmd: scp ctl01:/root/keystonercv3 /root |
| 391 | node_name: {{ HOSTNAME_CFG01 }} |
| 392 | retry: {count: 1, delay: 30} |
| 393 | skip_fail: false |
| 394 | |
| 395 | - description: Copy rc file |
| 396 | cmd: scp /root/keystonercv3 gtw01:/root |
| 397 | node_name: {{ HOSTNAME_CFG01 }} |
| 398 | retry: {count: 1, delay: 30} |
| 399 | skip_fail: false |