Put undercloud floating ip into own type
This is a refactoring change to put the undercloud floating ip resources into their own type. Subsequent changes will provide options for external undercloud connectivity The order of environments for stack creation is changed so that env.yaml can override the registry.
This commit is contained in:
parent
e14a8b378f
commit
4d6dcc2294
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
op=${1:-create}
|
||||
heat stack-$op -f templates/virtual-baremetal.yaml -e env.yaml -e templates/resource-registry.yaml baremetal
|
||||
heat stack-$op -f templates/virtual-baremetal.yaml -e templates/resource-registry.yaml baremetal -e env.yaml
|
||||
|
@ -158,15 +158,10 @@ resources:
|
||||
name: {get_param: undercloud_name}
|
||||
|
||||
undercloud_floating_ip:
|
||||
type: OS::Neutron::FloatingIP
|
||||
type: OS::OVB::UndercloudFloating
|
||||
properties:
|
||||
floating_network: {get_param: external_net}
|
||||
|
||||
undercloud_floating_ip_assoc:
|
||||
type: OS::Neutron::FloatingIPAssociation
|
||||
properties:
|
||||
floatingip_id: {get_resource: undercloud_floating_ip}
|
||||
port_id: {get_attr: [undercloud_server, addresses, {get_param: private_net}, 0, port]}
|
||||
external_net: {get_param: external_net}
|
||||
undercloud_port: {get_attr: [undercloud_server, addresses, {get_param: private_net}, 0, port]}
|
||||
|
||||
baremetal_env:
|
||||
type: OS::OVB::BaremetalEnvironment
|
||||
|
@ -1,3 +1,4 @@
|
||||
resource_registry:
|
||||
OS::OVB::ServerPair: virtual-baremetal-servers.yaml
|
||||
OS::OVB::BaremetalEnvironment: virtual-baremetal.yaml
|
||||
OS::OVB::UndercloudFloating: undercloud-floating.yaml
|
||||
|
31
templates/undercloud-floating.yaml
Normal file
31
templates/undercloud-floating.yaml
Normal file
@ -0,0 +1,31 @@
|
||||
heat_template_version: 2015-04-30
|
||||
|
||||
# Template that creates a new floating IP to access the undercloud
|
||||
|
||||
parameters:
|
||||
external_net:
|
||||
type: string
|
||||
default: external
|
||||
description: An external network from which floating ips can be provisioned
|
||||
|
||||
undercloud_port:
|
||||
type: string
|
||||
description: Port id of undercloud server for floating ip
|
||||
|
||||
resources:
|
||||
|
||||
undercloud_floating_ip:
|
||||
type: OS::Neutron::FloatingIP
|
||||
properties:
|
||||
floating_network: {get_param: external_net}
|
||||
|
||||
undercloud_floating_ip_assoc:
|
||||
type: OS::Neutron::FloatingIPAssociation
|
||||
properties:
|
||||
floatingip_id: {get_resource: undercloud_floating_ip}
|
||||
port_id: {get_param: undercloud_port}
|
||||
|
||||
outputs:
|
||||
undercloud_host:
|
||||
value:
|
||||
get_attr: [undercloud_floating_ip, floating_ip_address]
|
Loading…
Reference in New Issue
Block a user