Skip to content
Snippets Groups Projects
Commit 24396519 authored by Alessandro Costantini's avatar Alessandro Costantini
Browse files

Multiple external network implementation

parent a5813e8b
No related branches found
No related tags found
1 merge request!12Network extdouble
This commit is part of merge request !12. Comments created here will be created in the context of that merge request.
...@@ -116,7 +116,6 @@ iaas::profile::nova::compute::libvirt_type: qemu ...@@ -116,7 +116,6 @@ iaas::profile::nova::compute::libvirt_type: qemu
#Common #Common
iaas::profile::neutron::password: neutron iaas::profile::neutron::password: neutron
iaas::profile::neutron::secret: neutron iaas::profile::neutron::secret: neutron
iaas::profile::neutron::network_neutron_private: 10.0.1.0/24
iaas::profile::neutron::router::mtu: 1445 iaas::profile::neutron::router::mtu: 1445
iaas::profile::neutron::common::core_plugin: 'ml2' iaas::profile::neutron::common::core_plugin: 'ml2'
iaas::profile::neutron::common::service_plugins: iaas::profile::neutron::common::service_plugins:
...@@ -131,12 +130,14 @@ iaas::profile::neutron::external_network1: 10.10.98.0/24 ...@@ -131,12 +130,14 @@ iaas::profile::neutron::external_network1: 10.10.98.0/24
iaas::profile::neutron::external_gateway1: 10.10.98.1 iaas::profile::neutron::external_gateway1: 10.10.98.1
iaas::profile::neutron::network_external1_ippool_start: 10.10.98.121 iaas::profile::neutron::network_external1_ippool_start: 10.10.98.121
iaas::profile::neutron::network_external1_ippool_end: 10.10.98.125 iaas::profile::neutron::network_external1_ippool_end: 10.10.98.125
iaas::profile::neutron::network_neutron_private1: 10.0.1.0/24
#External Network 2, enable if needed #External Network 2, enable if needed
iaas::profile::neutron::router::external_device2: eth1 #iaas::profile::neutron::router::external_device2: eth1
iaas::profile::neutron::external_network2: 131.154.100.0/24 #iaas::profile::neutron::external_network2: 10.10.96.0/24
iaas::profile::neutron::external_gateway2: 131.154.100.1 #iaas::profile::neutron::external_gateway2: 10.10.96.1
iaas::profile::neutron::network_external2_ippool_start: 131.154.100.81 #iaas::profile::neutron::network_external2_ippool_start: 10.10.96.121
iaas::profile::neutron::network_external2_ippool_end: 131.154.100.83 #iaas::profile::neutron::network_external2_ippool_end: 10.10.96.125
#iaas::profile::neutron::network_neutron_private2: 10.0.2.0/24
# Heat # Heat
......
...@@ -12,8 +12,8 @@ define iaas::setup::router { ...@@ -12,8 +12,8 @@ define iaas::setup::router {
neutron_router { $tenant: neutron_router { $tenant:
tenant_name => $tenant, tenant_name => $tenant,
gateway_network_name => 'public', gateway_network_name => 'public1',
require => [Neutron_network['public'], Neutron_subnet[$subnet]] require => [Neutron_network['public1'], Neutron_subnet[$subnet]]
} -> } ->
neutron_router_interface { $title: neutron_router_interface { $title:
......
...@@ -17,7 +17,8 @@ class iaas::setup::sharednetwork ( ...@@ -17,7 +17,8 @@ class iaas::setup::sharednetwork (
$start_ip2 = hiera('iaas::profile::neutron::network_external2_ippool_start', undef), $start_ip2 = hiera('iaas::profile::neutron::network_external2_ippool_start', undef),
$end_ip2 = hiera('iaas::profile::neutron::network_external2_ippool_end', undef), $end_ip2 = hiera('iaas::profile::neutron::network_external2_ippool_end', undef),
$dns = hiera('iaas::profile::base::dns_servers', undef), $dns = hiera('iaas::profile::base::dns_servers', undef),
$private_network = hiera('iaas::profile::neutron::network_neutron_private', undef), $private_network1 = hiera('iaas::profile::neutron::network_neutron_private1', undef),
$private_network2 = hiera('iaas::profile::neutron::network_neutron_private2', undef),
) { ) {
$ip_range1 = "start=${start_ip1},end=${end_ip1}" $ip_range1 = "start=${start_ip1},end=${end_ip1}"
...@@ -30,7 +31,6 @@ $ip_range2 = "start=${start_ip2},end=${end_ip2}" ...@@ -30,7 +31,6 @@ $ip_range2 = "start=${start_ip2},end=${end_ip2}"
provider_physical_network => 'physnet1', provider_physical_network => 'physnet1',
shared => false, shared => false,
} -> } ->
neutron_subnet { $external_network1: neutron_subnet { $external_network1:
cidr => $external_network1, cidr => $external_network1,
ip_version => '4', ip_version => '4',
...@@ -40,10 +40,23 @@ $ip_range2 = "start=${start_ip2},end=${end_ip2}" ...@@ -40,10 +40,23 @@ $ip_range2 = "start=${start_ip2},end=${end_ip2}"
tenant_name => 'admin', tenant_name => 'admin',
allocation_pools => [$ip_range1], allocation_pools => [$ip_range1],
dns_nameservers => [$dns], dns_nameservers => [$dns],
} ->
neutron_network { 'private1':
tenant_name => 'test',
provider_network_type => 'gre',
router_external => false,
shared => false,
} ->
neutron_subnet { $private_network1:
cidr => $private_network1,
ip_version => '4',
enable_dhcp => true,
network_name => 'private1',
tenant_name => 'test',
dns_nameservers => [$dns],
} }
if $external_network2 { if $external_network2 {
neutron_network { 'public2': neutron_network { 'public2':
tenant_name => 'admin', tenant_name => 'admin',
provider_network_type => 'flat', provider_network_type => 'flat',
...@@ -60,25 +73,27 @@ $ip_range2 = "start=${start_ip2},end=${end_ip2}" ...@@ -60,25 +73,27 @@ $ip_range2 = "start=${start_ip2},end=${end_ip2}"
tenant_name => 'admin', tenant_name => 'admin',
allocation_pools => [$ip_range2], allocation_pools => [$ip_range2],
dns_nameservers => [$dns], dns_nameservers => [$dns],
} ->
neutron_network { 'private2':
tenant_name => 'test',
provider_network_type => 'gre',
router_external => false,
shared => false,
} ->
neutron_subnet { $private_network2:
cidr => $private_network2,
ip_version => '4',
enable_dhcp => true,
network_name => 'private2',
tenant_name => 'test',
dns_nameservers => [$dns],
} }
} }
neutron_network { 'private':
tenant_name => 'test',
provider_network_type => 'gre',
router_external => false,
shared => false,
} ->
neutron_subnet { $private_network:
cidr => $private_network,
ip_version => '4',
enable_dhcp => true,
network_name => 'private',
tenant_name => 'test',
dns_nameservers => [$dns],
}
# router setup for the tenant test # router setup for the tenant test
# iaas::setup::router { "test:${private_network}": } # iaas::setup::router { "test:${private_network1}": }
# if $external_network2 {
# iaas::setup::router { "test:${private_network2}": }
# }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment