3233c1cbb3
The created public_net isn't used for anything at the moment so I've assumed that it maps to the overcloud external network.
158 lines
3.7 KiB
YAML
158 lines
3.7 KiB
YAML
heat_template_version: 2014-10-16
|
|
|
|
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:
|
|
bmc_flavor:
|
|
type: string
|
|
default: m1.small
|
|
|
|
bmc_image:
|
|
type: string
|
|
default: CentOS-7-x86_64-GenericCloud-1503
|
|
|
|
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
|
|
|
|
key_name:
|
|
type: string
|
|
default: default
|
|
|
|
node_count:
|
|
type: number
|
|
default: 1
|
|
|
|
public_net:
|
|
type: string
|
|
default: public
|
|
|
|
private_net:
|
|
type: string
|
|
default: private
|
|
|
|
provision_net:
|
|
type: string
|
|
default: provision
|
|
|
|
bmc_prefix:
|
|
type: string
|
|
default: bmc
|
|
|
|
baremetal_prefix:
|
|
type: string
|
|
default: baremetal
|
|
|
|
os_user:
|
|
type: string
|
|
default: admin
|
|
|
|
os_password:
|
|
type: string
|
|
default: password
|
|
hidden: true
|
|
|
|
os_tenant:
|
|
type: string
|
|
default: admin
|
|
|
|
os_auth_url:
|
|
type: string
|
|
|
|
default_sg:
|
|
type: string
|
|
default: all_sg
|
|
|
|
resources:
|
|
# NOTE(bnemec): This should probably be limited to allowing only
|
|
# OpenStack API ports, but for now this is simpler and not
|
|
# completely unreasonable.
|
|
private_sg:
|
|
type: OS::Neutron::SecurityGroup
|
|
properties:
|
|
name: private_sg
|
|
description: Ping, SSH and IPMI
|
|
rules:
|
|
- protocol: icmp
|
|
- protocol: tcp
|
|
port_range_min: 22
|
|
port_range_max: 22
|
|
- protocol: udp
|
|
port_range_min: 623
|
|
port_range_max: 623
|
|
|
|
bmc_port:
|
|
type: OS::Neutron::Port
|
|
properties:
|
|
name:
|
|
list_join:
|
|
- '_'
|
|
- - 'utility'
|
|
- {get_param: bmc_prefix}
|
|
network: {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}
|
|
|
|
bmc_server:
|
|
type: OS::Nova::Server
|
|
properties:
|
|
flavor: {get_param: bmc_flavor}
|
|
image: {get_param: bmc_image}
|
|
key_name: {get_param: key_name}
|
|
networks:
|
|
- port: {get_resource: bmc_port}
|
|
name: {get_param: bmc_prefix}
|
|
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}
|
|
$bm_node_count: {get_param: node_count}
|
|
$bmc_prefix: {get_param: bmc_prefix}
|
|
$bmc_utility: {get_attr: [bmc_port, fixed_ips, 0, ip_address]}
|
|
$bm_prefix: {get_param: baremetal_prefix}
|
|
$private_net: {get_param: private_net}
|
|
$openstackbmc_script: {get_file: ../bin/openstackbmc}
|
|
template: {get_file: ../bin/install_openstackbmc.sh}
|
|
|
|
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}
|
|
key_name: {get_param: key_name}
|
|
provision_net: {get_param: provision_net}
|
|
public_net: {get_param: public_net}
|
|
suffix: _%index%
|
|
baremetal_prefix: {get_param: baremetal_prefix}
|