Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 1 | heat_template_version: queens |
| 2 | |
| 3 | parameters: |
| 4 | |
| 5 | metadata: |
| 6 | type: json |
| 7 | default: {} |
| 8 | node_type: |
| 9 | type: string |
Vasyl Saienko | 8d34ad0 | 2021-07-26 11:55:23 +0300 | [diff] [blame] | 10 | kubernetes_installer: |
| 11 | type: string |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 12 | 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 |
Vasyl Saienko | 0fa6f19 | 2020-03-06 16:08:51 +0200 | [diff] [blame] | 33 | control_network_cidr: |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 34 | type: string |
| 35 | functions_override: |
| 36 | type: string |
| 37 | boot_timeout: |
| 38 | type: number |
| 39 | description: Boot timeout for instance |
Vasyl Saienko | f36f39c | 2020-03-10 00:21:42 +0200 | [diff] [blame] | 40 | default: 3600 |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 41 | ucp_master_host: |
| 42 | type: string |
| 43 | default: '' |
| 44 | public_net_id: |
| 45 | type: string |
Mykyta Karpin | 5ed5fd8 | 2020-01-27 18:23:29 +0200 | [diff] [blame] | 46 | docker_ee_release: |
| 47 | type: string |
Vasyl Saienko | fa71410 | 2024-03-22 09:30:25 +0200 | [diff] [blame] | 48 | docker_ee_packages: |
| 49 | type: string |
Vasyl Saienko | 92133c0 | 2024-05-16 10:18:51 +0300 | [diff] [blame] | 50 | kubernetes_container_runtime: |
| 51 | type: string |
Mykyta Karpin | 5ed5fd8 | 2020-01-27 18:23:29 +0200 | [diff] [blame] | 52 | docker_ee_url: |
| 53 | type: string |
Vasyl Saienko | b59853e | 2020-05-25 10:15:26 +0300 | [diff] [blame] | 54 | docker_ucp_image: |
| 55 | type: string |
| 56 | default: 'docker/ucp:3.2.4' |
Vasyl Saienko | cfbedc7 | 2021-02-15 18:02:56 +0200 | [diff] [blame] | 57 | docker_ucp_swarm_data_port: |
| 58 | type: string |
| 59 | default: 4789 |
Stepan Rogov | 60bc352 | 2020-12-16 17:43:25 +0300 | [diff] [blame] | 60 | docker_default_address_pool: |
| 61 | type: string |
Vasyl Saienko | a94bf18 | 2023-04-01 10:42:17 +0000 | [diff] [blame] | 62 | binary_base_url: |
| 63 | type: string |
Vasyl Saienko | f9ee158 | 2020-03-02 16:53:41 +0200 | [diff] [blame] | 64 | hardware_metadata: |
| 65 | description: The content of lab metadata. |
| 66 | default: '' |
| 67 | type: string |
Oleh Hryhorov | 43bbc8c | 2020-12-03 15:30:09 +0200 | [diff] [blame] | 68 | single_node: |
| 69 | type: string |
Oleh Hryhorov | cd1a3bd | 2020-12-04 13:21:06 +0200 | [diff] [blame] | 70 | user_data_config: |
| 71 | description: This is part of clout-config which denies to mount drive with label ephemeral0 to /mnt |
| 72 | type: string |
| 73 | default: | |
| 74 | #cloud-config |
| 75 | # |
| 76 | # Don't mount ephemeral0 to /mnt as it's by default |
| 77 | mounts: |
| 78 | - [ ephemeral0, null ] |
Vasyl Saienko | fa9bed0 | 2021-11-04 18:52:45 +0200 | [diff] [blame] | 79 | availability_zone: |
| 80 | type: string |
| 81 | default: nova |
Michael Polenchuk | 06bfa15 | 2022-02-15 17:50:04 +0400 | [diff] [blame] | 82 | secure_overlay_enabled: |
| 83 | type: boolean |
Michael Polenchuk | 4f2e776 | 2022-09-16 17:36:28 +0400 | [diff] [blame] | 84 | kubectl_version: |
| 85 | type: string |
| 86 | default: 1.18.8 |
Vasyl Saienko | 4a2832d | 2024-05-16 09:00:03 +0300 | [diff] [blame] | 87 | devops_utils_refspec: |
| 88 | type: string |
| 89 | default: 'master' |
Vasyl Saienko | 3e8ba73 | 2024-09-09 14:07:49 +0300 | [diff] [blame] | 90 | k0s_version: |
| 91 | type: string |
| 92 | default: '' |
Mykyta Karpin | 9df830a | 2024-09-12 14:25:01 +0200 | [diff] [blame] | 93 | ucp_audit_log_level: |
| 94 | type: string |
| 95 | default: '' |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 96 | |
| 97 | resources: |
| 98 | |
| 99 | software_config: |
| 100 | type: OS::Heat::SoftwareConfig |
| 101 | properties: |
| 102 | group: ungrouped |
| 103 | config: |
| 104 | str_replace: |
Vasyl Saienko | 4a2832d | 2024-05-16 09:00:03 +0300 | [diff] [blame] | 105 | template: { get_file: ../scripts/launch.sh } |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 106 | params: |
| 107 | $node_type: { get_param: node_type } |
Vasyl Saienko | 8d34ad0 | 2021-07-26 11:55:23 +0300 | [diff] [blame] | 108 | $kubernetes_installer: { get_param: kubernetes_installer } |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 109 | $wait_condition_notify: { get_attr: [ wait_handle, curl_cli ] } |
Mykyta Karpin | 5ed5fd8 | 2020-01-27 18:23:29 +0200 | [diff] [blame] | 110 | $docker_ee_url: { get_param: docker_ee_url } |
Vasyl Saienko | fa71410 | 2024-03-22 09:30:25 +0200 | [diff] [blame] | 111 | $docker_ee_packages: { get_param: docker_ee_packages } |
Vasyl Saienko | 92133c0 | 2024-05-16 10:18:51 +0300 | [diff] [blame] | 112 | $kubernetes_container_runtime: { get_param: kubernetes_container_runtime } |
Mykyta Karpin | 5ed5fd8 | 2020-01-27 18:23:29 +0200 | [diff] [blame] | 113 | $docker_ee_release: { get_param: docker_ee_release } |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 114 | $ucp_master_host: { get_param: ucp_master_host } |
| 115 | $node_metadata: { get_param: metadata } |
Vasyl Saienko | 0fa6f19 | 2020-03-06 16:08:51 +0200 | [diff] [blame] | 116 | $control_network_cidr: { get_param: control_network_cidr } |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 117 | $private_floating_interface: { get_param: private_floating_interface } |
| 118 | $private_floating_interface_ip: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] } |
Oleh Hryhorov | ca77209 | 2020-02-13 11:15:17 +0200 | [diff] [blame] | 119 | $private_floating_network_cidr: { get_param: private_floating_network_cidr } |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 120 | $functions_override: { get_param: functions_override } |
Vasyl Saienko | b59853e | 2020-05-25 10:15:26 +0300 | [diff] [blame] | 121 | $docker_ucp_image: { get_param: docker_ucp_image } |
Vasyl Saienko | cfbedc7 | 2021-02-15 18:02:56 +0200 | [diff] [blame] | 122 | $docker_ucp_swarm_data_port: { get_param: docker_ucp_swarm_data_port } |
Stepan Rogov | 60bc352 | 2020-12-16 17:43:25 +0300 | [diff] [blame] | 123 | $docker_default_address_pool: { get_param: docker_default_address_pool } |
Vasyl Saienko | a94bf18 | 2023-04-01 10:42:17 +0000 | [diff] [blame] | 124 | $binary_base_url: { get_param: binary_base_url } |
Oleh Hryhorov | 43bbc8c | 2020-12-03 15:30:09 +0200 | [diff] [blame] | 125 | $single_node: { get_param: single_node } |
Michael Polenchuk | 06bfa15 | 2022-02-15 17:50:04 +0400 | [diff] [blame] | 126 | $secure_overlay_enabled: { get_param: secure_overlay_enabled } |
Michael Polenchuk | 4f2e776 | 2022-09-16 17:36:28 +0400 | [diff] [blame] | 127 | $kubectl_version: { get_param: kubectl_version } |
Vasyl Saienko | 4a2832d | 2024-05-16 09:00:03 +0300 | [diff] [blame] | 128 | $devops_utils_refspec: { get_param: devops_utils_refspec } |
Vasyl Saienko | 3e8ba73 | 2024-09-09 14:07:49 +0300 | [diff] [blame] | 129 | $k0s_version: { get_param: k0s_version } |
Mykyta Karpin | 9df830a | 2024-09-12 14:25:01 +0200 | [diff] [blame] | 130 | $ucp_audit_log_level: { get_param: ucp_audit_log_level } |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 131 | |
Vasyl Saienko | f9ee158 | 2020-03-02 16:53:41 +0200 | [diff] [blame] | 132 | inject_files: |
| 133 | type: "OS::Heat::CloudConfig" |
| 134 | properties: |
| 135 | cloud_config: |
| 136 | write_files: |
| 137 | - path: /usr/sbin/prepare-metadata.py |
| 138 | owner: "root:root" |
| 139 | permissions: "0755" |
| 140 | content: {get_file: ../scripts/prepare-metadata.py} |
| 141 | - path: /usr/share/metadata/lab-metadata.yaml |
| 142 | owner: "root:root" |
| 143 | permissions: "0644" |
| 144 | content: { get_param: hardware_metadata} |
| 145 | |
| 146 | install_config_agent: |
| 147 | type: "OS::Heat::MultipartMime" |
| 148 | properties: |
| 149 | parts: |
| 150 | - config: {get_resource: software_config} |
| 151 | - config: {get_resource: inject_files} |
Oleh Hryhorov | cd1a3bd | 2020-12-04 13:21:06 +0200 | [diff] [blame] | 152 | - config: {get_param: user_data_config} |
Vasyl Saienko | f9ee158 | 2020-03-02 16:53:41 +0200 | [diff] [blame] | 153 | |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 154 | server: |
| 155 | type: OS::Nova::Server |
| 156 | properties: |
Mykyta Karpin | 8b16456 | 2021-03-19 15:20:23 +0200 | [diff] [blame] | 157 | config_drive: true |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 158 | image: { get_param: image } |
| 159 | flavor: { get_param: flavor } |
| 160 | key_name: { get_param: key_name } |
Vasyl Saienko | fa9bed0 | 2021-11-04 18:52:45 +0200 | [diff] [blame] | 161 | availability_zone: { get_param: availability_zone } |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 162 | networks: |
| 163 | - port: { get_resource: accessible_server_port } |
| 164 | - port: { get_resource: private_floating_server_port } |
Vasyl Saienko | f9ee158 | 2020-03-02 16:53:41 +0200 | [diff] [blame] | 165 | user_data_format: SOFTWARE_CONFIG |
| 166 | user_data: { get_resource: install_config_agent} |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 167 | metadata: { get_param: metadata } |
| 168 | |
| 169 | accessible_server_port: |
| 170 | type: OS::Neutron::Port |
| 171 | properties: |
| 172 | network_id: { get_param: accessible_network } |
| 173 | port_security_enabled: false |
| 174 | fixed_ips: |
| 175 | - subnet: { get_param: accessible_subnet_id } |
| 176 | |
| 177 | private_floating_server_port: |
| 178 | type: OS::Neutron::Port |
| 179 | properties: |
| 180 | network_id: { get_param: private_floating_network } |
| 181 | port_security_enabled: false |
| 182 | fixed_ips: |
| 183 | - subnet: { get_param: private_floating_subnet_id } |
| 184 | |
| 185 | server_floating_ip: |
| 186 | type: OS::Neutron::FloatingIP |
| 187 | properties: |
| 188 | floating_network_id: { get_param: public_net_id } |
| 189 | port_id: { get_resource: accessible_server_port } |
| 190 | |
| 191 | wait_handle: |
| 192 | type: OS::Heat::WaitConditionHandle |
| 193 | wait_condition: |
| 194 | type: OS::Heat::WaitCondition |
| 195 | properties: |
| 196 | handle: { get_resource: wait_handle } |
| 197 | timeout: { get_param: boot_timeout } |
| 198 | |
| 199 | outputs: |
| 200 | server_private_ip: |
| 201 | description: IP address of server in private network |
| 202 | value: { get_attr: [server, networks, { get_param: accessible_network}, 0]} |
| 203 | server_private_floating_ip: |
| 204 | description: IP address of server in private floating network |
Oleh Hryhorov | cd1a3bd | 2020-12-04 13:21:06 +0200 | [diff] [blame] | 205 | value: [ { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] } ] |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 206 | server_public_ip: |
| 207 | description: Floating IP address of server in public network |
| 208 | value: { get_attr: [ server_floating_ip, floating_ip_address ] } |
Vasyl Saienko | f9ee158 | 2020-03-02 16:53:41 +0200 | [diff] [blame] | 209 | wc_data: |
| 210 | description: Metadata from instance |
| 211 | value: { get_attr: [wait_condition, data]} |