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 |
| 46 | default: '' |
Mykyta Karpin | 5ed5fd8 | 2020-01-27 18:23:29 +0200 | [diff] [blame] | 47 | docker_ee_release: |
| 48 | type: string |
Vasyl Saienko | fa71410 | 2024-03-22 09:30:25 +0200 | [diff] [blame^] | 49 | docker_ee_packages: |
| 50 | type: string |
Mykyta Karpin | 5ed5fd8 | 2020-01-27 18:23:29 +0200 | [diff] [blame] | 51 | docker_ee_url: |
| 52 | type: string |
Vasyl Saienko | b59853e | 2020-05-25 10:15:26 +0300 | [diff] [blame] | 53 | docker_ucp_image: |
| 54 | type: string |
Stepan Rogov | 60bc352 | 2020-12-16 17:43:25 +0300 | [diff] [blame] | 55 | docker_default_address_pool: |
| 56 | type: string |
Vasyl Saienko | a94bf18 | 2023-04-01 10:42:17 +0000 | [diff] [blame] | 57 | binary_base_url: |
| 58 | type: string |
Vasyl Saienko | f9ee158 | 2020-03-02 16:53:41 +0200 | [diff] [blame] | 59 | hardware_metadata: |
| 60 | description: The content of lab metadata. |
| 61 | default: '' |
| 62 | type: string |
Vasyl Saienko | fa9bed0 | 2021-11-04 18:52:45 +0200 | [diff] [blame] | 63 | availability_zone: |
| 64 | type: string |
| 65 | default: nova |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 66 | |
| 67 | resources: |
| 68 | |
| 69 | software_config: |
| 70 | type: OS::Heat::SoftwareConfig |
| 71 | properties: |
| 72 | group: ungrouped |
| 73 | config: |
| 74 | str_replace: |
| 75 | template: { get_file: ../scripts/instance_boot.sh } |
| 76 | params: |
| 77 | $node_type: { get_param: node_type } |
Vasyl Saienko | 8d34ad0 | 2021-07-26 11:55:23 +0300 | [diff] [blame] | 78 | $kubernetes_installer: { get_param: kubernetes_installer } |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 79 | $wait_condition_notify: { get_attr: [ wait_handle, curl_cli ] } |
Mykyta Karpin | 5ed5fd8 | 2020-01-27 18:23:29 +0200 | [diff] [blame] | 80 | $docker_ee_url: { get_param: docker_ee_url } |
Vasyl Saienko | fa71410 | 2024-03-22 09:30:25 +0200 | [diff] [blame^] | 81 | $docker_ee_packages: { get_param: docker_ee_packages } |
Mykyta Karpin | 5ed5fd8 | 2020-01-27 18:23:29 +0200 | [diff] [blame] | 82 | $docker_ee_release: { get_param: docker_ee_release } |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 83 | $ucp_master_host: { get_param: ucp_master_host } |
Vasyl Saienko | 84ee4fd | 2020-09-02 10:00:18 +0300 | [diff] [blame] | 84 | $docker_ucp_image: { get_param: docker_ucp_image } |
Vasyl Saienko | a94bf18 | 2023-04-01 10:42:17 +0000 | [diff] [blame] | 85 | $binary_base_url: { get_param: binary_base_url } |
Stepan Rogov | 60bc352 | 2020-12-16 17:43:25 +0300 | [diff] [blame] | 86 | $docker_default_address_pool: { get_param: docker_default_address_pool } |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 87 | $node_metadata: { get_param: metadata } |
Vasyl Saienko | 0fa6f19 | 2020-03-06 16:08:51 +0200 | [diff] [blame] | 88 | $control_network_cidr: { get_param: control_network_cidr } |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 89 | $private_floating_interface: { get_param: private_floating_interface } |
Oleh Hryhorov | ca77209 | 2020-02-13 11:15:17 +0200 | [diff] [blame] | 90 | $private_floating_network_cidr: { get_param: private_floating_network_cidr } |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 91 | $private_floating_interface_ip: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] } |
| 92 | $functions_override: { get_param: functions_override } |
| 93 | |
Vasyl Saienko | f9ee158 | 2020-03-02 16:53:41 +0200 | [diff] [blame] | 94 | inject_files: |
| 95 | type: "OS::Heat::CloudConfig" |
| 96 | properties: |
| 97 | cloud_config: |
| 98 | write_files: |
| 99 | - path: /usr/sbin/prepare-metadata.py |
| 100 | owner: "root:root" |
| 101 | permissions: "0755" |
| 102 | content: {get_file: ../scripts/prepare-metadata.py} |
| 103 | - path: /usr/share/metadata/lab-metadata.yaml |
| 104 | owner: "root:root" |
| 105 | permissions: "0644" |
| 106 | content: { get_param: hardware_metadata} |
| 107 | |
| 108 | install_config_agent: |
| 109 | type: "OS::Heat::MultipartMime" |
| 110 | properties: |
| 111 | parts: |
| 112 | - config: {get_resource: software_config} |
| 113 | - config: {get_resource: inject_files} |
| 114 | |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 115 | server: |
| 116 | type: OS::Nova::Server |
| 117 | properties: |
Mykyta Karpin | 8b16456 | 2021-03-19 15:20:23 +0200 | [diff] [blame] | 118 | config_drive: true |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 119 | image: { get_param: image } |
| 120 | flavor: { get_param: flavor } |
| 121 | key_name: { get_param: key_name } |
Vasyl Saienko | fa9bed0 | 2021-11-04 18:52:45 +0200 | [diff] [blame] | 122 | availability_zone: { get_param: availability_zone } |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 123 | networks: |
| 124 | - network: { get_param: accessible_network } |
Vasyl Saienko | f9ee158 | 2020-03-02 16:53:41 +0200 | [diff] [blame] | 125 | user_data_format: SOFTWARE_CONFIG |
| 126 | user_data: { get_resource: install_config_agent} |
Oleh Hryhorov | b58460e | 2020-02-05 15:53:48 +0200 | [diff] [blame] | 127 | metadata: { get_param: metadata } |
| 128 | |
| 129 | private_floating_server_port: |
| 130 | type: OS::Neutron::Port |
| 131 | properties: |
| 132 | network_id: { get_param: private_floating_network } |
| 133 | port_security_enabled: false |
| 134 | fixed_ips: |
| 135 | - subnet: { get_param: private_floating_subnet_id } |
| 136 | |
| 137 | wait_handle: |
| 138 | type: OS::Heat::WaitConditionHandle |
| 139 | wait_condition: |
| 140 | type: OS::Heat::WaitCondition |
| 141 | properties: |
| 142 | handle: { get_resource: wait_handle } |
| 143 | timeout: { get_param: boot_timeout } |
| 144 | |
| 145 | |
| 146 | outputs: |
| 147 | server_private_ip: |
| 148 | description: IP address of server in private network |
| 149 | value: { get_attr: [server, networks, { get_param: accessible_network}, 0]} |
| 150 | server_private_floating_ip: |
| 151 | description: IP address of server in private floating network |
| 152 | value: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] } |
| 153 | server_public_ip: |
| 154 | description: Floating IP address of server in public network |
| 155 | value: { get_attr: [server, networks, { get_param: accessible_network}, 0]} |
Vasyl Saienko | f9ee158 | 2020-03-02 16:53:41 +0200 | [diff] [blame] | 156 | wc_data: |
| 157 | description: Metadata from instance |
| 158 | value: { get_attr: [wait_condition, data]} |