blob: c5fdbee1d816ef34a7898484bffef6ad8b20c02a [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'
Stepan Rogov60bc3522020-12-16 17:43:25 +0300106 docker_default_address_pool:
107 type: string
Vasyl Saienko5a58a5f2020-12-09 14:15:24 +0200108 tunnel_interface:
109 type: string
110 default: ''
111 main_worker_hardware_metadata:
112 type: string
113 default: ''
114
115resources:
116 keypair_name:
117 type: OS::Heat::RandomString
118 properties:
119 character_classes: [{"class": "hexdigits", "min": 1}]
120 length: 128
121 salt: constant
122 key_pair:
123 type: OS::Nova::KeyPair
124 properties:
125 name: { get_attr: [keypair_name, value] }
126 public_key: { get_param: cluster_public_key }
127 save_private_key: false
128
129 central_site:
130 type: MCP2::CentralSite
131 properties:
132 ucp_metadata: { get_param: ucp_metadata}
133 docker_ee_url: { get_param: docker_ee_url }
134 docker_ee_release: { get_param: docker_ee_release }
135 docker_ucp_image: { get_param: docker_ucp_image}
Stepan Rogov60bc3522020-12-16 17:43:25 +0300136 docker_default_address_pool: { get_param: docker_default_address_pool }
Vasyl Saienko5a58a5f2020-12-09 14:15:24 +0200137 key_name: { get_attr: [keypair_name, value] }
138 image: { get_param: image }
139 ucp_flavor: { get_param: ucp_flavor }
140 public_net_id: { get_param: public_net_id }
141 control_network_cidr: { get_param: main_control_network_cidr }
142 tunnel_network_cidr: { get_param: main_tunnel_network_cidr }
143 storage_frontend_network_cidr: { get_param: main_storage_frontend_network_cidr }
144 storage_backend_network_cidr: { get_param: main_storage_backend_network_cidr }
145 private_floating_network_cidr: { get_param: main_private_floating_network_cidr }
146 private_floating_network_interface: { get_param: main_private_floating_network_interface }
147 worker_size: { get_param: main_worker_size }
148 worker_flavor: { get_param: main_worker_flavor }
149 worker_metadata: { get_param: main_worker_metadata }
150 worker_hardware_metadata: { get_param: main_worker_hardware_metadata }
151
152 rack01_router_routes:
153 type: MCP2::RackRouterRoutes
154 properties:
155 central_router: { get_attr: [central_site, router_id] }
156 central_router_uplink_network_cidr: { get_param: rack01_central_router_uplink_network_cidr }
157 site_cidr: { get_param: rack01_network_cidr }
158 lab_network_cidr: { get_param: lab_network_cidr }
159 public_net_id: { get_param: public_net_id }
160
161 rack01:
162 depends_on:
163 - central_site
164 type: MCP2::Rack
165 properties:
166 docker_ee_url: { get_param: docker_ee_url }
167 docker_ee_release: { get_param: docker_ee_release }
168 docker_ucp_image: { get_param: docker_ucp_image}
Stepan Rogov60bc3522020-12-16 17:43:25 +0300169 docker_default_address_pool: { get_param: docker_default_address_pool }
Vasyl Saienko5a58a5f2020-12-09 14:15:24 +0200170 key_name: { get_attr: [keypair_name, value] }
171 image: { get_param: image }
172 public_net_id: { get_param: public_net_id }
173 control_network_cidr: { get_param: rack01_control_network_cidr }
174 cmp_size: { get_param: rack01_cmp_size }
175 cmp_flavor: { get_param: rack01_cmp_flavor }
176 cmp_metadata: { get_param: rack01_cmp_metadata }
177 ucp_master_host: { get_attr: [central_site, ucp_control_ip] }
178 rack_router: {get_attr: [rack01_router_routes, router_id] }
179
180 rack02_router_routes:
181 depends_on:
182 - rack01_router_routes
183 type: MCP2::RackRouterRoutes
184 properties:
185 central_router: { get_attr: [central_site, router_id] }
186 central_router_uplink_network_cidr: { get_param: rack02_central_router_uplink_network_cidr }
187 site_cidr: { get_param: rack02_network_cidr }
188 lab_network_cidr: { get_param: lab_network_cidr }
189 public_net_id: { get_param: public_net_id }
190
191 rack02:
192 depends_on:
193 - central_site
194 type: MCP2::Rack
195 properties:
196 docker_ee_url: { get_param: docker_ee_url }
197 docker_ee_release: { get_param: docker_ee_release }
198 docker_ucp_image: { get_param: docker_ucp_image}
Stepan Rogov60bc3522020-12-16 17:43:25 +0300199 docker_default_address_pool: { get_param: docker_default_address_pool }
Vasyl Saienko5a58a5f2020-12-09 14:15:24 +0200200 key_name: { get_attr: [keypair_name, value] }
201 image: { get_param: image }
202 public_net_id: { get_param: public_net_id }
203 control_network_cidr: { get_param: rack02_control_network_cidr }
204 cmp_size: { get_param: rack02_cmp_size }
205 cmp_flavor: { get_param: rack02_cmp_flavor }
206 cmp_metadata: { get_param: rack02_cmp_metadata }
207 ucp_master_host: { get_attr: [central_site, ucp_control_ip] }
208 rack_router: {get_attr: [rack02_router_routes, router_id] }
209
210outputs:
211 central_site_worker_public_ip:
212 description: IP address of server in private network
213 value: { get_attr: [central_site, worker_public_ip] }
214 ucp_public_ip:
215 description: IP address of server in private network
216 value: { get_attr: [central_site, ucp_public_ip] }
217 central_site_worker_wc_data:
218 description: Metadata from instance
219 value: { get_attr: [central_site, worker_wc_data]}
220 rack01_cmp_public_ip:
221 value: { get_attr: [rack01, cmp_public_ip] }
222 rack02_cmp_public_ip:
223 value: { get_attr: [rack02, cmp_public_ip] }