Tatyana Leontovich | c447b12 | 2018-02-22 12:30:42 +0200 | [diff] [blame] | 1 | {% from 'virtual-mcp-pike-dvr-ssl/underlay.yaml' import HOSTNAME_CFG01 with context %} |
| 2 | {% from 'virtual-mcp-pike-dvr-ssl/underlay.yaml' import HOSTNAME_CTL01 with context %} |
| 3 | {% from 'virtual-mcp-pike-dvr-ssl/underlay.yaml' import HOSTNAME_CTL02 with context %} |
| 4 | {% from 'virtual-mcp-pike-dvr-ssl/underlay.yaml' import HOSTNAME_CTL03 with context %} |
| 5 | {% from 'virtual-mcp-pike-dvr-ssl/underlay.yaml' import HOSTNAME_GTW01 with context %} |
Oleksii Butenko | c05c9f6 | 2018-04-19 19:00:02 +0300 | [diff] [blame] | 6 | {% from 'virtual-mcp-pike-dvr-ssl/underlay.yaml' import LAB_CONFIG_NAME with context %} |
| 7 | {% from 'virtual-mcp-pike-dvr-ssl/underlay.yaml' import DOMAIN_NAME with context %} |
Tatyana Leontovich | c447b12 | 2018-02-22 12:30:42 +0200 | [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 %} |
Tatyana Leontovich | c447b12 | 2018-02-22 12:30:42 +0200 | [diff] [blame] | 10 | {% set OVERRIDE_POLICY = os_env('OVERRIDE_POLICY', '') %} |
Oleksii Butenko | c05c9f6 | 2018-04-19 19:00:02 +0300 | [diff] [blame] | 11 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 12 | {% import 'shared-salt.yaml' as SHARED with context %} |
| 13 | {% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %} |
Tatyana Leontovich | c447b12 | 2018-02-22 12:30:42 +0200 | [diff] [blame] | 14 | |
| 15 | # Install OpenStack control services |
| 16 | |
| 17 | {%- if OVERRIDE_POLICY != '' %} |
| 18 | - description: Upload policy override |
| 19 | upload: |
| 20 | local_path: {{ config.salt_deploy.templates_dir }}{{ LAB_CONFIG_NAME }}/ |
| 21 | local_filename: overrides-policy.yml |
| 22 | remote_path: /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/ |
| 23 | node_name: {{ HOSTNAME_CFG01 }} |
| 24 | |
| 25 | - description: Create custom cluster control class |
| 26 | 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 |
| 27 | node_name: {{ HOSTNAME_CFG01 }} |
| 28 | |
| 29 | - description: Rename control classes |
| 30 | 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 && |
| 31 | 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 && |
| 32 | salt --hard-crash --state-output=mixed --state-verbose=False '*' saltutil.sync_all && |
| 33 | salt --hard-crash --state-output=mixed --state-verbose=False '*' saltutil.refresh_pillar |
| 34 | node_name: {{ HOSTNAME_CFG01 }} |
| 35 | {%- endif %} |
| 36 | |
| 37 | - description: Nginx |
| 38 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 39 | -C 'I@nginx:server' state.sls salt.minion |
| 40 | node_name: {{ HOSTNAME_CFG01 }} |
| 41 | retry: {count: 1, delay: 5} |
| 42 | skip_fail: true |
| 43 | |
| 44 | - description: Deploy nginx proxy |
| 45 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 46 | -C 'I@nginx:server' state.sls nginx |
| 47 | node_name: {{ HOSTNAME_CFG01 }} |
| 48 | retry: {count: 1, delay: 5} |
| 49 | skip_fail: true |
| 50 | |
sgudz | 62df2fc | 2018-10-09 12:26:19 +0300 | [diff] [blame] | 51 | {{ SHARED_OPENSTACK.MACRO_INSTALL_KEYSTONE() }} |
Tatyana Leontovich | c447b12 | 2018-02-22 12:30:42 +0200 | [diff] [blame] | 52 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 53 | {{ SHARED_OPENSTACK.MACRO_INSTALL_GLANCE() }} |
Tatyana Leontovich | c447b12 | 2018-02-22 12:30:42 +0200 | [diff] [blame] | 54 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 55 | {{ SHARED_OPENSTACK.MACRO_INSTALL_NOVA() }} |
Tatyana Leontovich | c447b12 | 2018-02-22 12:30:42 +0200 | [diff] [blame] | 56 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 57 | {{ SHARED_OPENSTACK.MACRO_INSTALL_CINDER() }} |
Tatyana Leontovich | c447b12 | 2018-02-22 12:30:42 +0200 | [diff] [blame] | 58 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 59 | {{ SHARED_OPENSTACK.MACRO_INSTALL_NEUTRON() }} |
Tatyana Leontovich | c447b12 | 2018-02-22 12:30:42 +0200 | [diff] [blame] | 60 | |
| 61 | # isntall designate |
| 62 | - description: Install powerdns |
| 63 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 64 | -C 'I@powerdns:server' state.sls powerdns.server |
| 65 | node_name: {{ HOSTNAME_CFG01 }} |
| 66 | retry: {count: 1, delay: 5} |
| 67 | skip_fail: false |
| 68 | |
| 69 | - description: Install designate |
| 70 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 71 | -C 'I@designate:server' state.sls designate -b 1 |
| 72 | node_name: {{ HOSTNAME_CFG01 }} |
| 73 | retry: {count: 5, delay: 10} |
| 74 | skip_fail: false |
| 75 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 76 | {{ SHARED_OPENSTACK.MACRO_INSTALL_HEAT() }} |
Tatyana Leontovich | c447b12 | 2018-02-22 12:30:42 +0200 | [diff] [blame] | 77 | |
| 78 | - description: Deploy horizon dashboard |
| 79 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 80 | -C 'I@horizon:server' state.sls horizon |
| 81 | node_name: {{ HOSTNAME_CFG01 }} |
| 82 | retry: {count: 1, delay: 5} |
| 83 | skip_fail: true |
| 84 | |
| 85 | # Install compute node |
| 86 | |
| 87 | - description: Apply formulas for compute node |
| 88 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 89 | node_name: {{ HOSTNAME_CFG01 }} |
| 90 | retry: {count: 1, delay: 5} |
| 91 | skip_fail: true |
| 92 | |
| 93 | - description: Re-apply(as in doc) formulas for compute node |
| 94 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 95 | node_name: {{ HOSTNAME_CFG01 }} |
| 96 | retry: {count: 1, delay: 5} |
| 97 | skip_fail: false |
| 98 | |
| 99 | - description: Check IP on computes |
| 100 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run |
| 101 | 'ip a' |
| 102 | node_name: {{ HOSTNAME_CFG01 }} |
| 103 | retry: {count: 10, delay: 30} |
| 104 | skip_fail: false |
| 105 | |
sgudz | 3fd4454 | 2018-04-02 11:45:49 +0300 | [diff] [blame] | 106 | - description: Install manila-api on first node |
| 107 | cmd: | |
| 108 | salt -C 'I@manila:api and *01*' state.sls manila.api; |
| 109 | node_name: {{ HOSTNAME_CFG01 }} |
| 110 | retry: {count: 1, delay: 5} |
| 111 | skip_fail: false |
| 112 | |
| 113 | - description: Install manila-api on other nodes |
| 114 | cmd: | |
| 115 | salt -C 'I@manila:api and not *01*' state.sls manila.api; |
| 116 | node_name: {{ HOSTNAME_CFG01 }} |
| 117 | retry: {count: 1, delay: 5} |
| 118 | skip_fail: false |
| 119 | |
| 120 | - description: Install manila-scheduler |
| 121 | cmd: | |
| 122 | salt -C 'I@manila:scheduler' state.sls manila.scheduler; |
| 123 | node_name: {{ HOSTNAME_CFG01 }} |
| 124 | retry: {count: 1, delay: 5} |
| 125 | skip_fail: false |
| 126 | |
| 127 | - description: Install manila-share |
| 128 | cmd: | |
| 129 | salt -C 'I@manila:share' state.sls manila.share; |
| 130 | node_name: {{ HOSTNAME_CFG01 }} |
| 131 | retry: {count: 1, delay: 5} |
| 132 | skip_fail: false |
| 133 | |
Tatyana Leontovich | 3cc1c13 | 2018-04-03 00:41:17 +0300 | [diff] [blame] | 134 | - description: WR https://mirantis.jira.com/browse/PROD-19012 |
| 135 | cmd: | |
Tatyana Leontovich | 1618a2a | 2018-04-03 10:19:25 +0300 | [diff] [blame] | 136 | salt 'ctl*' cmd.run 'systemctl restart apache2' |
Tatyana Leontovich | 3cc1c13 | 2018-04-03 00:41:17 +0300 | [diff] [blame] | 137 | node_name: {{ HOSTNAME_CFG01 }} |
| 138 | retry: {count: 1, delay: 5} |
| 139 | skip_fail: false |
| 140 | |
sgudz | 3fd4454 | 2018-04-02 11:45:49 +0300 | [diff] [blame] | 141 | - description: Check manila-services |
| 142 | cmd: | |
| 143 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila service-list' |
| 144 | node_name: {{ HOSTNAME_CFG01 }} |
Tatyana Leontovich | 1618a2a | 2018-04-03 10:19:25 +0300 | [diff] [blame] | 145 | retry: {count: 3, delay: 15} |
sgudz | 3fd4454 | 2018-04-02 11:45:49 +0300 | [diff] [blame] | 146 | skip_fail: false |
| 147 | |
Maksym Shalamov | ae15a77 | 2018-07-20 13:13:29 +0300 | [diff] [blame] | 148 | - description: Create manila type |
| 149 | cmd: | |
| 150 | salt 'cfg01*' state.sls manila.client |
| 151 | node_name: {{ HOSTNAME_CFG01 }} |
| 152 | retry: {count: 1, delay: 5} |
| 153 | skip_fail: false |
| 154 | |
sgudz | 3fd4454 | 2018-04-02 11:45:49 +0300 | [diff] [blame] | 155 | - description: Create CIFS and NFS share and check it status |
| 156 | cmd: | |
| 157 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create CIFS 1 --share-type=default'; |
| 158 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create NFS 1 --share-type=default'; |
| 159 | sleep 5; |
| 160 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila list'; |
| 161 | node_name: {{ HOSTNAME_CFG01 }} |
Oleksii Butenko | a561a8a | 2018-05-08 15:12:26 +0300 | [diff] [blame] | 162 | retry: {count: 3, delay: 5} |
sgudz | 3fd4454 | 2018-04-02 11:45:49 +0300 | [diff] [blame] | 163 | skip_fail: false |
Oleksii Butenko | 5cd0a16 | 2018-06-14 18:18:10 +0300 | [diff] [blame] | 164 | |