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 |
| 10 | key_name: |
| 11 | type: string |
| 12 | description: Name of keypair to assign to servers |
| 13 | image: |
| 14 | type: string |
| 15 | description: Name of image to use for servers |
| 16 | flavor: |
| 17 | type: string |
| 18 | description: Flavor to use for servers |
| 19 | accessible_network: |
| 20 | type: string |
| 21 | accessible_subnet_id: |
| 22 | type: string |
| 23 | private_floating_network: |
| 24 | type: string |
| 25 | private_floating_network_cidr: |
| 26 | type: string |
| 27 | private_floating_subnet_id: |
| 28 | type: string |
| 29 | private_floating_interface: |
| 30 | type: string |
| 31 | storage_frontend_network_cidr: |
| 32 | type: string |
| 33 | storage_frontend_network: |
| 34 | type: string |
| 35 | storage_frontend_subnet_id: |
| 36 | type: string |
Oleh Hryhorov | 1832d23 | 2020-03-05 11:33:13 +0200 | [diff] [blame] | 37 | storage_frontend_interface: |
| 38 | type: string |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 39 | host_interface: |
| 40 | type: string |
| 41 | functions_override: |
| 42 | type: string |
| 43 | boot_timeout: |
| 44 | type: number |
| 45 | description: Boot timeout for instance |
| 46 | default: 1200 |
| 47 | ucp_master_host: |
| 48 | type: string |
| 49 | default: '' |
| 50 | public_net_id: |
| 51 | type: string |
| 52 | default: '' |
| 53 | docker_ee_release: |
| 54 | type: string |
| 55 | docker_ee_url: |
| 56 | type: string |
| 57 | |
| 58 | resources: |
| 59 | |
| 60 | software_config: |
| 61 | type: OS::Heat::SoftwareConfig |
| 62 | properties: |
| 63 | group: ungrouped |
| 64 | config: |
| 65 | str_replace: |
| 66 | template: { get_file: ../scripts/instance_boot.sh } |
| 67 | params: |
| 68 | $node_type: { get_param: node_type } |
| 69 | $wait_condition_notify: { get_attr: [ wait_handle, curl_cli ] } |
| 70 | $ucp_license_key: { get_file: ../scripts/license.lic } |
| 71 | $docker_ee_url: { get_param: docker_ee_url } |
| 72 | $docker_ee_release: { get_param: docker_ee_release } |
| 73 | $ucp_master_host: { get_param: ucp_master_host } |
| 74 | $node_metadata: { get_param: metadata } |
| 75 | $host_interface: { get_param: host_interface } |
| 76 | $private_floating_interface: { get_param: private_floating_interface } |
| 77 | $private_floating_network_cidr: { get_param: private_floating_network_cidr } |
| 78 | $private_floating_interface_ip: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] } |
| 79 | $functions_override: { get_param: functions_override } |
Oleh Hryhorov | 1832d23 | 2020-03-05 11:33:13 +0200 | [diff] [blame] | 80 | $storage_frontend_interface: { get_param: storage_frontend_interface } |
Oleh Hryhorov | dccb1cd | 2020-03-04 15:52:55 +0200 | [diff] [blame] | 81 | $storage_frontend_network_interface_ip: { get_attr: [storage_frontend_server_port, fixed_ips, 0, ip_address] } |
| 82 | $storage_frontend_network_cidr: { get_param: storage_frontend_network_cidr } |
| 83 | |
| 84 | server: |
| 85 | type: OS::Nova::Server |
| 86 | properties: |
| 87 | image: { get_param: image } |
| 88 | flavor: { get_param: flavor } |
| 89 | key_name: { get_param: key_name } |
| 90 | availability_zone: nova |
| 91 | networks: |
| 92 | - network: { get_param: accessible_network } |
| 93 | # NOTE(ohryhorov): connect to accessible network only as ironic doesn't |
| 94 | # support multitenancy use-case. Use private_floating_network for IPAM only. |
| 95 | user_data_format: RAW |
| 96 | user_data: { get_resource: software_config } |
| 97 | metadata: { get_param: metadata } |
| 98 | |
| 99 | private_floating_server_port: |
| 100 | type: OS::Neutron::Port |
| 101 | properties: |
| 102 | network_id: { get_param: private_floating_network } |
| 103 | port_security_enabled: false |
| 104 | fixed_ips: |
| 105 | - subnet: { get_param: private_floating_subnet_id } |
| 106 | |
| 107 | storage_frontend_server_port: |
| 108 | type: OS::Neutron::Port |
| 109 | properties: |
| 110 | network_id: { get_param: storage_frontend_network } |
| 111 | port_security_enabled: false |
| 112 | fixed_ips: |
| 113 | - subnet: { get_param: storage_frontend_subnet_id } |
| 114 | |
| 115 | wait_handle: |
| 116 | type: OS::Heat::WaitConditionHandle |
| 117 | wait_condition: |
| 118 | type: OS::Heat::WaitCondition |
| 119 | properties: |
| 120 | handle: { get_resource: wait_handle } |
| 121 | timeout: { get_param: boot_timeout } |
| 122 | |
| 123 | |
| 124 | outputs: |
| 125 | server_private_ip: |
| 126 | description: IP address of server in private network |
| 127 | value: { get_attr: [server, networks, { get_param: accessible_network}, 0]} |
| 128 | server_private_floating_ip: |
| 129 | description: IP address of server in private floating network |
| 130 | value: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] } |
| 131 | server_public_ip: |
| 132 | description: Floating IP address of server in public network |
| 133 | value: { get_attr: [server, networks, { get_param: accessible_network}, 0]} |