blob: 40726327c02933f0d09c73afe4c29a513513319a [file] [log] [blame]
Vladimir Khlyunev25f1e742018-11-07 16:52:10 +04001{% 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 Golovatiuk50f91892017-08-04 18:11:06 +02006{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
7{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +03008
ibumarskov942417e2018-08-23 22:05:59 +04009{% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %}
Pavel Glazov78e6c592018-10-24 12:20:12 +040010{% import 'shared-salt.yaml' as SHARED with context %}
ibumarskov942417e2018-08-23 22:05:59 +040011
ibumarskov7bdc7ed2018-08-24 12:06:38 +040012# 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
sgudz62df2fc2018-10-09 12:26:19 +030020{{ SHARED_OPENSTACK.MACRO_INSTALL_KEYSTONE() }}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030021
ibumarskov7e886672018-08-23 13:52:13 +040022{{ SHARED_OPENSTACK.MACRO_INSTALL_GLANCE() }}
ibumarskove23c10e2018-08-20 15:47:58 +040023
ibumarskov7e886672018-08-23 13:52:13 +040024{{ SHARED_OPENSTACK.MACRO_INSTALL_NOVA() }}
Dennis Dmitriev4ab889c2017-04-27 14:11:04 +030025
ibumarskov7e886672018-08-23 13:52:13 +040026{{ SHARED_OPENSTACK.MACRO_INSTALL_CINDER() }}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030027
ibumarskov7e886672018-08-23 13:52:13 +040028{{ SHARED_OPENSTACK.MACRO_INSTALL_NEUTRON() }}
Tatyana Leontovichfa7ae4d2017-04-25 13:46:14 +030029
ibumarskov7e886672018-08-23 13:52:13 +040030{{ SHARED_OPENSTACK.MACRO_INSTALL_HEAT() }}
Tatyana Leontovichfa7ae4d2017-04-25 13:46:14 +030031
ibumarskov7e886672018-08-23 13:52:13 +040032# install designate backend
Tatyana Leontovich85e822a2017-06-15 11:52:01 +030033- description: Install bind
34 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Tatyana Leontovich033aac02017-06-15 15:01:21 +030035 -C 'I@bind:server' state.sls bind
Tatyana Leontovich85e822a2017-06-15 11:52:01 +030036 node_name: {{ HOSTNAME_CFG01 }}
37 retry: {count: 1, delay: 5}
38 skip_fail: false
39
ibumarskov7e886672018-08-23 13:52:13 +040040{{ SHARED_OPENSTACK.MACRO_INSTALL_DESIGNATE() }}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030041
ibumarskov7e886672018-08-23 13:52:13 +040042{{ SHARED_OPENSTACK.MACRO_INSTALL_HORIZON() }}
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030043
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030044# 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 Butenko9f2601c2018-02-08 15:13:21 +020056 skip_fail: false
Tatyana Leontovich38be41b2017-04-12 14:45:23 +030057
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 Ivashchenkoa95a72b2017-06-06 15:55:59 +030064
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
ibumarskov2cea0d42018-07-24 08:40:50 +040070 'wget http://images.mirantis.com.s3.amazonaws.com/cirros-x64-20170828.qcow2'
Oleksandr Ivashchenkoa95a72b2017-06-06 15:55:59 +030071 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
ibumarskov2cea0d42018-07-24 08:40:50 +040077 '. /root/keystonercv3; glance --timeout 120 image-create --name cirros --visibility public --disk-format qcow2 --container-format bare --progress < /root/cirros-x64-20170828.qcow2'
Oleksandr Ivashchenkoa95a72b2017-06-06 15:55:59 +030078 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 Leontovich674abf82017-07-20 15:44:15 +030084 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
Oleksandr Ivashchenkoa95a72b2017-06-06 15:55:59 +030085 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
ibumarskovc075df82018-07-30 13:23:07 +0400117- description: Set gateway
Oleksandr Ivashchenkoa95a72b2017-06-06 15:55:59 +0300118 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 Leontovich07bc6ed2017-07-25 13:26:48 +0300145- 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 Glazov78e6c592018-10-24 12:20:12 +0400152{{ SHARED.INSTALL_DOCKER_ON_GTW() }}
Tatyana Leontovichd6bcbc92018-03-23 15:02:28 +0200153
Tatyana Leontovichac38bac2017-07-17 14:05:33 +0300154- 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