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