Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +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 | dccb1cd | 2020-03-04 15:52:55 +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 |
| 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 Saienko | 0fa6f19 | 2020-03-06 16:08:51 +0200 | [diff] [blame] | 49 | control_network_cidr: |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 50 | type: string |
Vasyl Saienko | 36f2edf | 2020-05-14 10:44:52 +0300 | [diff] [blame] | 51 | ironic_baremetal_network: |
| 52 | type: string |
| 53 | ironic_baremetal_subnet_id: |
| 54 | type: string |
Vasyl Saienko | 4c46819 | 2020-05-19 11:51:13 +0300 | [diff] [blame] | 55 | ironic_baremetal_network_cidr: |
Vasyl Saienko | 36f2edf | 2020-05-14 10:44:52 +0300 | [diff] [blame] | 56 | type: string |
Michael Polenchuk | 486cadf | 2020-08-24 16:25:51 +0400 | [diff] [blame] | 57 | ironic_baremetal_tunnel_cidr: |
| 58 | type: string |
| 59 | ironic_mt_enabled: |
| 60 | type: boolean |
Anton Samoylov | 13b055e | 2020-07-23 15:44:07 +0400 | [diff] [blame] | 61 | tungstenfabric_enabled: |
| 62 | type: boolean |
Oleh Hryhorov | e7feab4 | 2020-11-11 18:00:29 +0200 | [diff] [blame] | 63 | tun_network: |
Anton Samoylov | 13b055e | 2020-07-23 15:44:07 +0400 | [diff] [blame] | 64 | type: string |
Oleh Hryhorov | e7feab4 | 2020-11-11 18:00:29 +0200 | [diff] [blame] | 65 | tun_subnet_id: |
Anton Samoylov | 13b055e | 2020-07-23 15:44:07 +0400 | [diff] [blame] | 66 | type: string |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 67 | functions_override: |
| 68 | type: string |
| 69 | boot_timeout: |
| 70 | type: number |
| 71 | description: Boot timeout for instance |
Vasyl Saienko | f36f39c | 2020-03-10 00:21:42 +0200 | [diff] [blame] | 72 | default: 3600 |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 73 | ucp_master_host: |
| 74 | type: string |
| 75 | default: '' |
Vasyl Saienko | 84ee4fd | 2020-09-02 10:00:18 +0300 | [diff] [blame] | 76 | docker_ucp_image: |
| 77 | type: string |
Stepan Rogov | 60bc352 | 2020-12-16 17:43:25 +0300 | [diff] [blame] | 78 | docker_default_address_pool: |
| 79 | type: string |
Vasyl Saienko | a94bf18 | 2023-04-01 10:42:17 +0000 | [diff] [blame] | 80 | binary_base_url: |
| 81 | type: string |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 82 | public_net_id: |
| 83 | type: string |
| 84 | default: '' |
| 85 | docker_ee_release: |
| 86 | type: string |
| 87 | docker_ee_url: |
| 88 | type: string |
Vasyl Saienko | f9ee158 | 2020-03-02 16:53:41 +0200 | [diff] [blame] | 89 | hardware_metadata: |
| 90 | description: The content of lab metadata. |
| 91 | type: string |
Vasyl Saienko | 846c634 | 2021-02-24 17:01:36 +0200 | [diff] [blame] | 92 | frr_bgp_neighbors: |
| 93 | description: Comma separated list of IP of BGP neighbors |
| 94 | default: '' |
| 95 | type: string |
Denis Egorenko | e09856a | 2021-11-01 13:52:46 +0400 | [diff] [blame] | 96 | num_volumes: |
| 97 | type: number |
| 98 | default: 0 |
Vasyl Saienko | fa9bed0 | 2021-11-04 18:52:45 +0200 | [diff] [blame] | 99 | availability_zone: |
| 100 | type: string |
| 101 | default: nova |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 102 | |
| 103 | resources: |
| 104 | |
| 105 | software_config: |
| 106 | type: OS::Heat::SoftwareConfig |
| 107 | properties: |
| 108 | group: ungrouped |
| 109 | config: |
| 110 | str_replace: |
| 111 | template: { get_file: ../scripts/instance_boot.sh } |
| 112 | params: |
| 113 | $node_type: { get_param: node_type } |
Vasyl Saienko | 8d34ad0 | 2021-07-26 11:55:23 +0300 | [diff] [blame] | 114 | $kubernetes_installer: { get_param: kubernetes_installer } |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 115 | $wait_condition_notify: { get_attr: [ wait_handle, curl_cli ] } |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 116 | $docker_ee_url: { get_param: docker_ee_url } |
| 117 | $docker_ee_release: { get_param: docker_ee_release } |
| 118 | $ucp_master_host: { get_param: ucp_master_host } |
Vasyl Saienko | 84ee4fd | 2020-09-02 10:00:18 +0300 | [diff] [blame] | 119 | $docker_ucp_image: { get_param: docker_ucp_image } |
Stepan Rogov | 60bc352 | 2020-12-16 17:43:25 +0300 | [diff] [blame] | 120 | $docker_default_address_pool: { get_param: docker_default_address_pool } |
Vasyl Saienko | a94bf18 | 2023-04-01 10:42:17 +0000 | [diff] [blame] | 121 | $binary_base_url: { get_param: binary_base_url } |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 122 | $node_metadata: { get_param: metadata } |
Vasyl Saienko | 0fa6f19 | 2020-03-06 16:08:51 +0200 | [diff] [blame] | 123 | $control_network_cidr: { get_param: control_network_cidr } |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 124 | $private_floating_interface: { get_param: private_floating_interface } |
| 125 | $private_floating_network_cidr: { get_param: private_floating_network_cidr } |
| 126 | $private_floating_interface_ip: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] } |
| 127 | $functions_override: { get_param: functions_override } |
| 128 | $storage_frontend_interface: { get_param: storage_frontend_interface } |
| 129 | $storage_frontend_network_interface_ip: { get_attr: [storage_frontend_server_port, fixed_ips, 0, ip_address] } |
| 130 | $storage_frontend_network_cidr: { get_param: storage_frontend_network_cidr } |
| 131 | $storage_backend_interface: { get_param: storage_backend_interface } |
| 132 | $storage_backend_network_interface_ip: { get_attr: [storage_backend_server_port, fixed_ips, 0, ip_address] } |
| 133 | $storage_backend_network_cidr: { get_param: storage_backend_network_cidr } |
Vasyl Saienko | 36f2edf | 2020-05-14 10:44:52 +0300 | [diff] [blame] | 134 | $ironic_baremetal_interface_ip: { get_attr: [ironic_baremetal_server_port, fixed_ips, 0, ip_address] } |
Vasyl Saienko | 4c46819 | 2020-05-19 11:51:13 +0300 | [diff] [blame] | 135 | $ironic_baremetal_network_cidr: { get_param: ironic_baremetal_network_cidr } |
Michael Polenchuk | 486cadf | 2020-08-24 16:25:51 +0400 | [diff] [blame] | 136 | $ironic_baremetal_tunnel_cidr: { get_param: ironic_baremetal_tunnel_cidr } |
| 137 | $ironic_mt_enabled: { get_param: ironic_mt_enabled } |
Vasyl Saienko | 3dd0c27 | 2020-11-16 17:20:07 +0200 | [diff] [blame] | 138 | $tunnel_interface_ip: { get_attr: [tun_server_port, fixed_ips, 0, ip_address] } |
Vasyl Saienko | 846c634 | 2021-02-24 17:01:36 +0200 | [diff] [blame] | 139 | $frr_bgp_neighbors: { get_param: frr_bgp_neighbors } |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 140 | |
Vasyl Saienko | f9ee158 | 2020-03-02 16:53:41 +0200 | [diff] [blame] | 141 | inject_files: |
| 142 | type: "OS::Heat::CloudConfig" |
| 143 | properties: |
| 144 | cloud_config: |
| 145 | write_files: |
| 146 | - path: /usr/sbin/prepare-metadata.py |
| 147 | owner: "root:root" |
| 148 | permissions: "0755" |
| 149 | content: {get_file: ../scripts/prepare-metadata.py} |
| 150 | - path: /usr/share/metadata/lab-metadata.yaml |
| 151 | owner: "root:root" |
| 152 | permissions: "0644" |
| 153 | content: { get_param: hardware_metadata} |
| 154 | |
| 155 | install_config_agent: |
| 156 | type: "OS::Heat::MultipartMime" |
| 157 | properties: |
| 158 | parts: |
| 159 | - config: {get_resource: software_config} |
| 160 | - config: {get_resource: inject_files} |
| 161 | |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 162 | server: |
| 163 | type: OS::Nova::Server |
| 164 | properties: |
Mykyta Karpin | 8b16456 | 2021-03-19 15:20:23 +0200 | [diff] [blame] | 165 | config_drive: true |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 166 | image: { get_param: image } |
| 167 | flavor: { get_param: flavor } |
| 168 | key_name: { get_param: key_name } |
Vasyl Saienko | fa9bed0 | 2021-11-04 18:52:45 +0200 | [diff] [blame] | 169 | availability_zone: { get_param: availability_zone } |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 170 | networks: |
| 171 | - network: { get_param: accessible_network } |
| 172 | # NOTE(ohryhorov): connect to accessible network only as ironic doesn't |
| 173 | # support multitenancy use-case. Use private_floating_network for IPAM only. |
Vasyl Saienko | 36f2edf | 2020-05-14 10:44:52 +0300 | [diff] [blame] | 174 | # NOTE(vsaienko): ditto about ironic network |
Vasyl Saienko | f9ee158 | 2020-03-02 16:53:41 +0200 | [diff] [blame] | 175 | user_data_format: SOFTWARE_CONFIG |
| 176 | user_data: { get_resource: install_config_agent} |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 177 | metadata: { get_param: metadata } |
| 178 | |
| 179 | private_floating_server_port: |
| 180 | type: OS::Neutron::Port |
| 181 | properties: |
| 182 | network_id: { get_param: private_floating_network } |
| 183 | port_security_enabled: false |
| 184 | fixed_ips: |
| 185 | - subnet: { get_param: private_floating_subnet_id } |
| 186 | |
| 187 | storage_backend_server_port: |
| 188 | type: OS::Neutron::Port |
| 189 | properties: |
| 190 | network_id: { get_param: storage_backend_network } |
| 191 | port_security_enabled: false |
| 192 | fixed_ips: |
| 193 | - subnet: { get_param: storage_backend_subnet_id } |
| 194 | |
| 195 | storage_frontend_server_port: |
| 196 | type: OS::Neutron::Port |
| 197 | properties: |
| 198 | network_id: { get_param: storage_frontend_network } |
| 199 | port_security_enabled: false |
| 200 | fixed_ips: |
| 201 | - subnet: { get_param: storage_frontend_subnet_id } |
| 202 | |
Vasyl Saienko | 36f2edf | 2020-05-14 10:44:52 +0300 | [diff] [blame] | 203 | ironic_baremetal_server_port: |
| 204 | type: OS::Neutron::Port |
| 205 | properties: |
| 206 | network_id: { get_param: ironic_baremetal_network } |
| 207 | port_security_enabled: false |
| 208 | fixed_ips: |
| 209 | - subnet: { get_param: ironic_baremetal_subnet_id } |
| 210 | |
Oleh Hryhorov | e7feab4 | 2020-11-11 18:00:29 +0200 | [diff] [blame] | 211 | tun_server_port: |
Anton Samoylov | 13b055e | 2020-07-23 15:44:07 +0400 | [diff] [blame] | 212 | type: OS::Neutron::Port |
Anton Samoylov | 13b055e | 2020-07-23 15:44:07 +0400 | [diff] [blame] | 213 | properties: |
Oleh Hryhorov | e7feab4 | 2020-11-11 18:00:29 +0200 | [diff] [blame] | 214 | network_id: { get_param: tun_network } |
Anton Samoylov | 13b055e | 2020-07-23 15:44:07 +0400 | [diff] [blame] | 215 | port_security_enabled: false |
| 216 | fixed_ips: |
Oleh Hryhorov | e7feab4 | 2020-11-11 18:00:29 +0200 | [diff] [blame] | 217 | - subnet: { get_param: tun_subnet_id } |
Anton Samoylov | 13b055e | 2020-07-23 15:44:07 +0400 | [diff] [blame] | 218 | |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 219 | wait_handle: |
| 220 | type: OS::Heat::WaitConditionHandle |
| 221 | wait_condition: |
| 222 | type: OS::Heat::WaitCondition |
| 223 | properties: |
| 224 | handle: { get_resource: wait_handle } |
| 225 | timeout: { get_param: boot_timeout } |
| 226 | |
| 227 | |
| 228 | outputs: |
| 229 | server_private_ip: |
| 230 | description: IP address of server in private network |
| 231 | value: { get_attr: [server, networks, { get_param: accessible_network}, 0]} |
| 232 | server_private_floating_ip: |
| 233 | description: IP address of server in private floating network |
| 234 | value: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] } |
Vasyl Saienko | 4e3f463 | 2020-05-26 14:43:09 +0300 | [diff] [blame] | 235 | server_ironic_baremetal_ip: |
| 236 | description: IP address of server in ironic baremetal network |
| 237 | value: { get_attr: [ironic_baremetal_server_port, fixed_ips, 0, ip_address] } |
Anton Samoylov | 13b055e | 2020-07-23 15:44:07 +0400 | [diff] [blame] | 238 | server_tf_data_ip: |
| 239 | description: IP address of server in tf data network |
Oleh Hryhorov | e7feab4 | 2020-11-11 18:00:29 +0200 | [diff] [blame] | 240 | value: { get_attr: [tun_server_port, fixed_ips, 0, ip_address] } |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 241 | server_public_ip: |
| 242 | description: Floating IP address of server in public network |
| 243 | value: { get_attr: [server, networks, { get_param: accessible_network}, 0]} |
Vasyl Saienko | 846c634 | 2021-02-24 17:01:36 +0200 | [diff] [blame] | 244 | server_tun_ip: |
| 245 | description: IP address of server in tunnel network |
| 246 | value: { get_attr: [ tun_server_port, fixed_ips, 0, ip_address ] } |
Vasyl Saienko | f9ee158 | 2020-03-02 16:53:41 +0200 | [diff] [blame] | 247 | wc_data: |
| 248 | description: Metadata from instance |
| 249 | value: { get_attr: [wait_condition, data]} |