Tatyana Leontovich | b0b68d9 | 2018-01-11 13:27:08 +0200 | [diff] [blame] | 1 | {% from 'virtual-mcp-pike-ovs-ceph/underlay.yaml' import HOSTNAME_CFG01 with context %} |
| 2 | {% from 'virtual-mcp-pike-ovs-ceph/underlay.yaml' import HOSTNAME_CTL01 with context %} |
| 3 | {% from 'virtual-mcp-pike-ovs-ceph/underlay.yaml' import HOSTNAME_CTL02 with context %} |
| 4 | {% from 'virtual-mcp-pike-ovs-ceph/underlay.yaml' import HOSTNAME_CTL03 with context %} |
| 5 | {% from 'virtual-mcp-pike-ovs-ceph/underlay.yaml' import HOSTNAME_GTW01 with context %} |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +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 %} |
| 8 | |
Oleksii Butenko | 5cd0a16 | 2018-06-14 18:18:10 +0300 | [diff] [blame] | 9 | {% import 'shared-salt.yaml' as SHARED with context %} |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 10 | {% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %} |
Oleksii Butenko | 5cd0a16 | 2018-06-14 18:18:10 +0300 | [diff] [blame] | 11 | |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 12 | # Install OpenStack control services |
| 13 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 14 | {{ SHARED_OPENSTACK.MACRO_INSTALL_KEYSTONE(USE_ORCHESTRATE=false) }} |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 15 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 16 | {{ SHARED_OPENSTACK.MACRO_INSTALL_GLANCE() }} |
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_NOVA() }} |
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_CINDER() }} |
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_NEUTRON() }} |
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_HEAT() }} |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 25 | |
| 26 | - description: Deploy horizon dashboard |
| 27 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 28 | -C 'I@horizon:server' state.sls horizon |
| 29 | node_name: {{ HOSTNAME_CFG01 }} |
| 30 | retry: {count: 1, delay: 5} |
| 31 | skip_fail: true |
| 32 | |
| 33 | - description: Deploy nginx proxy |
| 34 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 35 | -C 'I@nginx:server' state.sls nginx |
| 36 | node_name: {{ HOSTNAME_CFG01 }} |
| 37 | retry: {count: 1, delay: 5} |
| 38 | skip_fail: true |
| 39 | |
| 40 | |
| 41 | # Install compute node |
| 42 | |
| 43 | - description: Apply formulas for compute node |
| 44 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 45 | node_name: {{ HOSTNAME_CFG01 }} |
| 46 | retry: {count: 1, delay: 5} |
| 47 | skip_fail: true |
| 48 | |
| 49 | - description: Re-apply(as in doc) formulas for compute node |
| 50 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 51 | node_name: {{ HOSTNAME_CFG01 }} |
| 52 | retry: {count: 1, delay: 5} |
Oleksii Butenko | 9f2601c | 2018-02-08 15:13:21 +0200 | [diff] [blame] | 53 | skip_fail: false |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 54 | |
| 55 | - description: Check IP on computes |
| 56 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run |
| 57 | 'ip a' |
| 58 | node_name: {{ HOSTNAME_CFG01 }} |
| 59 | retry: {count: 10, delay: 30} |
| 60 | skip_fail: false |
| 61 | |
| 62 | |
| 63 | # Upload cirros image |
| 64 | |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 65 | - description: Create net04_external |
| 66 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 67 | '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat' |
| 68 | node_name: {{ HOSTNAME_CFG01 }} |
| 69 | retry: {count: 1, delay: 30} |
| 70 | skip_fail: false |
| 71 | |
| 72 | - description: Create subnet_external |
| 73 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 74 | '. /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' |
| 75 | node_name: {{ HOSTNAME_CFG01 }} |
| 76 | retry: {count: 1, delay: 30} |
| 77 | skip_fail: false |
| 78 | |
| 79 | - description: Create net04 |
| 80 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 81 | '. /root/keystonercv3; neutron net-create net04' |
| 82 | node_name: {{ HOSTNAME_CFG01 }} |
| 83 | retry: {count: 1, delay: 30} |
| 84 | skip_fail: false |
| 85 | |
| 86 | - description: Create subnet_net04 |
| 87 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 88 | '. /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' |
| 89 | node_name: {{ HOSTNAME_CFG01 }} |
| 90 | retry: {count: 1, delay: 30} |
| 91 | skip_fail: false |
| 92 | |
| 93 | - description: Create router |
| 94 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 95 | '. /root/keystonercv3; neutron router-create net04_router01' |
| 96 | node_name: {{ HOSTNAME_CFG01 }} |
| 97 | retry: {count: 1, delay: 30} |
| 98 | skip_fail: false |
| 99 | |
| 100 | - description: Set geteway |
| 101 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 102 | '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext' |
| 103 | node_name: {{ HOSTNAME_CFG01 }} |
| 104 | retry: {count: 1, delay: 30} |
| 105 | skip_fail: false |
| 106 | |
| 107 | - description: Add interface |
| 108 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 109 | '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet' |
| 110 | node_name: {{ HOSTNAME_CFG01 }} |
| 111 | retry: {count: 1, delay: 30} |
| 112 | skip_fail: false |
| 113 | |
Tatyana Leontovich | 56005da | 2017-12-11 13:16:51 +0200 | [diff] [blame] | 114 | - description: sync time |
| 115 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run |
| 116 | 'service ntp stop; ntpd -gq; service ntp start' |
| 117 | node_name: {{ HOSTNAME_CFG01 }} |
| 118 | retry: {count: 1, delay: 30} |
| 119 | skip_fail: false |