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