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 | |
sgudz | 62df2fc | 2018-10-09 12:26:19 +0300 | [diff] [blame] | 16 | {{ SHARED_OPENSTACK.MACRO_INSTALL_KEYSTONE() }} |
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 | |
sgudz | be155c2 | 2018-03-22 13:12:13 +0200 | [diff] [blame] | 127 | - description: Install manila-api on first node |
| 128 | cmd: | |
| 129 | salt -C 'I@manila:api and *01*' state.sls manila.api; |
| 130 | node_name: {{ HOSTNAME_CFG01 }} |
| 131 | retry: {count: 1, delay: 5} |
| 132 | skip_fail: false |
| 133 | |
| 134 | - description: Install manila-api on other nodes |
| 135 | cmd: | |
| 136 | salt -C 'I@manila:api and not *01*' state.sls manila.api; |
| 137 | node_name: {{ HOSTNAME_CFG01 }} |
| 138 | retry: {count: 1, delay: 5} |
| 139 | skip_fail: false |
| 140 | |
| 141 | - description: Install manila-scheduler |
| 142 | cmd: | |
| 143 | salt -C 'I@manila:scheduler' state.sls manila.scheduler; |
| 144 | node_name: {{ HOSTNAME_CFG01 }} |
| 145 | retry: {count: 1, delay: 5} |
| 146 | skip_fail: false |
| 147 | |
| 148 | - description: Install manila-share |
| 149 | cmd: | |
| 150 | salt -C 'I@manila:share' state.sls manila.share; |
| 151 | node_name: {{ HOSTNAME_CFG01 }} |
| 152 | retry: {count: 1, delay: 5} |
| 153 | skip_fail: false |
| 154 | |
Tatyana Leontovich | 3cc1c13 | 2018-04-03 00:41:17 +0300 | [diff] [blame] | 155 | - description: WR https://mirantis.jira.com/browse/PROD-19012 |
| 156 | cmd: | |
Tatyana Leontovich | 1618a2a | 2018-04-03 10:19:25 +0300 | [diff] [blame] | 157 | salt 'ctl*' cmd.run 'systemctl restart apache2' |
Tatyana Leontovich | 3cc1c13 | 2018-04-03 00:41:17 +0300 | [diff] [blame] | 158 | node_name: {{ HOSTNAME_CFG01 }} |
| 159 | retry: {count: 1, delay: 5} |
| 160 | skip_fail: false |
| 161 | |
sgudz | be155c2 | 2018-03-22 13:12:13 +0200 | [diff] [blame] | 162 | - description: Check manila-services |
| 163 | cmd: | |
| 164 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila service-list' |
| 165 | node_name: {{ HOSTNAME_CFG01 }} |
Tatyana Leontovich | 1618a2a | 2018-04-03 10:19:25 +0300 | [diff] [blame] | 166 | retry: {count: 3, delay: 15} |
sgudz | be155c2 | 2018-03-22 13:12:13 +0200 | [diff] [blame] | 167 | skip_fail: false |
| 168 | |
Maksym Shalamov | ae15a77 | 2018-07-20 13:13:29 +0300 | [diff] [blame] | 169 | - description: Create manila type |
| 170 | cmd: | |
| 171 | salt 'cfg01*' state.sls manila.client |
| 172 | node_name: {{ HOSTNAME_CFG01 }} |
| 173 | retry: {count: 1, delay: 5} |
| 174 | skip_fail: false |
| 175 | |
sgudz | be155c2 | 2018-03-22 13:12:13 +0200 | [diff] [blame] | 176 | - description: Create CIFS and NFS share and check it status |
| 177 | cmd: | |
| 178 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create CIFS 1 --share-type=default'; |
| 179 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create NFS 1 --share-type=default'; |
| 180 | sleep 5; |
| 181 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila list'; |
| 182 | node_name: {{ HOSTNAME_CFG01 }} |
| 183 | retry: {count: 1, delay: 5} |
| 184 | skip_fail: false |
sgudz | 09e9aa9 | 2018-04-12 12:31:53 +0300 | [diff] [blame] | 185 | |
Tatyana Leontovich | 92063ef | 2018-07-04 14:28:09 +0300 | [diff] [blame] | 186 | {{ BACKUP.MACRO_WR_NGINX_MASTER() }} |
Tatyana Leontovich | 4f61367 | 2018-06-12 21:41:19 +0300 | [diff] [blame] | 187 | {{ BACKUP.MACRO_BACKUP_BACKUPNINJA() }} |
sgudz | 62df2fc | 2018-10-09 12:26:19 +0300 | [diff] [blame] | 188 | {{ BACKUP.MACRO_BACKUP_XTRABACKUP() }} |