summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/nics-compute.yaml.jinja219
-rwxr-xr-xbuild/overcloud-full.sh1
-rwxr-xr-xci/deploy.sh8
-rwxr-xr-xlib/python/apex-python-utils.py12
4 files changed, 36 insertions, 4 deletions
diff --git a/build/nics-compute.yaml.jinja2 b/build/nics-compute.yaml.jinja2
index 3a73bbd8..1bc2b50a 100644
--- a/build/nics-compute.yaml.jinja2
+++ b/build/nics-compute.yaml.jinja2
@@ -105,6 +105,24 @@ resources:
next_hop: {get_param: ControlPlaneDefaultRoute}
{%- set nic_index = 2 %}
{%- if 'private_network' in enabled_networks %}
+ {%- if ovs_dpdk_bridge == 'br-phy' %}
+ -
+ type: interface
+ name: nic{{ nic_index }}{% set nic_index = nic_index + 1 %}
+ use_dhcp: false
+
+ -
+ type: ovs_bridge
+ name: {{ ovs_dpdk_bridge }}
+ use_dhcp: false
+ addresses:
+ -
+ ip_netmask: {get_param: TenantIpSubnet}
+ -
+ type: ovs_bridge
+ name: br-tun
+ use_dhcp: false
+ {%- else %}
-
type: interface
name: nic{{ nic_index }}{% set nic_index = nic_index + 1 %}
@@ -113,6 +131,7 @@ resources:
-
ip_netmask: {get_param: TenantIpSubnet}
{%- endif %}
+ {%- endif %}
{%- if external_net_type == "interface" %}
-
type: interface
diff --git a/build/overcloud-full.sh b/build/overcloud-full.sh
index 1a8d8461..340053b3 100755
--- a/build/overcloud-full.sh
+++ b/build/overcloud-full.sh
@@ -29,6 +29,7 @@ git archive --format=tar.gz --prefix=tripleo/ HEAD > ../opnfv-puppet-tripleo.tar
popd > /dev/null
# download customized os-net-config
+rm -fr os-net-config
git clone https://github.com/trozet/os-net-config.git -b hiera_nic_mapping
pushd os-net-config > /dev/null
pushd os_net_config > /dev/null
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 25527da5..6d75bac0 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -648,12 +648,18 @@ function configure_undercloud {
ext_net_type=br-ex
fi
+ if [ "${deploy_options_array['dataplane']}" == 'ovs_dpdk' ]; then
+ ovs_dpdk_bridge='br-phy'
+ else
+ ovs_dpdk_bridge=''
+ fi
+
if ! controller_nic_template=$(python3.4 -B $LIB/python/apex-python-utils.py nic-template -t $CONFIG/nics-controller.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family); then
echo -e "${red}ERROR: Failed to generate controller NIC heat template ${reset}"
exit 1
fi
- if ! compute_nic_template=$(python3.4 -B $LIB/python/apex-python-utils.py nic-template -t $CONFIG/nics-compute.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family); then
+ if ! compute_nic_template=$(python3.4 -B $LIB/python/apex-python-utils.py nic-template -t $CONFIG/nics-compute.yaml.jinja2 -n "$enabled_network_list" -e $ext_net_type -af $ip_addr_family -d "$ovs_dpdk_bridge"); then
echo -e "${red}ERROR: Failed to generate compute NIC heat template ${reset}"
exit 1
fi
diff --git a/lib/python/apex-python-utils.py b/lib/python/apex-python-utils.py
index 6c76cb13..c9dcaa55 100755
--- a/lib/python/apex-python-utils.py
+++ b/lib/python/apex-python-utils.py
@@ -79,14 +79,17 @@ def build_nic_template(args):
interface or br-ex, defines the external network configuration
- address_family: string
4 or 6, respective to ipv4 or ipv6
+ - ovs_dpdk_bridge: string
+ bridge name to use as ovs_dpdk
"""
- dir, template = args.template.rsplit('/', 1)
+ template_dir, template = args.template.rsplit('/', 1)
- env = Environment(loader=FileSystemLoader(dir))
+ env = Environment(loader=FileSystemLoader(template_dir))
template = env.get_template(template)
print(template.render(enabled_networks=args.enabled_networks,
external_net_type=args.ext_net_type,
- external_net_af=args.address_family))
+ external_net_af=args.address_family,
+ ovs_dpdk_bridge=args.ovs_dpdk_bridge))
def parse_args():
@@ -135,6 +138,9 @@ def parse_args():
help='External network type')
nic_template.add_argument('-af', '--address-family', type=int, default=4,
dest='address_family', help='IP address family')
+ nic_template.add_argument('-d', '--ovs-dpdk-bridge',
+ default=None, dest='ovs_dpdk_bridge',
+ help='OVS DPDK Bridge Name')
nic_template.set_defaults(func=build_nic_template)
deploy_settings = subparsers.add_parser('parse-deploy-settings',