diff --git a/templates/env.yaml.example b/templates/env.yaml.example index 8094235..8f7ac29 100644 --- a/templates/env.yaml.example +++ b/templates/env.yaml.example @@ -32,3 +32,7 @@ parameters: # Uncomment the following to use no floating ip # resource_registry: # OS::OVB::UndercloudFloating: templates/undercloud-floating-none.yaml + +# Uncomment the following to create a private network +# resource_registry: +# OS::OVB::PrivateNetwork: templates/private-net-create.yaml diff --git a/templates/private-net-create.yaml b/templates/private-net-create.yaml new file mode 100644 index 0000000..3cabd62 --- /dev/null +++ b/templates/private-net-create.yaml @@ -0,0 +1,48 @@ +heat_template_version: 2015-04-30 + +# Template which creates a private network which is routed to an external +# network. + +parameters: + external_net: + type: string + description: An external network for the private network to route to + + private_net: + type: string + description: Name of private network + + private_net_cidr: + type: string + description: CIDR for private network subnet + default: 10.0.1.0/24 + +resources: + + network: + type: OS::Neutron::Net + properties: + name: {get_param: private_net} + + subnet: + type: OS::Neutron::Subnet + properties: + network: {get_resource: network} + name: {get_param: private_net} + cidr: {get_param: private_net_cidr} + + router: + type: OS::Neutron::Router + properties: + external_gateway_info: + network: {get_param: external_net} + + router_interface: + type: OS::Neutron::RouterInterface + properties: + router: {get_resource: router} + subnet: {get_resource: subnet} + +outputs: + private_net: + value: {get_param: private_net} diff --git a/templates/private-net-existing.yaml b/templates/private-net-existing.yaml index c6a9aa6..f854109 100644 --- a/templates/private-net-existing.yaml +++ b/templates/private-net-existing.yaml @@ -7,7 +7,6 @@ heat_template_version: 2015-04-30 parameters: external_net: type: string - default: private description: An external network from which floating ips can be provisioned private_net: