openstack-virtual-baremetal/templates/quintupleo.yaml

260 lines
7.1 KiB
YAML

heat_template_version: 2015-04-30
# Template that wraps virtual-baremetal.yaml and does some additional environment
# setup automatically:
# - provisions the needed networks
# - boots an instance to serve as the undercloud
# - creates a floating ip and associates it with the undercloud instance
parameters:
bmc_flavor:
type: string
default: m1.small
description: The Nova flavor to use for the bmc instance
bmc_image:
type: string
default: CentOS-7-x86_64-GenericCloud
description: |
The base image for the bmc instance. A CentOS 7 image is currently the
only one supported.
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: 2
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
external_net:
type: string
default: external
description: An external network from which floating ips can be provisioned
provision_net:
type: string
default: provision
description: Name of a network that will be used for provisioning traffic
provision_net_cidr:
type: string
description: CIDR for provision network subnet
default: 192.0.2.0/24
provision_net_shared:
type: boolean
description: Whether this network should be shared across all tenants
default: false
public_net:
type: string
description: Name of the overcloud external network
default: public
public_net_cidr:
type: string
description: CIDR for external network subnet
default: 10.0.0.0/24
public_net_shared:
type: boolean
description: Whether this network should be shared across all tenants
default: false
bmc_prefix:
type: string
default: bmc
description: Prefix for the name of the bmc instance
baremetal_prefix:
type: string
default: baremetal
description: Prefix for the name of the baremetal instances
undercloud_name:
type: string
default: undercloud
description: Name of the undercloud instance
undercloud_flavor:
type: string
default: m1.xlarge
description: Nova flavor to use for the undercloud instance
undercloud_image:
type: string
default: CentOS-7-x86_64-GenericCloud
description: Image to boot as the undercloud instance
undercloud_user_data:
type: string
default: ""
description: Userdata to inject into the undercloud instance
undercloud_user_data_format:
type: string
default: RAW
description: Format of undercloud userdata
os_user:
type: string
default: admin
description: |
The user on the host cloud that will be used to provision the
environment
os_password:
type: string
default: password
hidden: true
description: The password for os_user
os_tenant:
type: string
default: admin
description: The tenant for os_user
os_auth_url:
type: string
default: http://127.0.0.1:5000/v2.0
description: The Keystone auth_url of the host cloud
os_project:
type: string
default: ''
description: |
The project for os_user. Required for Keystone v3, should be left
blank for Keystone v2.
os_user_domain:
type: string
default: ''
description: |
The user domain for os_user. Required for Keystone v3, should be left
blank for Keystone v2.
os_project_domain:
type: string
default: ''
description: |
The project domain for os_user. Required for Keystone v3, should be left
blank for Keystone v2.
cloud_data:
type: string
default: '{}'
hidden: true
# Unused parameter for compatibility with the environment generator
role:
type: string
description: |
The default role for nodes in this environment. This parameter is
ignored by Heat, but used by build-nodes-json.
default: ''
resources:
provision_network:
type: OS::Neutron::Net
properties:
name: {get_param: provision_net}
shared: {get_param: provision_net_shared}
provision_subnet:
type: OS::Neutron::Subnet
properties:
network: {get_resource: provision_network}
name: {get_param: provision_net}
cidr: {get_param: provision_net_cidr}
gateway_ip: null
enable_dhcp: false
public_network:
type: OS::Neutron::Net
properties:
name: {get_param: public_net}
shared: {get_param: public_net_shared}
public_subnet:
type: OS::Neutron::Subnet
properties:
network: {get_resource: public_network}
name: {get_param: public_net}
cidr: {get_param: public_net_cidr}
gateway_ip: null
enable_dhcp: false
private_network:
type: OS::OVB::PrivateNetwork
properties:
external_net: {get_param: external_net}
private_net: {get_param: private_net}
undercloud_env:
type: OS::OVB::UndercloudEnvironment
depends_on: [provision_subnet, public_subnet]
properties:
undercloud_flavor: {get_param: undercloud_flavor}
undercloud_image: {get_param: undercloud_image}
key_name: {get_param: key_name}
undercloud_name: {get_param: undercloud_name}
undercloud_user_data_format: {get_param: undercloud_user_data_format}
undercloud_user_data: {get_param: undercloud_user_data}
private_net: {get_attr: [private_network, private_net]}
provision_net: {get_resource: provision_network}
public_net: {get_resource: public_network}
external_net: {get_param: external_net}
baremetal_env:
type: OS::OVB::BaremetalEnvironment
depends_on: [provision_subnet, public_subnet]
properties:
baremetal_flavor: {get_param: baremetal_flavor}
baremetal_image: {get_param: baremetal_image}
key_name: {get_param: key_name}
node_count: {get_param: node_count}
public_net: {get_resource: public_network}
private_net: {get_attr: [private_network, private_net]}
provision_net: {get_resource: provision_network}
bmc_flavor: {get_param: bmc_flavor}
bmc_prefix: {get_param: bmc_prefix}
bmc_image: {get_param: bmc_image}
baremetal_prefix: {get_param: baremetal_prefix}
os_user: {get_param: os_user}
os_password: {get_param: os_password}
os_tenant: {get_param: os_tenant}
os_auth_url: {get_param: os_auth_url}
os_project: {get_param: os_project}
os_user_domain: {get_param: os_user_domain}
os_project_domain: {get_param: os_project_domain}
cloud_data: {get_param: cloud_data}
outputs:
undercloud_host_floating_ip:
description: "floating ip of the undercloud instance"
value:
get_attr: [undercloud_env, undercloud_host_floating_ip]
undercloud_host_private_ip:
description: "ip of the undercloud instance on the private network"
value:
get_attr: [undercloud_env, undercloud_host_private_ip]