diff options
Diffstat (limited to 'deploy/adapters/ansible/roles/config-controller')
-rwxr-xr-x | deploy/adapters/ansible/roles/config-controller/templates/controller.j2 | 75 |
1 files changed, 49 insertions, 26 deletions
diff --git a/deploy/adapters/ansible/roles/config-controller/templates/controller.j2 b/deploy/adapters/ansible/roles/config-controller/templates/controller.j2 index 215807f0..2aeb9a04 100755 --- a/deploy/adapters/ansible/roles/config-controller/templates/controller.j2 +++ b/deploy/adapters/ansible/roles/config-controller/templates/controller.j2 @@ -9,15 +9,38 @@ iface lo inet loopback auto eth0 iface eth0 inet manual -# 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"]}} +# 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 %} -# 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"]}} +# 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 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 @@ -26,8 +49,19 @@ iface br-mgmt inet static bridge_waitport 0 bridge_fd 0 bridge_ports eth0 - address {{host_info[inventory_hostname].MGMT_IP}} + address {{ ip_settings[inventory_hostname]["mgmt"]["ip"] }} + netmask 255.255.255.0 + +# OpenStack Networking VLAN bridge +auto br-external +iface br-external inet static + bridge_stp off + bridge_waitport 0 + bridge_fd 0 + bridge_ports {{ intf_external }} + address {{ ip_settings[inventory_hostname]["external"]["ip"] }} netmask 255.255.255.0 + gateway {{ ip_settings[inventory_hostname]["external"]["gw"] }} # OpenStack Networking VXLAN (tunnel/overlay) bridge # @@ -36,30 +70,19 @@ iface br-mgmt inet static # IP addresses are assigned to containers which use this # bridge. # -auto br-vxlan -iface br-vxlan inet manual +auto br-tenant +iface br-tenant inet manual bridge_stp off bridge_waitport 0 bridge_fd 0 - bridge_ports {{sys_intf_mappings["mgmt"]["interface"]}}.{{sys_intf_mappings["mgmt"]["vlan_tag"]}} + bridge_ports {{ intf_tenant }} -# OpenStack Networking VLAN bridge -auto br-vlan -iface br-vlan 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"] }} - netmask 255.255.255.0 - gateway {{ ip_settings[inventory_hostname]["br-prv"]["gw"] }} - -# compute1 Storage bridge +# 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"]}} + bridge_ports {{ intf_storage }} address {{ ip_settings[inventory_hostname]["storage"]["ip"] }} - netmask 255.255.252.0 + netmask 255.255.255.0 |