openstack-virtual-baremetal/templates/virtual-baremetal.yaml

138 lines
3.3 KiB
YAML

heat_template_version: newton
description: Template for deploying OpenStack BMC nodes. Can be wrapped in a ResourceGroup for scaling.
# Ensure force_config_drive is _not_ set in nova.conf
parameters:
baremetal_flavor:
type: string
default: baremetal
description: Recommended to be at least 1 vcpu, 4 GB RAM, 50 GB disk
baremetal_image:
type: string
default: empty
description: The base image to use for baremetal instances
key_name:
type: string
default: default
description: Nova keypair to inject into the undercloud and bmc
node_count:
type: number
default: 1
description: Number of baremetal nodes to deploy
private_net:
type: string
default: private
description: Name of a private network which can have floating ips associated with it
networks:
type: json
default: {"private": "private", "provision": "provision"}
description: A map of networks to their names.
baremetal_prefix:
type: string
default: baremetal
description: Prefix for the name of the baremetal instances
baremetal_name_template:
type: string
default: ''
description: |
Override the default naming scheme for baremetal instances.
The value should usually include '%index%' to differentiate multiple
instances. For example: 'my-custom-name-%index%'
cloud_data:
type: string
hidden: true
dhcp_ips:
type: json
default:
- 192.168.24.1
- 192.168.24.10
description: |
The IP addresses of DHCP servers to relay DHCP requests to.
# Ignored parameters for compatibility with QuintupleO env files
undercloud_image:
type: string
default: ''
undercloud_flavor:
type: string
default: ''
undercloud_name:
type: string
default: ''
external_net:
type: string
default: ''
public_net_shared:
type: string
default: ''
provision_net_shared:
type: string
default: ''
conditions:
baremetal_name_override:
not:
equals:
- {get_param: baremetal_name_template}
- ''
resources:
bmc:
type: OS::OVB::BMC
depends_on: openstack_baremetal_servers
properties:
cloud_data: {get_param: cloud_data}
baremetal_networks:
type: OS::OVB::BaremetalNetworks
openstack_baremetal_servers:
type: OS::Heat::ResourceGroup
depends_on: baremetal_networks
properties:
count: {get_param: node_count}
resource_def:
type: OS::OVB::ServerPair
properties:
baremetal_flavor: {get_param: baremetal_flavor}
baremetal_image: {get_param: baremetal_image}
baremetal_name:
if:
- baremetal_name_override
- {get_param: baremetal_name_template}
- list_join:
- ''
- - {get_param: baremetal_prefix}
- '_%index%'
key_name: {get_param: key_name}
networks: {get_param: networks}
suffix: _%index%
baremetal_prefix: {get_param: baremetal_prefix}
dhcp_relay:
type: OS::OVB::DHCPRelay
properties:
networks: {get_param: networks}
dhcp_ips: {get_param: dhcp_ips}
ipv6_radvd:
type: OS::OVB::RouterAdvertisementDaemon
properties:
networks: {get_param: networks}
outputs:
baremetal_networks_routers_addresses:
value: {get_attr: [baremetal_networks, routers_addresses]}