aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--heat/vCPE/vgw/base_vcpe_vgw.env2
-rw-r--r--heat/vCPE/vgw/base_vcpe_vgw.yaml12
-rw-r--r--vnfs/vCPE/scripts/v_gw_install.sh16
3 files changed, 25 insertions, 5 deletions
diff --git a/heat/vCPE/vgw/base_vcpe_vgw.env b/heat/vCPE/vgw/base_vcpe_vgw.env
index f1cadb83..6f33138e 100644
--- a/heat/vCPE/vgw/base_vcpe_vgw.env
+++ b/heat/vCPE/vgw/base_vcpe_vgw.env
@@ -17,6 +17,8 @@
vgw_name_0: zdcpe1cpe01gw01
vnf_id: vCPE_Infrastructure_GW_demo_app
vf_module_id: vCPE_Customer_GW
+ mux_ip_addr: 10.5.0.20
+ vg_vgmux_tunnel_vni: 100
dcae_collector_ip: 10.0.4.102
dcae_collector_port: 8080
repo_url_blob: https://nexus.onap.org/content/sites/raw
diff --git a/heat/vCPE/vgw/base_vcpe_vgw.yaml b/heat/vCPE/vgw/base_vcpe_vgw.yaml
index 173ba6dd..c4b98760 100644
--- a/heat/vCPE/vgw/base_vcpe_vgw.yaml
+++ b/heat/vCPE/vgw/base_vcpe_vgw.yaml
@@ -157,6 +157,14 @@ parameters:
type: string
label: Honeycomb Source Git Branch
description: Git Branch for the Honeycomb source codes
+ mux_ip_addr:
+ type: string
+ label: vGMUX IP address
+ description: IP address of vGMUX
+ vg_vgmux_tunnel_vni:
+ type: number
+ label: vG-vGMUX tunnel vni
+ description: vni value of vG-vGMUX vxlan tunnel
#############
# #
@@ -233,6 +241,8 @@ resources:
__vpp_source_repo_branch__ : { get_param: vpp_source_repo_branch }
__hc2vpp_source_repo_url__ : { get_param: hc2vpp_source_repo_url }
__hc2vpp_source_repo_branch__ : { get_param: hc2vpp_source_repo_branch }
+ __mux_ip_addr__: { get_param: mux_ip_addr }
+ __vg_vgmux_tunnel_vni__: { get_param: vg_vgmux_tunnel_vni }
template: |
#!/bin/bash
@@ -252,6 +262,8 @@ resources:
echo "__vpp_source_repo_branch__" > /opt/config/vpp_source_repo_branch.txt
echo "__hc2vpp_source_repo_url__" > /opt/config/hc2vpp_source_repo_url.txt
echo "__hc2vpp_source_repo_branch__" > /opt/config/hc2vpp_source_repo_branch.txt
+ echo "__mux_ip_addr__" > /opt/config/mux_ip_addr.txt
+ echo "__vg_vgmux_tunnel_vni__" > /opt/config/vg_vgmux_tunnel_vni.txt
# Download and run install script
curl -k __repo_url_blob__/org.onap.demo/vnfs/vcpe/__install_script_version__/v_gw_install.sh -o /opt/v_gw_install.sh
diff --git a/vnfs/vCPE/scripts/v_gw_install.sh b/vnfs/vCPE/scripts/v_gw_install.sh
index 6074cdfa..4b4a7686 100644
--- a/vnfs/vCPE/scripts/v_gw_install.sh
+++ b/vnfs/vCPE/scripts/v_gw_install.sh
@@ -11,6 +11,8 @@ HC2VPP_SOURCE_REPO_BRANCH=$(cat /opt/config/hc2vpp_source_repo_branch.txt)
CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
MUX_GW_IP=$(cat /opt/config/mux_gw_private_net_ipaddr.txt)
MUX_GW_CIDR=$(cat /opt/config/mux_gw_private_net_cidr.txt)
+MUX_IP_ADDR=$(cat /opt/config/mux_ip_addr.txt)
+VG_VGMUX_TUNNEL_VNI=$(cat /opt/config/vg_vgmux_tunnel_vni.txt)
# Build states are:
# 'build' - just build the code
@@ -207,10 +209,9 @@ EOF
MUX_GW_NIC=GigabitEthernet`echo ${NICS} | cut -d " " -f 2` # second interface in list
GW_PUB_NIC=GigabitEthernet`echo ${NICS} | cut -d " " -f 4` # fourth interface in list
-touch /etc/vpp/setup.gate
cat > /etc/vpp/setup.gate << EOF
set int state ${MUX_GW_NIC} up
-set int ip address ${MUX_GW_NIC} 10.5.0.21/24
+set int ip address ${MUX_GW_NIC} ${MUX_GW_IP}/${MUX_GW_CIDR#*/}
set int state ${GW_PUB_NIC} up
set dhcp client intfc ${GW_PUB_NIC} hostname vg-1
@@ -218,7 +219,7 @@ set dhcp client intfc ${GW_PUB_NIC} hostname vg-1
tap connect lstack address 192.168.1.1/24
set int state tap-0 up
-create vxlan tunnel src 10.5.0.21 dst 10.5.0.20 vni 100
+create vxlan tunnel src ${MUX_GW_IP} dst ${MUX_IP_ADDR} vni ${VG_VGMUX_TUNNEL_VNI}
set interface l2 bridge tap-0 10 0
set interface l2 bridge vxlan_tunnel0 10 1
@@ -361,6 +362,12 @@ EOF
mv vpp-integration/minimal-distribution/target/vpp-integration-distribution-${l_version}-hc/vpp-integration-distribution-${l_version} /opt/honeycomb
sed -i 's/127.0.0.1/0.0.0.0/g' /opt/honeycomb/config/honeycomb.json
+ # Disable automatic upgrades
+ if [[ $CLOUD_ENV != "rackspace" ]]
+ then
+ echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic
+ sed -i 's/\(APT::Periodic::Unattended-Upgrade\) "1"/\1 "0"/' /etc/apt/apt.conf.d/20auto-upgrades
+ fi
fi # endif BUILD_STATE != "done
if [[ $BUILD_STATE != "build" ]]
@@ -403,7 +410,7 @@ EOF
chmod +x v_gw_init.sh
chmod +x v_gw.sh
mv v_gw.sh /etc/init.d
- sed "s/Provides:/$/ v_gw" /etc/init.d/v_gw.sh
+ sed -i '/# Provides:/ s/$/ v_gw/' /etc/init.d/v_gw.sh
update-rc.d v_gw.sh defaults
# Rename network interface in openstack Ubuntu 16.04 images. Then, reboot the VM to pick up changes
@@ -414,7 +421,6 @@ EOF
sed -i "s/ens[0-9]*/eth0/g" /etc/network/interfaces.d/*.cfg
sed -i "s/ens[0-9]*/eth0/g" /etc/udev/rules.d/70-persistent-net.rules
echo 'network: {config: disabled}' >> /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
- echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic
reboot
fi