blob: 272d90fce8acf4f8eef89d0703af618c869cbf06 [file] [log] [blame]
Anton Samoylove2e969e2024-10-03 15:28:31 +04001heat_template_version: queens
2
3parameters:
4 controllers_size:
5 type: number
6 description: Number of masters instances to deploy
7 default: 1
8 workers_size:
9 type: number
10 description: Number of workers to deploy
11 default: 3
12 image:
13 type: string
14 description: Name of image to use for servers
15 availability_zone:
16 type: string
17 default: "nova"
18 masters_flavor:
19 type: string
20 default: 'system.compact.openstack.control'
21 workers_flavor:
22 type: string
23 default: 'system.compact.openstack.control'
24 cluster_public_key:
25 type: string
26 public_net_id:
27 type: string
28 default: ''
29 description: >
30 UUID of public network
31 k8s_network_cidr:
32 type: string
33 description: The CIDR of k8s network
34 default: '10.10.0.0/24'
Anton Samoylovafd066e2025-08-27 10:58:38 +040035 k8s_network_ipv6_cidr:
36 type: string
37 description: The CIDR of k8s network IPV6
38 default: 'fd12:3456:789a:0a0a::/64'
Ilya Bumarskov9ec1a262025-09-10 12:08:03 +020039 k8s_network_ipv6_gw_ip:
40 type: string
41 description: The GW of k8s network IPV6
42 default: 'fd12:3456:789a:0a0a::1'
Anton Samoylove2e969e2024-10-03 15:28:31 +040043 data_network_cidr:
44 type: string
45 description: The CIDR of k8s network
46 default: '10.11.0.0/24'
Anton Samoylov17e7c032024-10-14 23:55:18 +040047 storage_backend_network_cidr:
48 type: string
49 default: '10.12.0.0/24'
50 storage_frontend_network_cidr:
51 type: string
52 default: '10.12.1.0/24'
Denis Egorenko9dd84da2025-09-23 15:05:32 +040053 storage_volumes_per_node:
54 type: number
55 default: 0
Anton Samoylove2e969e2024-10-03 15:28:31 +040056 dns_nameservers:
57 type: json
Anton Samoylov17e7c032024-10-14 23:55:18 +040058 default: ['172.18.224.6', '172.18.176.6']
59 hardware_metadata:
60 description: The content of lab metadata.
61 default: ''
62 type: string
63 worker_metadata:
64 type: json
65 default: {}
66 boot_timeout:
67 type: number
68 description: Boot timeout for instance
69 default: 600
Anton Samoylove2e969e2024-10-03 15:28:31 +040070
71resources:
72
73 keypair_name:
74 type: OS::Heat::RandomString
75 properties:
76 character_classes: [{"class": "hexdigits", "min": 1}]
77 length: 128
78 salt: constant
79 key_pair:
80 type: OS::Nova::KeyPair
81 properties:
82 name: { get_attr: [keypair_name, value] }
83 public_key: { get_param: cluster_public_key }
84 save_private_key: false
85
86 k8s_network:
87 type: OS::Neutron::Net
88 k8s_subnet:
89 type: OS::Neutron::Subnet
90 properties:
91 network: { get_resource: k8s_network }
92 enable_dhcp: false
93 cidr: { get_param: k8s_network_cidr }
94 dns_nameservers: { get_param: dns_nameservers }
Anton Samoylovafd066e2025-08-27 10:58:38 +040095 k8s_subnet_ipv6:
96 type: OS::Neutron::Subnet
97 properties:
98 ip_version: 6
99 network: { get_resource: k8s_network }
100 enable_dhcp: false
101 cidr: { get_param: k8s_network_ipv6_cidr }
Ilya Bumarskov9ec1a262025-09-10 12:08:03 +0200102 gateway_ip: { get_param: k8s_network_ipv6_gw_ip }
Anton Samoylove2e969e2024-10-03 15:28:31 +0400103 router:
104 type: OS::Neutron::Router
105 properties:
106 external_gateway_info:
107 network: { get_param: public_net_id }
108 public_router_iface:
109 type: OS::Neutron::RouterInterface
110 properties:
111 router: { get_resource: router }
112 subnet: { get_resource: k8s_subnet }
Ilya Bumarskov9ec1a262025-09-10 12:08:03 +0200113 public_router_iface_v6:
114 type: OS::Neutron::RouterInterface
115 properties:
116 router: { get_resource: router }
117 subnet: { get_resource: k8s_subnet_ipv6 }
Anton Samoylove2e969e2024-10-03 15:28:31 +0400118 data_network:
119 type: OS::Neutron::Net
120 data_subnet:
121 type: OS::Neutron::Subnet
122 properties:
123 network: { get_resource: data_network }
124 enable_dhcp: false
125 cidr: { get_param: data_network_cidr }
Anton Samoylov02a217c2024-10-08 13:54:07 +0400126 gateway_ip: ~
Anton Samoylove2e969e2024-10-03 15:28:31 +0400127
Anton Samoylov17e7c032024-10-14 23:55:18 +0400128 storage_backend_network:
129 type: OS::Neutron::Net
130 storage_backend_subnet:
131 type: OS::Neutron::Subnet
132 properties:
133 network: { get_resource: storage_backend_network }
134 enable_dhcp: false
135 cidr: { get_param: storage_backend_network_cidr }
136 gateway_ip: ~
137
138 storage_frontend_network:
139 type: OS::Neutron::Net
140 storage_frontend_subnet:
141 type: OS::Neutron::Subnet
142 properties:
143 network: { get_resource: storage_frontend_network }
144 enable_dhcp: false
145 cidr: { get_param: storage_frontend_network_cidr }
146 gateway_ip: ~
147
Anton Samoylove2e969e2024-10-03 15:28:31 +0400148 masters:
149 type: OS::Heat::ResourceGroup
150 depends_on:
151 - k8s_network
152 - data_network
153 - public_router_iface
154 properties:
155 count: { get_param: controllers_size }
156 resource_def:
157 type: VMInstances
158 properties:
Anton Samoylove2e969e2024-10-03 15:28:31 +0400159 k8s_network: { get_resource: k8s_network }
160 k8s_subnet_id: { get_resource: k8s_subnet }
Anton Samoylovafd066e2025-08-27 10:58:38 +0400161 k8s_subnet_ipv6_id: { get_resource: k8s_subnet_ipv6 }
Anton Samoylove2e969e2024-10-03 15:28:31 +0400162 public_net_id: { get_param: public_net_id }
Anton Samoylov17e7c032024-10-14 23:55:18 +0400163 storage_frontend_network: { get_resource: storage_frontend_network }
Anton Samoylove2e969e2024-10-03 15:28:31 +0400164 data_network: { get_resource: data_network }
165 availability_zone: { get_param: availability_zone }
166 image: { get_param: image }
167 flavor: { get_param: masters_flavor }
168 key_name: { get_attr: [keypair_name, value] }
Anton Samoylov17e7c032024-10-14 23:55:18 +0400169 boot_timeout: { get_param: boot_timeout }
Anton Samoylove2e969e2024-10-03 15:28:31 +0400170
171 workers:
172 type: OS::Heat::ResourceGroup
173 depends_on:
174 - k8s_network
175 - data_network
176 - public_router_iface
177 properties:
178 count: { get_param: workers_size }
179 resource_def:
Anton Samoylov17e7c032024-10-14 23:55:18 +0400180 type: VMInstancesCeph
Anton Samoylove2e969e2024-10-03 15:28:31 +0400181 properties:
Anton Samoylove2e969e2024-10-03 15:28:31 +0400182 k8s_network: { get_resource: k8s_network }
183 k8s_subnet_id: { get_resource: k8s_subnet }
Anton Samoylovafd066e2025-08-27 10:58:38 +0400184 k8s_subnet_ipv6_id: { get_resource: k8s_subnet_ipv6 }
Anton Samoylove2e969e2024-10-03 15:28:31 +0400185 public_net_id: { get_param: public_net_id }
Anton Samoylov17e7c032024-10-14 23:55:18 +0400186 storage_frontend_network: { get_resource: storage_frontend_network }
187 storage_backend_network: { get_resource: storage_backend_network }
Denis Egorenko9dd84da2025-09-23 15:05:32 +0400188 storage_volumes_per_node: { get_param: storage_volumes_per_node }
Anton Samoylove2e969e2024-10-03 15:28:31 +0400189 data_network: { get_resource: data_network }
190 availability_zone: { get_param: availability_zone }
191 image: { get_param: image }
192 flavor: { get_param: workers_flavor }
193 key_name: { get_attr: [keypair_name, value] }
Anton Samoylov17e7c032024-10-14 23:55:18 +0400194 metadata: { get_param: worker_metadata }
195 hardware_metadata: { get_param: hardware_metadata}
196 boot_timeout: { get_param: boot_timeout }
Anton Samoylove2e969e2024-10-03 15:28:31 +0400197
198outputs:
199 masters_ips:
200 description: Public IP addresses of the deployed masters instances
201 value: { get_attr: [masters, server_public_ip] }
202 workers_ips:
203 description: Public IP addresses of the deployed worker instances
204 value: { get_attr: [workers, server_public_ip] }
Anton Samoylov17e7c032024-10-14 23:55:18 +0400205 storage_frontend_network_cidr:
206 description: Storage network which is used as clientNet in Ceph CR
207 value: { get_param: storage_frontend_network_cidr }
208 storage_backend_network_cidr:
209 description: Storage network which is used as clusterNet in Ceph CR
210 value: { get_param: storage_backend_network_cidr }
211 workers_wc_data:
212 description: Metadata from workers
213 value: { get_attr: [workers, wc_data] }
Ilya Bumarskov9ec1a262025-09-10 12:08:03 +0200214 public_router_gw_ipv6:
215 description: Public gateway IPv6 address (used for kubevirt tests)
216 value: { get_param: k8s_network_ipv6_gw_ip }