instack-undercloud/heat-templates/ironic-deployment.yaml
Ben Nemec 86dc42008d Name compute nodes as openstack#
The compute flavor is the one with 4 GB of memory, so that's what
we want to use for the puppet work.
2015-01-23 11:59:15 -05:00

87 lines
2.4 KiB
YAML

heat_template_version: 2014-10-16
parameters:
config_drive_label:
type: string
default: config-2
discovery_metadata_key:
type: string
default: hardware
control_flavor:
type: string
default: baremetal_control
compute_flavor:
type: string
default: baremetal_compute
image:
type: string
default: openstack-full
key_name:
type: string
default: default
control_count:
type: number
default: 3
compute_count:
type: number
default: 0
resources:
control_servers:
type: OS::Heat::ResourceGroup
properties:
count: {get_param: control_count}
resource_def:
type: OS::Nova::Server
properties:
flavor: {get_param: control_flavor}
image: {get_param: image}
key_name: {get_param: key_name}
config_drive: True
user_data:
str_replace:
template: |
#!/bin/bash -v
# Mount the config drive and extract the discovery data
mount /dev/disk/by-label/disklabel /mnt
jq -r ".metadata_key" /mnt/openstack/latest/meta_data.json > /tmp/discovery.json
# Enable ssh as root for Puppet.
sed -i -e 's/.*ssh-/ssh-/' ~root/.ssh/authorized_keys
params:
disklabel: { get_param: config_drive_label }
metadata_key: { get_param: discovery_metadata_key }
compute_servers:
type: OS::Heat::ResourceGroup
properties:
count: {get_param: compute_count}
resource_def:
type: OS::Nova::Server
properties:
flavor: {get_param: compute_flavor}
image: {get_param: image}
key_name: {get_param: key_name}
config_drive: True
name: openstack%index%
user_data:
str_replace:
template: |
#!/bin/bash -v
# Mount the config drive and extract the discovery data
mount /dev/disk/by-label/disklabel /mnt
jq -r ".metadata_key" /mnt/openstack/latest/meta_data.json > /tmp/discovery.json
# Enable ssh as root for Puppet.
sed -i -e 's/.*ssh-/ssh-/' ~root/.ssh/authorized_keys
params:
disklabel: { get_param: config_drive_label }
metadata_key: { get_param: discovery_metadata_key }