blob: 26775ce375422e679c05699efe34f59f69ba382e [file] [log] [blame]
Oleksii Butenko87d00c02018-09-05 19:11:17 +03001{% from 'cookied-mcp-queens-ovs/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'cookied-mcp-queens-ovs/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'cookied-mcp-queens-ovs/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'cookied-mcp-queens-ovs/underlay.yaml' import HOSTNAME_CTL03 with context %}
5{% from 'cookied-mcp-queens-ovs/underlay.yaml' import HOSTNAME_GTW01 with context %}
6{% from 'cookied-mcp-queens-ovs/underlay.yaml' import LAB_CONFIG_NAME with context %}
7{% from 'cookied-mcp-queens-ovs/underlay.yaml' import DOMAIN_NAME with context %}
8{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
9{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
10{% set LAB_CONFIG_NAME = os_env('LAB_CONFIG_NAME') %}
11
12{% import 'shared-salt.yaml' as SHARED with context %}
13{% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %}
14
15# Install OpenStack control services
16
17{{ SHARED_OPENSTACK.MACRO_INSTALL_KEYSTONE(USE_ORCHESTRATE=false) }}
18
19{{ SHARED_OPENSTACK.MACRO_INSTALL_GLANCE() }}
20
21{{ SHARED_OPENSTACK.MACRO_INSTALL_NOVA() }}
22
23{{ SHARED_OPENSTACK.MACRO_INSTALL_CINDER() }}
24
25{{ SHARED_OPENSTACK.MACRO_INSTALL_NEUTRON() }}
26
27# isntall designate
28#- description: Install bind
29# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
30# -C 'I@bind:server' state.sls bind
31# node_name: {{ HOSTNAME_CFG01 }}
32# retry: {count: 1, delay: 5}
33# skip_fail: false
34
35#- description: Install designate
36# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
37# -C 'I@designate:server' state.sls designate -b 1
38# node_name: {{ HOSTNAME_CFG01 }}
39# retry: {count: 5, delay: 10}
40# skip_fail: false
41
42{{ SHARED_OPENSTACK.MACRO_INSTALL_HEAT() }}
43
44- description: Deploy horizon dashboard
45 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
46 -C 'I@horizon:server' state.sls horizon
47 node_name: {{ HOSTNAME_CFG01 }}
48 retry: {count: 1, delay: 5}
49 skip_fail: true
50
51- description: Deploy nginx proxy
52 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
53 -C 'I@nginx:server' state.sls nginx
54 node_name: {{ HOSTNAME_CFG01 }}
55 retry: {count: 1, delay: 5}
56 skip_fail: true
57
58
59# Install compute node
60
61- description: Apply formulas for compute node
62 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
63 node_name: {{ HOSTNAME_CFG01 }}
64 retry: {count: 1, delay: 5}
65 skip_fail: true
66
67- description: Re-apply(as in doc) formulas for compute node
68 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
69 node_name: {{ HOSTNAME_CFG01 }}
70 retry: {count: 1, delay: 5}
71 skip_fail: false
72
73- description: Check IP on computes
74 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
75 'ip a'
76 node_name: {{ HOSTNAME_CFG01 }}
77 retry: {count: 10, delay: 30}
78 skip_fail: false
79
80- description: Create net04_external
81 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
82 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
83 node_name: {{ HOSTNAME_CFG01 }}
84 retry: {count: 1, delay: 30}
85 skip_fail: false
86
87- description: Create subnet_external
88 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
89 '. /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'
90 node_name: {{ HOSTNAME_CFG01 }}
91 retry: {count: 1, delay: 30}
92 skip_fail: false
93
94- description: Create net04
95 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
96 '. /root/keystonercv3; neutron net-create net04'
97 node_name: {{ HOSTNAME_CFG01 }}
98 retry: {count: 1, delay: 30}
99 skip_fail: false
100
101- description: Create subnet_net04
102 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
103 '. /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'
104 node_name: {{ HOSTNAME_CFG01 }}
105 retry: {count: 1, delay: 30}
106 skip_fail: false
107
108- description: Create router
109 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
110 '. /root/keystonercv3; neutron router-create net04_router01'
111 node_name: {{ HOSTNAME_CFG01 }}
112 retry: {count: 1, delay: 30}
113 skip_fail: false
114
115- description: Set geteway
116 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
117 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
118 node_name: {{ HOSTNAME_CFG01 }}
119 retry: {count: 1, delay: 30}
120 skip_fail: false
121
122- description: Add interface
123 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
124 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
125 node_name: {{ HOSTNAME_CFG01 }}
126 retry: {count: 1, delay: 30}
127 skip_fail: false
128
129- description: sync time
130 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run
131 'service ntp stop; ntpd -gq; service ntp start'
132 node_name: {{ HOSTNAME_CFG01 }}
133 retry: {count: 1, delay: 30}
134 skip_fail: false
135
136{{ SHARED.INSTALL_DOCKER_ON_GTW() }}