Merge pull request #6 from steveb/floating_type
Give option of using existing or no undercloud floating ip
This commit is contained in:
commit
3a02133fd7
|
@ -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
|
||||
|
|
|
@ -22,3 +22,16 @@ parameters:
|
|||
external_net: external
|
||||
public_net_name: public
|
||||
provision_net_name: provision
|
||||
|
||||
# Uncomment and customize the following to use an existing floating ip
|
||||
# parameter_defaults:
|
||||
# undercloud_floating_ip_id: 'uuid of floating ip'
|
||||
# undercloud_floating_ip: 'address of floating ip'
|
||||
#
|
||||
# resource_registry:
|
||||
# OS::OVB::UndercloudFloating: templates/undercloud-floating-existing.yaml
|
||||
|
||||
|
||||
# Uncomment the following to use no floating ip
|
||||
# resource_registry:
|
||||
# OS::OVB::UndercloudFloating: templates/undercloud-floating-none.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
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
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
|
||||
|
||||
undercloud_floating_ip_id:
|
||||
type: string
|
||||
description: ID of existing floating ip to use.
|
||||
|
||||
undercloud_floating_ip:
|
||||
type: string
|
||||
description: Address of existing floating ip to use.
|
||||
default: ''
|
||||
|
||||
resources:
|
||||
|
||||
undercloud_floating_ip_assoc:
|
||||
type: OS::Neutron::FloatingIPAssociation
|
||||
properties:
|
||||
floatingip_id: {get_param: undercloud_floating_ip_id}
|
||||
port_id: {get_param: undercloud_port}
|
||||
|
||||
outputs:
|
||||
undercloud_host:
|
||||
value:
|
||||
get_param: undercloud_floating_ip
|
|
@ -0,0 +1,17 @@
|
|||
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
|
||||
|
||||
outputs:
|
||||
undercloud_host:
|
||||
value: 'none'
|
|
@ -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