Skip to content

Instantly share code, notes, and snippets.

@allthingsclowd
Created October 22, 2016 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allthingsclowd/c910d736bffefb0ffc17a0faf79e33b3 to your computer and use it in GitHub Desktop.
Save allthingsclowd/c910d736bffefb0ffc17a0faf79e33b3 to your computer and use it in GitHub Desktop.
# Create a private network in availability zone 1
private_net_az1:
type: OS::Neutron::Net
properties:
availability_zone: { get_param: az1 }
name: "private_net_az1"
# Create a new subnet on the private network
private_subnet_az1:
type: OS::Neutron::Subnet
depends_on: private_net_az1
properties:
availability_zone: { get_param: az1 }
name: "private_subnet_az1"
network_id: { get_resource: private_net_az1 }
cidr: "192.168.100.0/24"
gateway_ip: "192.168.100.254"
allocation_pools:
- start: "192.168.100.100"
end: "192.168.100.150"
dns_nameservers: ["62.60.39.9", "62.60.39.10"]
host_routes: [{"nexthop": "192.168.100.253", "destination": "10.11.200.0/24"}]
# Connect an interface on the web tier network's subnet to the router
az1_router_interface:
type: OS::Neutron::RouterInterface
depends_on: [private_subnet_az1]
properties:
router_id: { get_param: ext_router_az1 }
subnet_id: { get_resource: private_subnet_az1 }
# Create a private network in availability zone 2
private_net_az2:
type: OS::Neutron::Net
properties:
availability_zone: { get_param: az2 }
name: "private_net_az2"
# Create a new subnet on the private network
private_subnet_az2:
type: OS::Neutron::Subnet
depends_on: private_net_az2
properties:
availability_zone: { get_param: az2 }
name: "private_subnet_az2"
network_id: { get_resource: private_net_az2 }
cidr: "10.11.200.0/24"
gateway_ip: "10.11.200.254"
allocation_pools:
- start: "10.11.200.100"
end: "10.11.200.150"
dns_nameservers: ["62.60.42.9", "62.60.42.10"]
host_routes: [{"nexthop": "10.11.200.253", "destination": "192.168.100.0/24"}]
# Connect an interface on the web tier network's subnet to the router
az2_router_interface:
type: OS::Neutron::RouterInterface
depends_on: [private_subnet_az2]
properties:
router_id: { get_param: ext_router_az2 }
subnet_id: { get_resource: private_subnet_az2 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment