blob: 6886747f986b74a2d6f85da82206a3ed9d54d201 [file] [log] [blame]
Vasyl Saienko5a58a5f2020-12-09 14:15:24 +02001heat_template_version: queens
2
3parameters:
4 image:
5 type: string
6 description: Name of image to use for servers
7 public_net_id:
8 type: string
9 default: ''
10 description: >
11 ID of public network for which floating IP addresses will be allocated/
12 for baremetal case flat provision network for nodes
13 lab_network_cidr:
14 type: string
15 default: '10.0.0.0/8'
16 main_network_cidr:
17 type: string
18 default: '10.0.0.0/16'
19 main_control_network_cidr:
20 type: string
21 description: The CIDR of control network, used to detect control interface.
22 default: '10.0.1.0/24'
23 main_tunnel_network_cidr:
24 type: string
25 default: '10.0.2.0/24'
26 main_storage_frontend_network_cidr:
27 type: string
28 default: '10.0.3.0/24'
29 main_storage_backend_network_cidr:
30 type: string
31 default: '10.0.4.0/24'
32 main_private_floating_network_cidr:
33 type: string
34 default: '10.0.5.0/24'
35 main_private_floating_network_interface:
36 type: string
37 default: 'ens4'
38 rack01_network_cidr:
39 type: string
40 default: '10.1.0.0/16'
41 rack01_control_network_cidr:
42 type: string
43 description: The CIDR of control network, used to detect control interface.
44 default: '10.1.1.0/24'
45 rack01_central_router_uplink_network_cidr:
46 type: string
47 default: '192.168.0.0/28'
48 rack02_network_cidr:
49 type: string
50 default: '10.2.0.0/16'
51 rack02_control_network_cidr:
52 type: string
53 description: The CIDR of control network, used to detect control interface.
54 default: '10.2.1.0/24'
55 rack02_central_router_uplink_network_cidr:
56 type: string
57 default: '192.168.0.16/28'
58 main_worker_size:
59 type: number
60 description: Number of workers to deploy
61 default: 3
62 rack01_cmp_size:
63 type: number
64 description: Number of cmp workers to deploy
65 default: 0
66 rack02_cmp_size:
67 type: number
68 description: Number of cmp workers to deploy
69 default: 0
70 cluster_public_key:
71 type: string
72 ucp_metadata:
73 type: json
74 default: {"role":"ucp"}
75 main_worker_metadata:
76 type: json
77 default: {}
78 rack01_cmp_metadata:
79 type: json
80 default: {}
81 rack02_cmp_metadata:
82 type: json
83 default: {}
84 ucp_flavor:
85 type: string
86 default: 'kaas-bm.worker'
87 main_worker_flavor:
88 type: string
89 default: 'system.compact.openstack.control'
90 rack01_cmp_flavor:
91 type: string
92 default: 'system.compact.openstack.control'
93 rack02_cmp_flavor:
94 type: string
95 default: 'system.compact.openstack.control'
96 docker_ee_url:
97 type: string
98 default: 'http://mirror-us.mcp.mirantis.net/.snapshots/docker-ee-bionic-latest'
99# default: 'https://s3-us-west-2.amazonaws.com/internal-docker-ee-builds/docker-ee-linux/ubuntu'
100 docker_ee_release:
101 type: string
102 default: 'stable-19.03'
103 docker_ucp_image:
104 type: string
105 default: 'docker/ucp:3.2.4'
106 tunnel_interface:
107 type: string
108 default: ''
109 main_worker_hardware_metadata:
110 type: string
111 default: ''
112
113resources:
114 keypair_name:
115 type: OS::Heat::RandomString
116 properties:
117 character_classes: [{"class": "hexdigits", "min": 1}]
118 length: 128
119 salt: constant
120 key_pair:
121 type: OS::Nova::KeyPair
122 properties:
123 name: { get_attr: [keypair_name, value] }
124 public_key: { get_param: cluster_public_key }
125 save_private_key: false
126
127 central_site:
128 type: MCP2::CentralSite
129 properties:
130 ucp_metadata: { get_param: ucp_metadata}
131 docker_ee_url: { get_param: docker_ee_url }
132 docker_ee_release: { get_param: docker_ee_release }
133 docker_ucp_image: { get_param: docker_ucp_image}
134 key_name: { get_attr: [keypair_name, value] }
135 image: { get_param: image }
136 ucp_flavor: { get_param: ucp_flavor }
137 public_net_id: { get_param: public_net_id }
138 control_network_cidr: { get_param: main_control_network_cidr }
139 tunnel_network_cidr: { get_param: main_tunnel_network_cidr }
140 storage_frontend_network_cidr: { get_param: main_storage_frontend_network_cidr }
141 storage_backend_network_cidr: { get_param: main_storage_backend_network_cidr }
142 private_floating_network_cidr: { get_param: main_private_floating_network_cidr }
143 private_floating_network_interface: { get_param: main_private_floating_network_interface }
144 worker_size: { get_param: main_worker_size }
145 worker_flavor: { get_param: main_worker_flavor }
146 worker_metadata: { get_param: main_worker_metadata }
147 worker_hardware_metadata: { get_param: main_worker_hardware_metadata }
148
149 rack01_router_routes:
150 type: MCP2::RackRouterRoutes
151 properties:
152 central_router: { get_attr: [central_site, router_id] }
153 central_router_uplink_network_cidr: { get_param: rack01_central_router_uplink_network_cidr }
154 site_cidr: { get_param: rack01_network_cidr }
155 lab_network_cidr: { get_param: lab_network_cidr }
156 public_net_id: { get_param: public_net_id }
157
158 rack01:
159 depends_on:
160 - central_site
161 type: MCP2::Rack
162 properties:
163 docker_ee_url: { get_param: docker_ee_url }
164 docker_ee_release: { get_param: docker_ee_release }
165 docker_ucp_image: { get_param: docker_ucp_image}
166 key_name: { get_attr: [keypair_name, value] }
167 image: { get_param: image }
168 public_net_id: { get_param: public_net_id }
169 control_network_cidr: { get_param: rack01_control_network_cidr }
170 cmp_size: { get_param: rack01_cmp_size }
171 cmp_flavor: { get_param: rack01_cmp_flavor }
172 cmp_metadata: { get_param: rack01_cmp_metadata }
173 ucp_master_host: { get_attr: [central_site, ucp_control_ip] }
174 rack_router: {get_attr: [rack01_router_routes, router_id] }
175
176 rack02_router_routes:
177 depends_on:
178 - rack01_router_routes
179 type: MCP2::RackRouterRoutes
180 properties:
181 central_router: { get_attr: [central_site, router_id] }
182 central_router_uplink_network_cidr: { get_param: rack02_central_router_uplink_network_cidr }
183 site_cidr: { get_param: rack02_network_cidr }
184 lab_network_cidr: { get_param: lab_network_cidr }
185 public_net_id: { get_param: public_net_id }
186
187 rack02:
188 depends_on:
189 - central_site
190 type: MCP2::Rack
191 properties:
192 docker_ee_url: { get_param: docker_ee_url }
193 docker_ee_release: { get_param: docker_ee_release }
194 docker_ucp_image: { get_param: docker_ucp_image}
195 key_name: { get_attr: [keypair_name, value] }
196 image: { get_param: image }
197 public_net_id: { get_param: public_net_id }
198 control_network_cidr: { get_param: rack02_control_network_cidr }
199 cmp_size: { get_param: rack02_cmp_size }
200 cmp_flavor: { get_param: rack02_cmp_flavor }
201 cmp_metadata: { get_param: rack02_cmp_metadata }
202 ucp_master_host: { get_attr: [central_site, ucp_control_ip] }
203 rack_router: {get_attr: [rack02_router_routes, router_id] }
204
205outputs:
206 central_site_worker_public_ip:
207 description: IP address of server in private network
208 value: { get_attr: [central_site, worker_public_ip] }
209 ucp_public_ip:
210 description: IP address of server in private network
211 value: { get_attr: [central_site, ucp_public_ip] }
212 central_site_worker_wc_data:
213 description: Metadata from instance
214 value: { get_attr: [central_site, worker_wc_data]}
215 rack01_cmp_public_ip:
216 value: { get_attr: [rack01, cmp_public_ip] }
217 rack02_cmp_public_ip:
218 value: { get_attr: [rack02, cmp_public_ip] }