Dennis Dmitriev | ab83ea4 | 2017-05-12 16:52:45 +0300 | [diff] [blame] | 1 | {% from 'virtual-mcp-ocata-ovs/underlay.yaml' import HOSTNAME_CFG01 with context %} |
Tatyana Leontovich | 47dbd3a | 2017-06-22 17:36:53 +0300 | [diff] [blame] | 2 | {% from 'virtual-mcp-ocata-ovs/underlay.yaml' import HOSTNAME_CTL01 with context %} |
| 3 | {% from 'virtual-mcp-ocata-ovs/underlay.yaml' import HOSTNAME_CTL02 with context %} |
| 4 | {% from 'virtual-mcp-ocata-ovs/underlay.yaml' import HOSTNAME_CTL03 with context %} |
Tatyana Leontovich | ac38bac | 2017-07-17 14:05:33 +0300 | [diff] [blame] | 5 | {% from 'virtual-mcp-ocata-ovs/underlay.yaml' import HOSTNAME_GTW01 with context %} |
Sergii Golovatiuk | 50f9189 | 2017-08-04 18:11:06 +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 %} |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 8 | |
ibumarskov | 942417e | 2018-08-23 22:05:59 +0400 | [diff] [blame] | 9 | {% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %} |
| 10 | |
ibumarskov | 7bdc7ed | 2018-08-24 12:06:38 +0400 | [diff] [blame] | 11 | # Deploy nginx before openstack services (PROD-22740) |
| 12 | - description: Deploy nginx proxy |
| 13 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 14 | -C 'I@nginx:server' state.sls nginx |
| 15 | node_name: {{ HOSTNAME_CFG01 }} |
| 16 | retry: {count: 1, delay: 5} |
| 17 | skip_fail: true |
| 18 | |
sgudz | 62df2fc | 2018-10-09 12:26:19 +0300 | [diff] [blame] | 19 | {{ SHARED_OPENSTACK.MACRO_INSTALL_KEYSTONE() }} |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 20 | |
ibumarskov | 7e88667 | 2018-08-23 13:52:13 +0400 | [diff] [blame] | 21 | {{ SHARED_OPENSTACK.MACRO_INSTALL_GLANCE() }} |
ibumarskov | e23c10e | 2018-08-20 15:47:58 +0400 | [diff] [blame] | 22 | |
ibumarskov | 7e88667 | 2018-08-23 13:52:13 +0400 | [diff] [blame] | 23 | {{ SHARED_OPENSTACK.MACRO_INSTALL_NOVA() }} |
Dennis Dmitriev | 4ab889c | 2017-04-27 14:11:04 +0300 | [diff] [blame] | 24 | |
ibumarskov | 7e88667 | 2018-08-23 13:52:13 +0400 | [diff] [blame] | 25 | {{ SHARED_OPENSTACK.MACRO_INSTALL_CINDER() }} |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 26 | |
ibumarskov | 7e88667 | 2018-08-23 13:52:13 +0400 | [diff] [blame] | 27 | {{ SHARED_OPENSTACK.MACRO_INSTALL_NEUTRON() }} |
Tatyana Leontovich | fa7ae4d | 2017-04-25 13:46:14 +0300 | [diff] [blame] | 28 | |
ibumarskov | 7e88667 | 2018-08-23 13:52:13 +0400 | [diff] [blame] | 29 | {{ SHARED_OPENSTACK.MACRO_INSTALL_HEAT() }} |
Tatyana Leontovich | fa7ae4d | 2017-04-25 13:46:14 +0300 | [diff] [blame] | 30 | |
ibumarskov | 7e88667 | 2018-08-23 13:52:13 +0400 | [diff] [blame] | 31 | # install designate backend |
Tatyana Leontovich | 85e822a | 2017-06-15 11:52:01 +0300 | [diff] [blame] | 32 | - description: Install bind |
| 33 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Tatyana Leontovich | 033aac0 | 2017-06-15 15:01:21 +0300 | [diff] [blame] | 34 | -C 'I@bind:server' state.sls bind |
Tatyana Leontovich | 85e822a | 2017-06-15 11:52:01 +0300 | [diff] [blame] | 35 | node_name: {{ HOSTNAME_CFG01 }} |
| 36 | retry: {count: 1, delay: 5} |
| 37 | skip_fail: false |
| 38 | |
ibumarskov | 7e88667 | 2018-08-23 13:52:13 +0400 | [diff] [blame] | 39 | {{ SHARED_OPENSTACK.MACRO_INSTALL_DESIGNATE() }} |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 40 | |
ibumarskov | 7e88667 | 2018-08-23 13:52:13 +0400 | [diff] [blame] | 41 | {{ SHARED_OPENSTACK.MACRO_INSTALL_HORIZON() }} |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 42 | |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 43 | # Install compute node |
| 44 | |
| 45 | - description: Apply formulas for compute node |
| 46 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 47 | node_name: {{ HOSTNAME_CFG01 }} |
| 48 | retry: {count: 1, delay: 5} |
| 49 | skip_fail: true |
| 50 | |
| 51 | - description: Re-apply(as in doc) formulas for compute node |
| 52 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 53 | node_name: {{ HOSTNAME_CFG01 }} |
| 54 | retry: {count: 1, delay: 5} |
Oleksii Butenko | 9f2601c | 2018-02-08 15:13:21 +0200 | [diff] [blame] | 55 | skip_fail: false |
Tatyana Leontovich | 38be41b | 2017-04-12 14:45:23 +0300 | [diff] [blame] | 56 | |
| 57 | - description: Check IP on computes |
| 58 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run |
| 59 | 'ip a' |
| 60 | node_name: {{ HOSTNAME_CFG01 }} |
| 61 | retry: {count: 10, delay: 30} |
| 62 | skip_fail: false |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 63 | |
| 64 | |
| 65 | # Upload cirros image |
| 66 | |
| 67 | - description: Upload cirros image on ctl01 |
| 68 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
ibumarskov | 2cea0d4 | 2018-07-24 08:40:50 +0400 | [diff] [blame] | 69 | 'wget http://images.mirantis.com.s3.amazonaws.com/cirros-x64-20170828.qcow2' |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 70 | node_name: {{ HOSTNAME_CFG01 }} |
| 71 | retry: {count: 2, delay: 30} |
| 72 | skip_fail: false |
| 73 | |
| 74 | - description: Register image in glance |
| 75 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
ibumarskov | 2cea0d4 | 2018-07-24 08:40:50 +0400 | [diff] [blame] | 76 | '. /root/keystonercv3; glance --timeout 120 image-create --name cirros --visibility public --disk-format qcow2 --container-format bare --progress < /root/cirros-x64-20170828.qcow2' |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 77 | node_name: {{ HOSTNAME_CFG01 }} |
| 78 | retry: {count: 1, delay: 30} |
| 79 | skip_fail: false |
| 80 | |
| 81 | - description: Create net04_external |
| 82 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
Tatyana Leontovich | 674abf8 | 2017-07-20 15:44:15 +0300 | [diff] [blame] | 83 | '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat' |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 84 | node_name: {{ HOSTNAME_CFG01 }} |
| 85 | retry: {count: 1, delay: 30} |
| 86 | skip_fail: false |
| 87 | |
| 88 | - description: Create subnet_external |
| 89 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 90 | '. /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' |
| 91 | node_name: {{ HOSTNAME_CFG01 }} |
| 92 | retry: {count: 1, delay: 30} |
| 93 | skip_fail: false |
| 94 | |
| 95 | - description: Create net04 |
| 96 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 97 | '. /root/keystonercv3; neutron net-create net04' |
| 98 | node_name: {{ HOSTNAME_CFG01 }} |
| 99 | retry: {count: 1, delay: 30} |
| 100 | skip_fail: false |
| 101 | |
| 102 | - description: Create subnet_net04 |
| 103 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 104 | '. /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' |
| 105 | node_name: {{ HOSTNAME_CFG01 }} |
| 106 | retry: {count: 1, delay: 30} |
| 107 | skip_fail: false |
| 108 | |
| 109 | - description: Create router |
| 110 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 111 | '. /root/keystonercv3; neutron router-create net04_router01' |
| 112 | node_name: {{ HOSTNAME_CFG01 }} |
| 113 | retry: {count: 1, delay: 30} |
| 114 | skip_fail: false |
| 115 | |
ibumarskov | c075df8 | 2018-07-30 13:23:07 +0400 | [diff] [blame] | 116 | - description: Set gateway |
Oleksandr Ivashchenko | a95a72b | 2017-06-06 15:55:59 +0300 | [diff] [blame] | 117 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 118 | '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext' |
| 119 | node_name: {{ HOSTNAME_CFG01 }} |
| 120 | retry: {count: 1, delay: 30} |
| 121 | skip_fail: false |
| 122 | |
| 123 | - description: Add interface |
| 124 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 125 | '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet' |
| 126 | node_name: {{ HOSTNAME_CFG01 }} |
| 127 | retry: {count: 1, delay: 30} |
| 128 | skip_fail: false |
| 129 | |
| 130 | - description: Allow all tcp |
| 131 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 132 | '. /root/keystonercv3; nova secgroup-add-rule default tcp 1 65535 0.0.0.0/0' |
| 133 | node_name: {{ HOSTNAME_CFG01 }} |
| 134 | retry: {count: 1, delay: 30} |
| 135 | skip_fail: false |
| 136 | |
| 137 | - description: Allow all icmp |
| 138 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 139 | '. /root/keystonercv3; nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0' |
| 140 | node_name: {{ HOSTNAME_CFG01 }} |
| 141 | retry: {count: 1, delay: 30} |
| 142 | skip_fail: false |
| 143 | |
Tatyana Leontovich | 07bc6ed | 2017-07-25 13:26:48 +0300 | [diff] [blame] | 144 | - description: sync time |
| 145 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run |
| 146 | 'service ntp stop; ntpd -gq; service ntp start' |
| 147 | node_name: {{ HOSTNAME_CFG01 }} |
| 148 | retry: {count: 1, delay: 30} |
| 149 | skip_fail: false |
| 150 | |
Tatyana Leontovich | ac38bac | 2017-07-17 14:05:33 +0300 | [diff] [blame] | 151 | - description: Install docker.io on gtw |
| 152 | cmd: salt-call cmd.run 'apt-get install docker.io -y' |
| 153 | node_name: {{ HOSTNAME_GTW01 }} |
| 154 | retry: {count: 1, delay: 30} |
| 155 | skip_fail: false |
| 156 | |
Tatyana Leontovich | d6bcbc9 | 2018-03-23 15:02:28 +0200 | [diff] [blame] | 157 | - description: Enable forward policy |
| 158 | cmd: iptables --policy FORWARD ACCEPT |
| 159 | node_name: {{ HOSTNAME_GTW01 }} |
| 160 | retry: {count: 1, delay: 30} |
| 161 | skip_fail: false |
| 162 | |
Tatyana Leontovich | ac38bac | 2017-07-17 14:05:33 +0300 | [diff] [blame] | 163 | - description: create rc file on cfg |
| 164 | cmd: scp ctl01:/root/keystonercv3 /root |
| 165 | node_name: {{ HOSTNAME_CFG01 }} |
| 166 | retry: {count: 1, delay: 30} |
| 167 | skip_fail: false |
| 168 | |
| 169 | - description: Copy rc file |
| 170 | cmd: scp /root/keystonercv3 gtw01:/root |
| 171 | node_name: {{ HOSTNAME_CFG01 }} |
| 172 | retry: {count: 1, delay: 30} |
| 173 | skip_fail: false |