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