openstack-virtual-baremetal/templates/bmc.yaml

163 lines
4.3 KiB
YAML

heat_template_version: newton
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.
bmc_use_cache:
type: boolean
default: false
description: |
Enable instance status caching on the BMC. This can reduce load on the
host cloud, but if an instance's status is changed outside the BMC it may
become out of sync.
key_name:
type: string
default: default
description: Nova keypair to inject into the undercloud and bmc
private_net:
type: string
default: private
description: Name of a private network which can have floating ips associated with it
bmc_prefix:
type: string
default: bmc
description: Prefix for the name of the bmc instance
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
hidden: true
baremetal_prefix:
type: string
default: baremetal
description: Prefix for the name of the baremetal instances
node_count:
type: number
description: Number of baremetal nodes to deploy
config_drive:
type: boolean
default: false
description: If True, enable config drive on the server.
resources:
bmc_port:
type: OS::OVB::BMCPort
properties:
bmc_prefix: {get_param: bmc_prefix}
private_net: {get_param: private_net}
bmc_other_ports:
type: OS::Heat::ResourceGroup
properties:
count: {get_param: node_count}
resource_def:
type: OS::Neutron::Port
properties:
name:
list_join:
- ''
- - {get_param: bmc_prefix}
- _%index%
network: {get_param: private_net}
port_security_enabled: false
bmc_handle:
type: OS::Heat::WaitConditionHandle
bmc_wait_condition:
type: OS::Heat::WaitCondition
properties:
handle: {get_resource: bmc_handle}
timeout: 600
bmc_server:
type: OS::Nova::Server
depends_on: [bmc_other_ports, bmc_port]
properties:
flavor: {get_param: bmc_flavor}
image: {get_param: bmc_image}
key_name: {get_param: key_name}
networks: {get_attr: [bmc_port, port]}
name: {get_param: bmc_prefix}
config_drive: {get_param: config_drive}
user_data_format: RAW
user_data:
str_replace:
params:
$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}
$bm_node_count: {get_param: node_count}
$bmc_prefix: {get_param: bmc_prefix}
$bmc_utility: {get_attr: [bmc_port, ip_address]}
$bmc_use_cache: {get_param: bmc_use_cache}
$bm_prefix: {get_param: baremetal_prefix}
$private_net: {get_param: private_net}
$openstackbmc_script: {get_file: ../bin/openstackbmc}
$cloud_data: {get_param: cloud_data}
$signal_command: {get_attr: [bmc_handle, curl_cli]}
template: {get_file: ../bin/install_openstackbmc.sh}