blob: e8c492994d2e2ae1d9668754ca113ee5a92806ca [file] [log] [blame]
heat_template_version: queens
parameters:
controllers_size:
type: number
description: Number of masters instances to deploy
default: 1
workers_size:
type: number
description: Number of workers to deploy
default: 3
image:
type: string
description: Name of image to use for servers
availability_zone:
type: string
default: "nova"
masters_flavor:
type: string
default: 'system.compact.openstack.control'
workers_flavor:
type: string
default: 'system.compact.openstack.control'
cluster_public_key:
type: string
public_net_id:
type: string
default: ''
description: >
UUID of public network
k8s_network_cidr:
type: string
description: The CIDR of k8s network
default: '10.10.0.0/24'
data_network_cidr:
type: string
description: The CIDR of k8s network
default: '10.11.0.0/24'
storage_backend_network_cidr:
type: string
default: '10.12.0.0/24'
storage_frontend_network_cidr:
type: string
default: '10.12.1.0/24'
dns_nameservers:
type: json
default: ['172.18.224.6', '172.18.176.6']
hardware_metadata:
description: The content of lab metadata.
default: ''
type: string
worker_metadata:
type: json
default: {}
boot_timeout:
type: number
description: Boot timeout for instance
default: 600
resources:
keypair_name:
type: OS::Heat::RandomString
properties:
character_classes: [{"class": "hexdigits", "min": 1}]
length: 128
salt: constant
key_pair:
type: OS::Nova::KeyPair
properties:
name: { get_attr: [keypair_name, value] }
public_key: { get_param: cluster_public_key }
save_private_key: false
k8s_network:
type: OS::Neutron::Net
k8s_subnet:
type: OS::Neutron::Subnet
properties:
network: { get_resource: k8s_network }
enable_dhcp: false
cidr: { get_param: k8s_network_cidr }
dns_nameservers: { get_param: dns_nameservers }
router:
type: OS::Neutron::Router
properties:
external_gateway_info:
network: { get_param: public_net_id }
public_router_iface:
type: OS::Neutron::RouterInterface
properties:
router: { get_resource: router }
subnet: { get_resource: k8s_subnet }
data_network:
type: OS::Neutron::Net
data_subnet:
type: OS::Neutron::Subnet
properties:
network: { get_resource: data_network }
enable_dhcp: false
cidr: { get_param: data_network_cidr }
gateway_ip: ~
storage_backend_network:
type: OS::Neutron::Net
storage_backend_subnet:
type: OS::Neutron::Subnet
properties:
network: { get_resource: storage_backend_network }
enable_dhcp: false
cidr: { get_param: storage_backend_network_cidr }
gateway_ip: ~
storage_frontend_network:
type: OS::Neutron::Net
storage_frontend_subnet:
type: OS::Neutron::Subnet
properties:
network: { get_resource: storage_frontend_network }
enable_dhcp: false
cidr: { get_param: storage_frontend_network_cidr }
gateway_ip: ~
masters:
type: OS::Heat::ResourceGroup
depends_on:
- k8s_network
- data_network
- public_router_iface
properties:
count: { get_param: controllers_size }
resource_def:
type: VMInstances
properties:
k8s_network: { get_resource: k8s_network }
k8s_subnet_id: { get_resource: k8s_subnet }
public_net_id: { get_param: public_net_id }
storage_frontend_network: { get_resource: storage_frontend_network }
data_network: { get_resource: data_network }
availability_zone: { get_param: availability_zone }
image: { get_param: image }
flavor: { get_param: masters_flavor }
key_name: { get_attr: [keypair_name, value] }
boot_timeout: { get_param: boot_timeout }
workers:
type: OS::Heat::ResourceGroup
depends_on:
- k8s_network
- data_network
- public_router_iface
properties:
count: { get_param: workers_size }
resource_def:
type: VMInstancesCeph
properties:
k8s_network: { get_resource: k8s_network }
k8s_subnet_id: { get_resource: k8s_subnet }
public_net_id: { get_param: public_net_id }
storage_frontend_network: { get_resource: storage_frontend_network }
storage_backend_network: { get_resource: storage_backend_network }
data_network: { get_resource: data_network }
availability_zone: { get_param: availability_zone }
image: { get_param: image }
flavor: { get_param: workers_flavor }
key_name: { get_attr: [keypair_name, value] }
metadata: { get_param: worker_metadata }
hardware_metadata: { get_param: hardware_metadata}
boot_timeout: { get_param: boot_timeout }
outputs:
masters_ips:
description: Public IP addresses of the deployed masters instances
value: { get_attr: [masters, server_public_ip] }
workers_ips:
description: Public IP addresses of the deployed worker instances
value: { get_attr: [workers, server_public_ip] }
storage_frontend_network_cidr:
description: Storage network which is used as clientNet in Ceph CR
value: { get_param: storage_frontend_network_cidr }
storage_backend_network_cidr:
description: Storage network which is used as clusterNet in Ceph CR
value: { get_param: storage_backend_network_cidr }
workers_wc_data:
description: Metadata from workers
value: { get_attr: [workers, wc_data] }