Tatyana Leontovich | b0b68d9 | 2018-01-11 13:27:08 +0200 | [diff] [blame] | 1 | {% from 'virtual-mcp-pike-ovs/underlay.yaml' import HOSTNAME_CFG01 with context %} |
| 2 | {% from 'virtual-mcp-pike-ovs/underlay.yaml' import HOSTNAME_CTL01 with context %} |
| 3 | {% from 'virtual-mcp-pike-ovs/underlay.yaml' import HOSTNAME_CTL02 with context %} |
| 4 | {% from 'virtual-mcp-pike-ovs/underlay.yaml' import HOSTNAME_CTL03 with context %} |
| 5 | {% from 'virtual-mcp-pike-ovs/underlay.yaml' import HOSTNAME_GTW01 with context %} |
sgudz | 09e9aa9 | 2018-04-12 12:31:53 +0300 | [diff] [blame] | 6 | {% from 'virtual-mcp-pike-ovs/underlay.yaml' import LAB_CONFIG_NAME with context %} |
| 7 | {% from 'virtual-mcp-pike-ovs/underlay.yaml' import DOMAIN_NAME with context %} |
Oleksii Butenko | c05c9f6 | 2018-04-19 19:00:02 +0300 | [diff] [blame] | 8 | {% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %} |
| 9 | {% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %} |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame^] | 10 | |
sgudz | 09e9aa9 | 2018-04-12 12:31:53 +0300 | [diff] [blame] | 11 | {% import 'shared-salt.yaml' as SHARED with context %} |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame^] | 12 | {% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %} |
Tatyana Leontovich | 4f61367 | 2018-06-12 21:41:19 +0300 | [diff] [blame] | 13 | {% import 'shared-backup-restore.yaml' as BACKUP with context %} |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 14 | # Install OpenStack control services |
| 15 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame^] | 16 | {{ SHARED_OPENSTACK.MACRO_INSTALL_KEYSTONE(USE_ORCHESTRATE=false) }} |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 17 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame^] | 18 | {{ SHARED_OPENSTACK.MACRO_INSTALL_GLANCE() }} |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 19 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame^] | 20 | {{ SHARED_OPENSTACK.MACRO_INSTALL_NOVA() }} |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 21 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame^] | 22 | {{ SHARED_OPENSTACK.MACRO_INSTALL_CINDER() }} |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 23 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame^] | 24 | {{ SHARED_OPENSTACK.MACRO_INSTALL_NEUTRON() }} |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 25 | |
Tatyana Leontovich | b0b68d9 | 2018-01-11 13:27:08 +0200 | [diff] [blame] | 26 | # isntall designate |
| 27 | - description: Install bind |
| 28 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 29 | -C 'I@bind:server' state.sls bind |
| 30 | node_name: {{ HOSTNAME_CFG01 }} |
| 31 | retry: {count: 1, delay: 5} |
| 32 | skip_fail: false |
| 33 | |
| 34 | - description: Install designate |
| 35 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 36 | -C 'I@designate:server' state.sls designate -b 1 |
| 37 | node_name: {{ HOSTNAME_CFG01 }} |
| 38 | retry: {count: 5, delay: 10} |
| 39 | skip_fail: false |
| 40 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame^] | 41 | {{ SHARED_OPENSTACK.MACRO_INSTALL_HEAT() }} |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 42 | |
Dennis Dmitriev | d86ffa1 | 2018-03-15 22:07:51 +0200 | [diff] [blame] | 43 | # Install Telemetry services (mdb nodes) |
| 44 | - description: Install redis service |
| 45 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@redis:cluster:role:master' state.sls redis && |
| 46 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@redis:server' state.sls redis |
| 47 | node_name: {{ HOSTNAME_CFG01 }} |
| 48 | retry: {count: 1, delay: 5} |
| 49 | skip_fail: false |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 50 | |
Dennis Dmitriev | d86ffa1 | 2018-03-15 22:07:51 +0200 | [diff] [blame] | 51 | - description: Install gnocchi server |
| 52 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@gnocchi:server and *01*' state.sls gnocchi.server && |
| 53 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@gnocchi:server' state.sls gnocchi.server |
| 54 | node_name: {{ HOSTNAME_CFG01 }} |
| 55 | retry: {count: 1, delay: 5} |
| 56 | skip_fail: false |
| 57 | |
Dennis Dmitriev | 85145a6 | 2018-08-03 19:22:08 +0300 | [diff] [blame] | 58 | - description: Setup gnocchi client |
| 59 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@gnocchi:client and *01*' state.sls gnocchi.client && |
| 60 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@gnocchi:client' state.sls gnocchi.client |
| 61 | node_name: {{ HOSTNAME_CFG01 }} |
| 62 | retry: {count: 1, delay: 5} |
| 63 | skip_fail: false |
| 64 | |
Dennis Dmitriev | d86ffa1 | 2018-03-15 22:07:51 +0200 | [diff] [blame] | 65 | - description: Install panko server |
| 66 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@panko:server and *01*' state.sls panko && |
| 67 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@panko:server' state.sls panko |
| 68 | node_name: {{ HOSTNAME_CFG01 }} |
| 69 | retry: {count: 1, delay: 5} |
| 70 | skip_fail: false |
| 71 | |
Tatyana Leontovich | 51644ec | 2018-03-22 13:13:31 +0200 | [diff] [blame] | 72 | - description: Install ceilometer server on first node |
| 73 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceilometer:server and *01*' state.sls ceilometer |
Dennis Dmitriev | d86ffa1 | 2018-03-15 22:07:51 +0200 | [diff] [blame] | 74 | node_name: {{ HOSTNAME_CFG01 }} |
Tatyana Leontovich | 51644ec | 2018-03-22 13:13:31 +0200 | [diff] [blame] | 75 | retry: {count: 2, delay: 5} |
| 76 | skip_fail: false |
| 77 | |
| 78 | - description: Install ceilometer server on other nodes |
| 79 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceilometer:server' state.sls ceilometer |
| 80 | node_name: {{ HOSTNAME_CFG01 }} |
| 81 | retry: {count: 2, delay: 5} |
Dennis Dmitriev | d86ffa1 | 2018-03-15 22:07:51 +0200 | [diff] [blame] | 82 | skip_fail: false |
| 83 | |
| 84 | - description: Install aodh server |
| 85 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@aodh:server and *01*' state.sls aodh && |
| 86 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@aodh:server' state.sls aodh |
| 87 | node_name: {{ HOSTNAME_CFG01 }} |
| 88 | retry: {count: 1, delay: 5} |
| 89 | skip_fail: false |
| 90 | |
| 91 | # Install OpenStack dashboard and proxy services |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 92 | - description: Deploy horizon dashboard |
| 93 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 94 | -C 'I@horizon:server' state.sls horizon |
| 95 | node_name: {{ HOSTNAME_CFG01 }} |
| 96 | retry: {count: 1, delay: 5} |
| 97 | skip_fail: true |
| 98 | |
| 99 | - description: Deploy nginx proxy |
| 100 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 101 | -C 'I@nginx:server' state.sls nginx |
| 102 | node_name: {{ HOSTNAME_CFG01 }} |
| 103 | retry: {count: 1, delay: 5} |
| 104 | skip_fail: true |
| 105 | |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 106 | # Install compute node |
| 107 | |
| 108 | - description: Apply formulas for compute node |
| 109 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 110 | node_name: {{ HOSTNAME_CFG01 }} |
| 111 | retry: {count: 1, delay: 5} |
| 112 | skip_fail: true |
| 113 | |
| 114 | - description: Re-apply(as in doc) formulas for compute node |
| 115 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 116 | node_name: {{ HOSTNAME_CFG01 }} |
| 117 | retry: {count: 1, delay: 5} |
Oleksii Butenko | 9f2601c | 2018-02-08 15:13:21 +0200 | [diff] [blame] | 118 | skip_fail: false |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 119 | |
| 120 | - description: Check IP on computes |
| 121 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run |
| 122 | 'ip a' |
| 123 | node_name: {{ HOSTNAME_CFG01 }} |
| 124 | retry: {count: 10, delay: 30} |
| 125 | skip_fail: false |
| 126 | |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 127 | - description: Create net04_external |
| 128 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 129 | '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat' |
| 130 | node_name: {{ HOSTNAME_CFG01 }} |
| 131 | retry: {count: 1, delay: 30} |
| 132 | skip_fail: false |
| 133 | |
| 134 | - description: Create subnet_external |
| 135 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 136 | '. /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' |
| 137 | node_name: {{ HOSTNAME_CFG01 }} |
| 138 | retry: {count: 1, delay: 30} |
| 139 | skip_fail: false |
| 140 | |
| 141 | - description: Create net04 |
| 142 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 143 | '. /root/keystonercv3; neutron net-create net04' |
| 144 | node_name: {{ HOSTNAME_CFG01 }} |
| 145 | retry: {count: 1, delay: 30} |
| 146 | skip_fail: false |
| 147 | |
| 148 | - description: Create subnet_net04 |
| 149 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
Tatyana Leontovich | 7305c41 | 2018-04-27 00:26:27 +0300 | [diff] [blame] | 150 | '. /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 }}.180' |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 151 | node_name: {{ HOSTNAME_CFG01 }} |
| 152 | retry: {count: 1, delay: 30} |
| 153 | skip_fail: false |
| 154 | |
| 155 | - description: Create router |
| 156 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 157 | '. /root/keystonercv3; neutron router-create net04_router01' |
| 158 | node_name: {{ HOSTNAME_CFG01 }} |
| 159 | retry: {count: 1, delay: 30} |
| 160 | skip_fail: false |
| 161 | |
| 162 | - description: Set geteway |
| 163 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 164 | '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext' |
| 165 | node_name: {{ HOSTNAME_CFG01 }} |
| 166 | retry: {count: 1, delay: 30} |
| 167 | skip_fail: false |
| 168 | |
| 169 | - description: Add interface |
| 170 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 171 | '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet' |
| 172 | node_name: {{ HOSTNAME_CFG01 }} |
| 173 | retry: {count: 1, delay: 30} |
| 174 | skip_fail: false |
| 175 | |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 176 | - description: sync time |
| 177 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run |
| 178 | 'service ntp stop; ntpd -gq; service ntp start' |
| 179 | node_name: {{ HOSTNAME_CFG01 }} |
| 180 | retry: {count: 1, delay: 30} |
| 181 | skip_fail: false |
| 182 | |
sgudz | be155c2 | 2018-03-22 13:12:13 +0200 | [diff] [blame] | 183 | - description: Install manila-api on first node |
| 184 | cmd: | |
| 185 | salt -C 'I@manila:api and *01*' state.sls manila.api; |
| 186 | node_name: {{ HOSTNAME_CFG01 }} |
| 187 | retry: {count: 1, delay: 5} |
| 188 | skip_fail: false |
| 189 | |
| 190 | - description: Install manila-api on other nodes |
| 191 | cmd: | |
| 192 | salt -C 'I@manila:api and not *01*' state.sls manila.api; |
| 193 | node_name: {{ HOSTNAME_CFG01 }} |
| 194 | retry: {count: 1, delay: 5} |
| 195 | skip_fail: false |
| 196 | |
| 197 | - description: Install manila-scheduler |
| 198 | cmd: | |
| 199 | salt -C 'I@manila:scheduler' state.sls manila.scheduler; |
| 200 | node_name: {{ HOSTNAME_CFG01 }} |
| 201 | retry: {count: 1, delay: 5} |
| 202 | skip_fail: false |
| 203 | |
| 204 | - description: Install manila-share |
| 205 | cmd: | |
| 206 | salt -C 'I@manila:share' state.sls manila.share; |
| 207 | node_name: {{ HOSTNAME_CFG01 }} |
| 208 | retry: {count: 1, delay: 5} |
| 209 | skip_fail: false |
| 210 | |
Tatyana Leontovich | 3cc1c13 | 2018-04-03 00:41:17 +0300 | [diff] [blame] | 211 | - description: WR https://mirantis.jira.com/browse/PROD-19012 |
| 212 | cmd: | |
Tatyana Leontovich | 1618a2a | 2018-04-03 10:19:25 +0300 | [diff] [blame] | 213 | salt 'ctl*' cmd.run 'systemctl restart apache2' |
Tatyana Leontovich | 3cc1c13 | 2018-04-03 00:41:17 +0300 | [diff] [blame] | 214 | node_name: {{ HOSTNAME_CFG01 }} |
| 215 | retry: {count: 1, delay: 5} |
| 216 | skip_fail: false |
| 217 | |
sgudz | be155c2 | 2018-03-22 13:12:13 +0200 | [diff] [blame] | 218 | - description: Check manila-services |
| 219 | cmd: | |
| 220 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila service-list' |
| 221 | node_name: {{ HOSTNAME_CFG01 }} |
Tatyana Leontovich | 1618a2a | 2018-04-03 10:19:25 +0300 | [diff] [blame] | 222 | retry: {count: 3, delay: 15} |
sgudz | be155c2 | 2018-03-22 13:12:13 +0200 | [diff] [blame] | 223 | skip_fail: false |
| 224 | |
Maksym Shalamov | ae15a77 | 2018-07-20 13:13:29 +0300 | [diff] [blame] | 225 | - description: Create manila type |
| 226 | cmd: | |
| 227 | salt 'cfg01*' state.sls manila.client |
| 228 | node_name: {{ HOSTNAME_CFG01 }} |
| 229 | retry: {count: 1, delay: 5} |
| 230 | skip_fail: false |
| 231 | |
sgudz | be155c2 | 2018-03-22 13:12:13 +0200 | [diff] [blame] | 232 | - description: Create CIFS and NFS share and check it status |
| 233 | cmd: | |
| 234 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create CIFS 1 --share-type=default'; |
| 235 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create NFS 1 --share-type=default'; |
| 236 | sleep 5; |
| 237 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila list'; |
| 238 | node_name: {{ HOSTNAME_CFG01 }} |
| 239 | retry: {count: 1, delay: 5} |
| 240 | skip_fail: false |
sgudz | 09e9aa9 | 2018-04-12 12:31:53 +0300 | [diff] [blame] | 241 | |
Tatyana Leontovich | 92063ef | 2018-07-04 14:28:09 +0300 | [diff] [blame] | 242 | {{ BACKUP.MACRO_WR_NGINX_MASTER() }} |
Tatyana Leontovich | 4f61367 | 2018-06-12 21:41:19 +0300 | [diff] [blame] | 243 | {{ BACKUP.MACRO_BACKUP_BACKUPNINJA() }} |
| 244 | {{ BACKUP.MACRO_BACKUP_XTRABACKUP() }} |
Oleksii Butenko | 5cd0a16 | 2018-06-14 18:18:10 +0300 | [diff] [blame] | 245 | {{ SHARED.INSTALL_DOCKER_ON_GTW() }} |