1 # yamllint disable-line rule:document-start
2 heat_template_version: 2016-10-14
4 description: "K8 master VM"
9 description: management ssh key
14 description: Hostname of the K8s master node
19 default: "k8s_master_vol"
23 description: management network
24 default: "k8s_mgmt_net"
28 description: Kubernetes service network
29 default: "k8s_int_net"
33 description: k8s_master management IP (fixed)
37 description: k8 pod_net cidr used for setting up k8s cluster
41 description: k8 pod_net cidr used for setting up k8s cluster
45 description: k8 service IP addr used for setting up k8s cluster
49 description: User id to connect to the VMs (ssh)
54 description: Access password for the user to connect to the VMs (ssh)
59 description: Public IP pool
71 cond_floating_ip: {equals: [{get_param: enable_floating_ip}, true]}
72 has_dpdk: {equals: [{get_param: has_dpdk}, true]}
76 type: OS::Nova::Flavor
83 type: OS::Nova::Flavor
89 "hw:mem_page_size": large
90 "hw:cpu_policy": dedicated
91 "aggregate_instance_extra_specs:pinned": "true"
96 type: OS::Nova::FloatingIP
97 condition: cond_floating_ip
99 pool: {get_param: public_ip_pool}
101 server_association_fip:
102 type: OS::Nova::FloatingIPAssociation
103 condition: cond_floating_ip
105 floating_ip: {get_resource: server_fip}
106 server_id: {get_resource: server}
109 type: OS::Neutron::Port
111 network: {get_param: k8s_mgmt_net}
112 port_security_enabled: false
114 # - {get_resource: server_security_group}
117 type: OS::Neutron::Port
119 network: {get_param: k8s_int_net}
120 port_security_enabled: false
122 # - {get_resource: server_security_group}
123 fixed_ips: [{"ip_address": {get_param: k8s_master_ip}}]
125 server_cloudinit_config:
126 type: OS::Heat::CloudConfig
130 chpasswd: {expire: false}
132 manage_etc_hosts: true
136 type: OS::Heat::SoftwareConfig
140 template: {get_file: k8s_master_init.sh}
142 k8s_master_hostname: {get_param: k8s_master_hostname}
143 k8s_master_ip: {get_param: k8s_master_ip}
144 k8s_pod_net_cidr: {get_param: k8s_pod_net_cidr}
145 k8s_svc_net_cidr: {get_param: k8s_svc_net_cidr}
146 k8s_cluster_ip: {get_param: k8s_cluster_ip}
147 k8s_user: {get_param: k8s_user}
150 type: OS::Heat::MultipartMime
153 - config: {get_resource: server_cloudinit_config}
154 - config: {get_resource: server_config}
156 server_security_group:
157 type: OS::Neutron::SecurityGroup
159 description: Security group for ssh and icmp
160 name: test-security-group
162 {remote_ip_prefix: 0.0.0.0/0,
165 port_range_max: 65535},
166 {remote_ip_prefix: 0.0.0.0/0,
169 port_range_max: 65535},
170 {remote_ip_prefix: 0.0.0.0/0, protocol: icmp}
174 # type: OS::Cinder::Volume
176 # description: 'user: Volume for Node1'
178 # name: {get_param: k8s_master_vol}
180 # availability_zone: nova
183 type: OS::Nova::Server
186 key_name: {get_param: key_name}
187 flavor: {get_resource: {if: ["has_dpdk", "flavor_dpdk", "flavor"]}}
189 # block_device_mapping: [
190 # {device_name: "vda",
192 # {get_resource: k8s_master_volume},
193 # delete_on_termination: true
196 user_data: {get_resource: server_user_data}
197 user_data_format: RAW
199 - port: {get_resource: mgmt_port}
200 - port: {get_resource: int_net_port}