blob: 0991319c2f687b6b641c90fbd99fa19fe51252b1 [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
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_backend_network_cidr:
32 type: string
33 storage_backend_network:
34 type: string
35 storage_backend_subnet_id:
36 type: string
37 storage_backend_interface:
38 type: string
39 storage_frontend_network:
40 type: string
41 storage_frontend_network_cidr:
42 type: string
43 storage_frontend_subnet_id:
44 type: string
45 storage_frontend_interface:
46 type: string
47 host_interface:
48 type: string
49 functions_override:
50 type: string
51 boot_timeout:
52 type: number
53 description: Boot timeout for instance
54 default: 1200
55 ucp_master_host:
56 type: string
57 default: ''
58 public_net_id:
59 type: string
60 default: ''
61 docker_ee_release:
62 type: string
63 docker_ee_url:
64 type: string
65
66resources:
67
68 software_config:
69 type: OS::Heat::SoftwareConfig
70 properties:
71 group: ungrouped
72 config:
73 str_replace:
74 template: { get_file: ../scripts/instance_boot.sh }
75 params:
76 $node_type: { get_param: node_type }
77 $wait_condition_notify: { get_attr: [ wait_handle, curl_cli ] }
78 $ucp_license_key: { get_file: ../scripts/license.lic }
79 $docker_ee_url: { get_param: docker_ee_url }
80 $docker_ee_release: { get_param: docker_ee_release }
81 $ucp_master_host: { get_param: ucp_master_host }
82 $node_metadata: { get_param: metadata }
83 $host_interface: { get_param: host_interface }
84 $private_floating_interface: { get_param: private_floating_interface }
85 $private_floating_network_cidr: { get_param: private_floating_network_cidr }
86 $private_floating_interface_ip: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] }
87 $functions_override: { get_param: functions_override }
88 $storage_frontend_interface: { get_param: storage_frontend_interface }
89 $storage_frontend_network_interface_ip: { get_attr: [storage_frontend_server_port, fixed_ips, 0, ip_address] }
90 $storage_frontend_network_cidr: { get_param: storage_frontend_network_cidr }
91 $storage_backend_interface: { get_param: storage_backend_interface }
92 $storage_backend_network_interface_ip: { get_attr: [storage_backend_server_port, fixed_ips, 0, ip_address] }
93 $storage_backend_network_cidr: { get_param: storage_backend_network_cidr }
94
95 server:
96 type: OS::Nova::Server
97 properties:
98 image: { get_param: image }
99 flavor: { get_param: flavor }
100 key_name: { get_param: key_name }
101 availability_zone: nova
102 networks:
103 - network: { get_param: accessible_network }
104 # NOTE(ohryhorov): connect to accessible network only as ironic doesn't
105 # support multitenancy use-case. Use private_floating_network for IPAM only.
106 user_data_format: RAW
107 user_data: { get_resource: software_config }
108 metadata: { get_param: metadata }
109
110 private_floating_server_port:
111 type: OS::Neutron::Port
112 properties:
113 network_id: { get_param: private_floating_network }
114 port_security_enabled: false
115 fixed_ips:
116 - subnet: { get_param: private_floating_subnet_id }
117
118 storage_backend_server_port:
119 type: OS::Neutron::Port
120 properties:
121 network_id: { get_param: storage_backend_network }
122 port_security_enabled: false
123 fixed_ips:
124 - subnet: { get_param: storage_backend_subnet_id }
125
126 storage_frontend_server_port:
127 type: OS::Neutron::Port
128 properties:
129 network_id: { get_param: storage_frontend_network }
130 port_security_enabled: false
131 fixed_ips:
132 - subnet: { get_param: storage_frontend_subnet_id }
133
134 wait_handle:
135 type: OS::Heat::WaitConditionHandle
136 wait_condition:
137 type: OS::Heat::WaitCondition
138 properties:
139 handle: { get_resource: wait_handle }
140 timeout: { get_param: boot_timeout }
141
142
143outputs:
144 server_private_ip:
145 description: IP address of server in private network
146 value: { get_attr: [server, networks, { get_param: accessible_network}, 0]}
147 server_private_floating_ip:
148 description: IP address of server in private floating network
149 value: { get_attr: [private_floating_server_port, fixed_ips, 0, ip_address] }
150 server_public_ip:
151 description: Floating IP address of server in public network
152 value: { get_attr: [server, networks, { get_param: accessible_network}, 0]}