blob: 679106006e241aba7328be1079eb3093eee0218f [file] [log] [blame]
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +02001heat_template_version: queens
2
3parameters:
4
5 metadata:
6 type: json
7 default: {}
8 node_type:
9 type: string
Vasyl Saienko8d34ad02021-07-26 11:55:23 +030010 kubernetes_installer:
11 type: string
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +020012 key_name:
13 type: string
14 description: Name of keypair to assign to servers
15 image:
16 type: string
17 description: Name of image to use for servers
18 flavor:
19 type: string
20 description: Flavor to use for servers
21 accessible_network:
22 type: string
23 accessible_subnet_id:
24 type: string
25 private_floating_network:
26 type: string
27 private_floating_network_cidr:
28 type: string
29 private_floating_subnet_id:
30 type: string
31 private_floating_interface:
32 type: string
33 storage_backend_network_cidr:
34 type: string
35 storage_backend_network:
36 type: string
37 storage_backend_subnet_id:
38 type: string
39 storage_backend_interface:
40 type: string
41 storage_frontend_network:
42 type: string
43 storage_frontend_network_cidr:
44 type: string
45 storage_frontend_subnet_id:
46 type: string
47 storage_frontend_interface:
48 type: string
Vasyl Saienko0fa6f192020-03-06 16:08:51 +020049 control_network_cidr:
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +020050 type: string
Vasyl Saienko36f2edf2020-05-14 10:44:52 +030051 ironic_baremetal_network:
52 type: string
53 ironic_baremetal_subnet_id:
54 type: string
Vasyl Saienko4c468192020-05-19 11:51:13 +030055 ironic_baremetal_network_cidr:
Vasyl Saienko36f2edf2020-05-14 10:44:52 +030056 type: string
Michael Polenchuk486cadf2020-08-24 16:25:51 +040057 ironic_baremetal_tunnel_cidr:
58 type: string
59 ironic_mt_enabled:
60 type: boolean
Anton Samoylov13b055e2020-07-23 15:44:07 +040061 tungstenfabric_enabled:
62 type: boolean
Oleh Hryhorove7feab42020-11-11 18:00:29 +020063 tun_network:
Anton Samoylov13b055e2020-07-23 15:44:07 +040064 type: string
Oleh Hryhorove7feab42020-11-11 18:00:29 +020065 tun_subnet_id:
Anton Samoylov13b055e2020-07-23 15:44:07 +040066 type: string
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +020067 functions_override:
68 type: string
69 boot_timeout:
70 type: number
71 description: Boot timeout for instance
Vasyl Saienkof36f39c2020-03-10 00:21:42 +020072 default: 3600
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +020073 ucp_master_host:
74 type: string
75 default: ''
Vasyl Saienko84ee4fd2020-09-02 10:00:18 +030076 docker_ucp_image:
77 type: string
Stepan Rogov60bc3522020-12-16 17:43:25 +030078 docker_default_address_pool:
79 type: string
Vasyl Saienkoa94bf182023-04-01 10:42:17 +000080 binary_base_url:
81 type: string
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +020082 public_net_id:
83 type: string
84 default: ''
85 docker_ee_release:
86 type: string
Vasyl Saienkofa714102024-03-22 09:30:25 +020087 docker_ee_packages:
88 type: string
Vasyl Saienko92133c02024-05-16 10:18:51 +030089 kubernetes_container_runtime:
90 type: string
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +020091 docker_ee_url:
92 type: string
Vasyl Saienkof9ee1582020-03-02 16:53:41 +020093 hardware_metadata:
94 description: The content of lab metadata.
95 type: string
Vasyl Saienko846c6342021-02-24 17:01:36 +020096 frr_bgp_neighbors:
97 description: Comma separated list of IP of BGP neighbors
98 default: ''
99 type: string
Denis Egorenkoe09856a2021-11-01 13:52:46 +0400100 num_volumes:
101 type: number
102 default: 0
Vasyl Saienkofa9bed02021-11-04 18:52:45 +0200103 availability_zone:
104 type: string
105 default: nova
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +0200106
107resources:
108
109 software_config:
110 type: OS::Heat::SoftwareConfig
111 properties:
112 group: ungrouped
113 config:
114 str_replace:
Vasyl Saienko4a2832d2024-05-16 09:00:03 +0300115 template: { get_file: ../scripts/launch.sh }
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +0200116 params:
117 $node_type: { get_param: node_type }
Vasyl Saienko8d34ad02021-07-26 11:55:23 +0300118 $kubernetes_installer: { get_param: kubernetes_installer }
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +0200119 $wait_condition_notify: { get_attr: [ wait_handle, curl_cli ] }
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +0200120 $docker_ee_url: { get_param: docker_ee_url }
Vasyl Saienkofa714102024-03-22 09:30:25 +0200121 $docker_ee_packages: { get_param: docker_ee_packages }
Vasyl Saienko92133c02024-05-16 10:18:51 +0300122 $kubernetes_container_runtime: { get_param: kubernetes_container_runtime }
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +0200123 $docker_ee_release: { get_param: docker_ee_release }
124 $ucp_master_host: { get_param: ucp_master_host }
Vasyl Saienko84ee4fd2020-09-02 10:00:18 +0300125 $docker_ucp_image: { get_param: docker_ucp_image }
Stepan Rogov60bc3522020-12-16 17:43:25 +0300126 $docker_default_address_pool: { get_param: docker_default_address_pool }
Vasyl Saienkoa94bf182023-04-01 10:42:17 +0000127 $binary_base_url: { get_param: binary_base_url }
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +0200128 $node_metadata: { get_param: metadata }
Vasyl Saienko0fa6f192020-03-06 16:08:51 +0200129 $control_network_cidr: { get_param: control_network_cidr }
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +0200130 $private_floating_interface: { get_param: private_floating_interface }
131 $private_floating_network_cidr: { get_param: private_floating_network_cidr }
132 $private_floating_interface_ip: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] }
133 $functions_override: { get_param: functions_override }
134 $storage_frontend_interface: { get_param: storage_frontend_interface }
135 $storage_frontend_network_interface_ip: { get_attr: [storage_frontend_server_port, fixed_ips, 0, ip_address] }
136 $storage_frontend_network_cidr: { get_param: storage_frontend_network_cidr }
137 $storage_backend_interface: { get_param: storage_backend_interface }
138 $storage_backend_network_interface_ip: { get_attr: [storage_backend_server_port, fixed_ips, 0, ip_address] }
139 $storage_backend_network_cidr: { get_param: storage_backend_network_cidr }
Vasyl Saienko36f2edf2020-05-14 10:44:52 +0300140 $ironic_baremetal_interface_ip: { get_attr: [ironic_baremetal_server_port, fixed_ips, 0, ip_address] }
Vasyl Saienko4c468192020-05-19 11:51:13 +0300141 $ironic_baremetal_network_cidr: { get_param: ironic_baremetal_network_cidr }
Michael Polenchuk486cadf2020-08-24 16:25:51 +0400142 $ironic_baremetal_tunnel_cidr: { get_param: ironic_baremetal_tunnel_cidr }
143 $ironic_mt_enabled: { get_param: ironic_mt_enabled }
Vasyl Saienko3dd0c272020-11-16 17:20:07 +0200144 $tunnel_interface_ip: { get_attr: [tun_server_port, fixed_ips, 0, ip_address] }
Vasyl Saienko846c6342021-02-24 17:01:36 +0200145 $frr_bgp_neighbors: { get_param: frr_bgp_neighbors }
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +0200146
Vasyl Saienkof9ee1582020-03-02 16:53:41 +0200147 inject_files:
148 type: "OS::Heat::CloudConfig"
149 properties:
150 cloud_config:
151 write_files:
152 - path: /usr/sbin/prepare-metadata.py
153 owner: "root:root"
154 permissions: "0755"
155 content: {get_file: ../scripts/prepare-metadata.py}
156 - path: /usr/share/metadata/lab-metadata.yaml
157 owner: "root:root"
158 permissions: "0644"
159 content: { get_param: hardware_metadata}
160
161 install_config_agent:
162 type: "OS::Heat::MultipartMime"
163 properties:
164 parts:
165 - config: {get_resource: software_config}
166 - config: {get_resource: inject_files}
167
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +0200168 server:
169 type: OS::Nova::Server
170 properties:
Mykyta Karpin8b164562021-03-19 15:20:23 +0200171 config_drive: true
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +0200172 image: { get_param: image }
173 flavor: { get_param: flavor }
174 key_name: { get_param: key_name }
Vasyl Saienkofa9bed02021-11-04 18:52:45 +0200175 availability_zone: { get_param: availability_zone }
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +0200176 networks:
177 - network: { get_param: accessible_network }
178 # NOTE(ohryhorov): connect to accessible network only as ironic doesn't
179 # support multitenancy use-case. Use private_floating_network for IPAM only.
Vasyl Saienko36f2edf2020-05-14 10:44:52 +0300180 # NOTE(vsaienko): ditto about ironic network
Vasyl Saienkof9ee1582020-03-02 16:53:41 +0200181 user_data_format: SOFTWARE_CONFIG
182 user_data: { get_resource: install_config_agent}
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +0200183 metadata: { get_param: metadata }
184
185 private_floating_server_port:
186 type: OS::Neutron::Port
187 properties:
188 network_id: { get_param: private_floating_network }
189 port_security_enabled: false
190 fixed_ips:
191 - subnet: { get_param: private_floating_subnet_id }
192
193 storage_backend_server_port:
194 type: OS::Neutron::Port
195 properties:
196 network_id: { get_param: storage_backend_network }
197 port_security_enabled: false
198 fixed_ips:
199 - subnet: { get_param: storage_backend_subnet_id }
200
201 storage_frontend_server_port:
202 type: OS::Neutron::Port
203 properties:
204 network_id: { get_param: storage_frontend_network }
205 port_security_enabled: false
206 fixed_ips:
207 - subnet: { get_param: storage_frontend_subnet_id }
208
Vasyl Saienko36f2edf2020-05-14 10:44:52 +0300209 ironic_baremetal_server_port:
210 type: OS::Neutron::Port
211 properties:
212 network_id: { get_param: ironic_baremetal_network }
213 port_security_enabled: false
214 fixed_ips:
215 - subnet: { get_param: ironic_baremetal_subnet_id }
216
Oleh Hryhorove7feab42020-11-11 18:00:29 +0200217 tun_server_port:
Anton Samoylov13b055e2020-07-23 15:44:07 +0400218 type: OS::Neutron::Port
Anton Samoylov13b055e2020-07-23 15:44:07 +0400219 properties:
Oleh Hryhorove7feab42020-11-11 18:00:29 +0200220 network_id: { get_param: tun_network }
Anton Samoylov13b055e2020-07-23 15:44:07 +0400221 port_security_enabled: false
222 fixed_ips:
Oleh Hryhorove7feab42020-11-11 18:00:29 +0200223 - subnet: { get_param: tun_subnet_id }
Anton Samoylov13b055e2020-07-23 15:44:07 +0400224
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +0200225 wait_handle:
226 type: OS::Heat::WaitConditionHandle
227 wait_condition:
228 type: OS::Heat::WaitCondition
229 properties:
230 handle: { get_resource: wait_handle }
231 timeout: { get_param: boot_timeout }
232
233
234outputs:
235 server_private_ip:
236 description: IP address of server in private network
237 value: { get_attr: [server, networks, { get_param: accessible_network}, 0]}
238 server_private_floating_ip:
239 description: IP address of server in private floating network
240 value: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] }
Vasyl Saienko4e3f4632020-05-26 14:43:09 +0300241 server_ironic_baremetal_ip:
242 description: IP address of server in ironic baremetal network
243 value: { get_attr: [ironic_baremetal_server_port, fixed_ips, 0, ip_address] }
Anton Samoylov13b055e2020-07-23 15:44:07 +0400244 server_tf_data_ip:
245 description: IP address of server in tf data network
Oleh Hryhorove7feab42020-11-11 18:00:29 +0200246 value: { get_attr: [tun_server_port, fixed_ips, 0, ip_address] }
Oleh Hryhorovdccb1cd2020-03-04 15:52:55 +0200247 server_public_ip:
248 description: Floating IP address of server in public network
249 value: { get_attr: [server, networks, { get_param: accessible_network}, 0]}
Vasyl Saienko846c6342021-02-24 17:01:36 +0200250 server_tun_ip:
251 description: IP address of server in tunnel network
252 value: { get_attr: [ tun_server_port, fixed_ips, 0, ip_address ] }
Vasyl Saienkof9ee1582020-03-02 16:53:41 +0200253 wc_data:
254 description: Metadata from instance
255 value: { get_attr: [wait_condition, data]}