summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deploy/conf/hardware_environment/huawei-pod1/network.yml10
-rw-r--r--deploy/conf/vm_environment/huawei-virtual1/network.yml2
-rw-r--r--deploy/conf/vm_environment/huawei-virtual2/network.yml2
-rw-r--r--deploy/conf/vm_environment/network.yml2
-rwxr-xr-xplugins/moon/roles/moon/templates/compute.j278
5 files changed, 68 insertions, 26 deletions
diff --git a/deploy/conf/hardware_environment/huawei-pod1/network.yml b/deploy/conf/hardware_environment/huawei-pod1/network.yml
index cba041da..d7145a2c 100644
--- a/deploy/conf/hardware_environment/huawei-pod1/network.yml
+++ b/deploy/conf/hardware_environment/huawei-pod1/network.yml
@@ -52,8 +52,8 @@ sys_intf_mappings:
ip_settings:
- name: mgmt
ip_ranges:
- - - "10.1.0.100"
- - "10.1.0.220"
+ - - "10.1.0.50"
+ - "10.1.0.100"
dhcp_ranges:
- - "10.1.0.2"
- "10.1.0.49"
@@ -66,7 +66,7 @@ ip_settings:
- name: tenant
ip_ranges:
- - "172.16.1.1"
- - "172.16.1.254"
+ - "172.16.1.50"
cidr: "172.16.1.0/24"
role:
- controller
@@ -75,7 +75,7 @@ ip_settings:
- name: storage
ip_ranges:
- - "172.16.2.1"
- - "172.16.2.254"
+ - "172.16.2.50"
cidr: "172.16.2.0/24"
role:
- controller
@@ -106,7 +106,7 @@ public_net_info:
enable: "True"
network: ext-net
type: flat
- segment_id: 1000
+ segment_id: 10
subnet: ext-subnet
provider_network: physnet
router: router-ext
diff --git a/deploy/conf/vm_environment/huawei-virtual1/network.yml b/deploy/conf/vm_environment/huawei-virtual1/network.yml
index fe5f8b52..924a4ea4 100644
--- a/deploy/conf/vm_environment/huawei-virtual1/network.yml
+++ b/deploy/conf/vm_environment/huawei-virtual1/network.yml
@@ -106,7 +106,7 @@ public_net_info:
enable: "True"
network: ext-net
type: flat
- segment_id: 10
+ segment_id: 1000
subnet: ext-subnet
provider_network: physnet
router: router-ext
diff --git a/deploy/conf/vm_environment/huawei-virtual2/network.yml b/deploy/conf/vm_environment/huawei-virtual2/network.yml
index fe5f8b52..924a4ea4 100644
--- a/deploy/conf/vm_environment/huawei-virtual2/network.yml
+++ b/deploy/conf/vm_environment/huawei-virtual2/network.yml
@@ -106,7 +106,7 @@ public_net_info:
enable: "True"
network: ext-net
type: flat
- segment_id: 10
+ segment_id: 1000
subnet: ext-subnet
provider_network: physnet
router: router-ext
diff --git a/deploy/conf/vm_environment/network.yml b/deploy/conf/vm_environment/network.yml
index fe5f8b52..924a4ea4 100644
--- a/deploy/conf/vm_environment/network.yml
+++ b/deploy/conf/vm_environment/network.yml
@@ -106,7 +106,7 @@ public_net_info:
enable: "True"
network: ext-net
type: flat
- segment_id: 10
+ segment_id: 1000
subnet: ext-subnet
provider_network: physnet
router: router-ext
diff --git a/plugins/moon/roles/moon/templates/compute.j2 b/plugins/moon/roles/moon/templates/compute.j2
index 7adfa12c..30355311 100755
--- a/plugins/moon/roles/moon/templates/compute.j2
+++ b/plugins/moon/roles/moon/templates/compute.j2
@@ -5,32 +5,63 @@
auto lo
iface lo inet loopback
-
# Physical interface
auto eth0
iface eth0 inet manual
+# external interface
+{% set intf_external = sys_intf_mappings["external"]["interface"] %}
+{% if sys_intf_mappings["external"]["vlan_tag"] != "None" %}
+{% set intf_external = intf_external + '.' + sys_intf_mappings["external"]["vlan_tag"]|string %}
+{% endif %}
+auto {{ intf_external }}
+iface {{ intf_external }} inet manual
+{% if sys_intf_mappings["external"]["vlan_tag"] != "None" %}
+ vlan-raw-device {{ intf_external }}
+{% endif %}
-# OpenStack Networking VXLAN (tunnel/overlay) VLAN interface
-auto {{sys_intf_mappings["mgmt"]["interface"]}}.{{sys_intf_mappings["mgmt"]["vlan_tag"]}}
-iface {{sys_intf_mappings["mgmt"]["interface"]}}.{{sys_intf_mappings["mgmt"]["vlan_tag"]}} inet manual
- vlan-raw-device {{sys_intf_mappings["mgmt"]["interface"]}}
+# tenant interface
+{% set intf_tenant = sys_intf_mappings["tenant"]["interface"] %}
+{% if sys_intf_mappings["tenant"]["interface"] != "None" %}
+{% set intf_tenant = intf_tenant + '.' + sys_intf_mappings["tenant"]["vlan_tag"]|string %}
+{% endif %}
+auto {{ intf_tenant }}
+iface {{ intf_tenant }} inet manual
+{% if sys_intf_mappings["tenant"]["interface"] != "None" %}
+ vlan-raw-device {{ intf_tenant }}
+{% endif %}
-# Storage network VLAN interface (optional)
-auto {{sys_intf_mappings["storage"]["interface"]}}.{{sys_intf_mappings["storage"]["vlan_tag"]}}
-iface {{sys_intf_mappings["storage"]["interface"]}}.{{sys_intf_mappings["storage"]["vlan_tag"]}} inet manual
- vlan-raw-device {{sys_intf_mappings["storage"]["interface"]}}
+# storage interface
+{% set intf_storage = sys_intf_mappings["storage"]["interface"] %}
+{% if sys_intf_mappings["storage"]["interface"] != "None" %}
+{% set intf_storage = intf_storage + '.' + sys_intf_mappings["storage"]["vlan_tag"]|string %}
+{% endif %}
+auto {{ intf_storage }}
+iface {{ intf_storage }} inet manual
+{% if sys_intf_mappings["storage"]["interface"] != "None" %}
+ vlan-raw-device {{ intf_storage }}
+{% endif %}
+
+# Container/Host management bridge
+auto br-mgmt
+iface br-mgmt inet static
+ bridge_stp off
+ bridge_waitport 0
+ bridge_fd 0
+ bridge_ports eth0
+ address {{ ip_settings[inventory_hostname]["mgmt"]["ip"] }}
+ netmask 255.255.255.0
# OpenStack Networking VLAN bridge
-auto br-vlan
-iface br-vlan inet static
+auto br-external
+iface br-external inet static
bridge_stp off
bridge_waitport 0
bridge_fd 0
- bridge_ports {{ network_cfg["provider_net_mappings"][0]["interface"] }}
- address {{ip_settings[inventory_hostname]["br-prv"]["ip"]}}
+ bridge_ports {{ intf_external }}
+ address {{ ip_settings[inventory_hostname]["external"]["ip"] }}
netmask 255.255.255.0
- gateway {{ip_settings[inventory_hostname]["br-prv"]["gw"]}}
+ gateway {{ ip_settings[inventory_hostname]["external"]["gw"] }}
offload-sg off
# Create veth pair, don't bomb if already exists
pre-up ip link add br-vlan-veth type veth peer name eth12 || true
@@ -41,12 +72,23 @@ iface br-vlan inet static
post-down ip link del br-vlan-veth || true
bridge_ports br-vlan-veth
-# compute storage bridge
+# VXLAN (tunnel/overlay) bridge config
+auto br-tenant
+iface br-tenant inet static
+ bridge_stp off
+ bridge_waitport 0
+ bridge_fd 0
+ bridge_ports {{ intf_tenant }}
+ address {{ ip_settings[inventory_hostname]["tenant"]["ip"] }}
+ netmask 255.255.255.0
+
+# storage bridge
auto br-storage
iface br-storage inet static
bridge_stp off
bridge_waitport 0
bridge_fd 0
- bridge_ports {{sys_intf_mappings["storage"]["interface"]}}.{{sys_intf_mappings["storage"]["vlan_tag"]}}
- address {{ip_settings[inventory_hostname]["storage"]["ip"]}}
- netmask 255.255.252.0
+ bridge_ports {{ intf_storage }}
+ address {{ ip_settings[inventory_hostname]["storage"]["ip"] }}
+ netmask 255.255.255.0
+