216 lines
6.1 KiB
YAML
216 lines
6.1 KiB
YAML
heat_template_version: 2016-04-08
|
|
|
|
# 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
|
|
|
|
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: ''
|
|
|
|
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.
|
|
|
|
resources:
|
|
undercloud_networks:
|
|
type: OS::OVB::UndercloudNetworks
|
|
|
|
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: [undercloud_networks, private_network]
|
|
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]}
|
|
networks: {get_attr: [undercloud_networks, networks]}
|
|
external_net: {get_param: external_net}
|
|
|
|
baremetal_env:
|
|
type: OS::OVB::BaremetalEnvironment
|
|
depends_on: undercloud_networks
|
|
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}
|
|
private_net: {get_attr: [private_network, private_net]}
|
|
networks: {get_attr: [undercloud_networks, networks]}
|
|
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}
|
|
dhcp_ips: {get_param: dhcp_ips}
|
|
|
|
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]
|
|
network_environment_data:
|
|
description: "Network environment data, router addresses etc."
|
|
value:
|
|
map_merge:
|
|
- get_attr: [undercloud_networks, provision_network_routers]
|
|
- get_attr: [baremetal_env, baremetal_networks_routers_addresses]
|
|
- get_attr: [undercloud_networks, public_network_router]
|