diff options
-rw-r--r-- | heat/vCPE/infra/base_vcpe_infra_rackspace.yaml | 6 | ||||
-rw-r--r-- | heat/vCPE/vbrgemu/base_vcpe_vbrgemu_rackspace.env | 1 | ||||
-rw-r--r-- | heat/vCPE/vbrgemu/base_vcpe_vbrgemu_rackspace.yaml | 11 | ||||
-rw-r--r-- | heat/vCPE/vgw/base_vcpe_vgw_rackspace.env | 1 | ||||
-rw-r--r-- | heat/vCPE/vgw/base_vcpe_vgw_rackspace.yaml | 5 | ||||
-rw-r--r-- | vnfs/vCPE/kea-sdnc-notify-mod/etc/kea-dhcp4.conf.example | 2 | ||||
-rw-r--r-- | vnfs/vCPE/scripts/kea-dhcp4.conf | 2 | ||||
-rw-r--r-- | vnfs/vCPE/scripts/v_aaa_install.sh | 1 | ||||
-rw-r--r-- | vnfs/vCPE/scripts/v_bng_install.sh | 1 | ||||
-rw-r--r-- | vnfs/vCPE/scripts/v_brgemu_install.sh | 1 | ||||
-rw-r--r-- | vnfs/vCPE/scripts/v_dhcp.sh | 98 | ||||
-rw-r--r-- | vnfs/vCPE/scripts/v_dhcp_init.sh | 3 | ||||
-rw-r--r-- | vnfs/vCPE/scripts/v_dhcp_install.sh | 15 | ||||
-rw-r--r-- | vnfs/vCPE/scripts/v_dns_install.sh | 1 | ||||
-rw-r--r-- | vnfs/vCPE/scripts/v_gmux_install.sh | 1 | ||||
-rw-r--r-- | vnfs/vCPE/scripts/v_gw_install.sh | 1 | ||||
-rw-r--r-- | vnfs/vCPE/scripts/v_web_install.sh | 1 |
17 files changed, 133 insertions, 18 deletions
diff --git a/heat/vCPE/infra/base_vcpe_infra_rackspace.yaml b/heat/vCPE/infra/base_vcpe_infra_rackspace.yaml index 374669f6..6b9160bc 100644 --- a/heat/vCPE/infra/base_vcpe_infra_rackspace.yaml +++ b/heat/vCPE/infra/base_vcpe_infra_rackspace.yaml @@ -454,7 +454,7 @@ resources: echo "__cloud_env__" > /opt/config/cloud_env.txt # Download and run install script - curl -k __repo_url_blob__/org.onap.demo/vnfs/vcpe/__install_script_version__/v_vweb_install.sh -o /opt/v_vweb_install.sh + curl -k __repo_url_blob__/org.onap.demo/vnfs/vcpe/__install_script_version__/v_web_install.sh -o /opt/v_web_install.sh cd /opt - chmod +x v_vweb_install.sh - ./v_vweb_install.sh + chmod +x v_web_install.sh + ./v_web_install.sh diff --git a/heat/vCPE/vbrgemu/base_vcpe_vbrgemu_rackspace.env b/heat/vCPE/vbrgemu/base_vcpe_vbrgemu_rackspace.env index f512bcde..0d4d894e 100644 --- a/heat/vCPE/vbrgemu/base_vcpe_vbrgemu_rackspace.env +++ b/heat/vCPE/vbrgemu/base_vcpe_vbrgemu_rackspace.env @@ -6,6 +6,7 @@ vbrgemu_private_net_id: zdfw1vbrgemu01_private vbrgemu_bng_private_net_cidr: 10.3.0.0/24 vbrgemu_private_net_cidr: 192.168.1.0/24 + vbrgemu_private_ip_0: 10.3.0.2 vbrgemu_private_ip_1: 192.168.1.1
vbrgemu_name_0: zdcpe11cpe01brgemu01 vnf_id: vCPE_Infrastructure_BGREMU_demo_app diff --git a/heat/vCPE/vbrgemu/base_vcpe_vbrgemu_rackspace.yaml b/heat/vCPE/vbrgemu/base_vcpe_vbrgemu_rackspace.yaml index c99da2ad..6f926eb5 100644 --- a/heat/vCPE/vbrgemu/base_vcpe_vbrgemu_rackspace.yaml +++ b/heat/vCPE/vbrgemu/base_vcpe_vbrgemu_rackspace.yaml @@ -63,10 +63,14 @@ parameters: type: string label: vBRGEMU Home private network CIDR description: The CIDR of the input side of vBRGEMU Home private network - vbrgemu_private_ip_1: + vbrgemu_private_ip_0: type: string - label: vGW IN private IP address + label: vGW private IP address description: Private IP address towards the BRGEMU-BNG network + vbrgemu_private_ip_1: + type: string + label: vGW private IP address + description: Private IP address towards the BRGEMU private network vbrgemu_name_0: type: string label: vGW name @@ -146,11 +150,12 @@ resources: cidr: { get_param: vbrgemu_private_net_cidr } # Virtual BRG Emulator Instantiation - # 0_port should get IP address from DHCP discover through vBNG + # 0_port should get IP address from DHCP discover through vBNG once the VNF is running vbrgemu_private_0_port: type: OS::Neutron::Port properties: network: { get_param: vbrgemu_bng_private_net_id } + fixed_ips: [{"subnet": { get_param: vbrgemu_bng_private_net_id }, "ip_address": { get_param: vbrgemu_private_ip_0 }}] vbrgemu_private_1_port: type: OS::Neutron::Port diff --git a/heat/vCPE/vgw/base_vcpe_vgw_rackspace.env b/heat/vCPE/vgw/base_vcpe_vgw_rackspace.env index 3842fc0d..33da8d73 100644 --- a/heat/vCPE/vgw/base_vcpe_vgw_rackspace.env +++ b/heat/vCPE/vgw/base_vcpe_vgw_rackspace.env @@ -11,6 +11,7 @@ onap_private_net_cidr: 10.0.0.0/16 vgw_private_ip_0: 10.5.0.21 vgw_private_ip_1: 10.0.101.30 + vgw_private_ip_2: 10.2.0.2 vgw_name_0: zdcpe11cpe01gw01 vnf_id: vCPE_Infrastructure_GW_demo_app vf_module_id: vCPE_Customer_GW diff --git a/heat/vCPE/vgw/base_vcpe_vgw_rackspace.yaml b/heat/vCPE/vgw/base_vcpe_vgw_rackspace.yaml index 8fe5e59f..0621556a 100644 --- a/heat/vCPE/vgw/base_vcpe_vgw_rackspace.yaml +++ b/heat/vCPE/vgw/base_vcpe_vgw_rackspace.yaml @@ -81,6 +81,10 @@ parameters: type: string label: vGW private IP address towards the ONAP management network description: Private IP address that is assigned to the vGW to communicate with ONAP components + vgw_private_ip_2: + type: string + label: vGW private IP address towards the vCPE public network + description: Private IP address that is assigned to the vGW to communicate with vCPE public network vgw_name_0: type: string label: vGW name @@ -174,6 +178,7 @@ resources: type: OS::Neutron::Port properties: network: { get_param: cpe_public_net_id} + fixed_ips: [{"subnet": { get_param: cpe_public_net_id }, "ip_address": { get_param: vgw_private_ip_2 }}] vgw_0: type: OS::Nova::Server diff --git a/vnfs/vCPE/kea-sdnc-notify-mod/etc/kea-dhcp4.conf.example b/vnfs/vCPE/kea-sdnc-notify-mod/etc/kea-dhcp4.conf.example index b3149af1..fa53f3c5 100644 --- a/vnfs/vCPE/kea-sdnc-notify-mod/etc/kea-dhcp4.conf.example +++ b/vnfs/vCPE/kea-sdnc-notify-mod/etc/kea-dhcp4.conf.example @@ -3,7 +3,7 @@ { # For testing, you can use veth pair as described in README.md "interfaces-config": { - "interfaces": ["veth0" ] + "interfaces": ["eth0" ] }, # How to load the hook library. diff --git a/vnfs/vCPE/scripts/kea-dhcp4.conf b/vnfs/vCPE/scripts/kea-dhcp4.conf index b3149af1..fa53f3c5 100644 --- a/vnfs/vCPE/scripts/kea-dhcp4.conf +++ b/vnfs/vCPE/scripts/kea-dhcp4.conf @@ -3,7 +3,7 @@ { # For testing, you can use veth pair as described in README.md "interfaces-config": { - "interfaces": ["veth0" ] + "interfaces": ["eth0" ] }, # How to load the hook library. diff --git a/vnfs/vCPE/scripts/v_aaa_install.sh b/vnfs/vCPE/scripts/v_aaa_install.sh index 0ce24d88..a4a34aca 100644 --- a/vnfs/vCPE/scripts/v_aaa_install.sh +++ b/vnfs/vCPE/scripts/v_aaa_install.sh @@ -74,5 +74,4 @@ then reboot fi -# Run docker containers. For openstack Ubuntu 16.04 images this will run as a service after the VM has restarted ./v_aaa_init.sh
\ No newline at end of file diff --git a/vnfs/vCPE/scripts/v_bng_install.sh b/vnfs/vCPE/scripts/v_bng_install.sh index 516a7307..dad8b2f7 100644 --- a/vnfs/vCPE/scripts/v_bng_install.sh +++ b/vnfs/vCPE/scripts/v_bng_install.sh @@ -94,5 +94,4 @@ then reboot fi -# Run docker containers. For openstack Ubuntu 16.04 images this will run as a service after the VM has restarted ./v_bng_init.sh
\ No newline at end of file diff --git a/vnfs/vCPE/scripts/v_brgemu_install.sh b/vnfs/vCPE/scripts/v_brgemu_install.sh index 367009a1..10976da1 100644 --- a/vnfs/vCPE/scripts/v_brgemu_install.sh +++ b/vnfs/vCPE/scripts/v_brgemu_install.sh @@ -64,5 +64,4 @@ then reboot fi -# Run docker containers. For openstack Ubuntu 16.04 images this will run as a service after the VM has restarted ./v_brgemu_init.sh
\ No newline at end of file diff --git a/vnfs/vCPE/scripts/v_dhcp.sh b/vnfs/vCPE/scripts/v_dhcp.sh new file mode 100644 index 00000000..7799bea2 --- /dev/null +++ b/vnfs/vCPE/scripts/v_dhcp.sh @@ -0,0 +1,98 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start daemon at boot time +# Description: Enable service provided by daemon. +### END INIT INFO + +dir="/opt" +cmd="./v_dhcp_init.sh" +user="root" + +name=`basename $0` +pid_file="/var/run/$name.pid" +stdout_log="/var/log/$name.log" +stderr_log="/var/log/$name.err" + +get_pid() { + cat "$pid_file" +} + +is_running() { + [ -f "$pid_file" ] && ps `get_pid` > /dev/null 2>&1 +} + +case "$1" in + start) + if is_running; then + echo "Already started" + else + echo "Starting $name" + cd "$dir" + if [ -z "$user" ]; then + sudo $cmd >> "$stdout_log" 2>> "$stderr_log" & + else + sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & + fi + echo $! > "$pid_file" + if ! is_running; then + echo "Unable to start, see $stdout_log and $stderr_log" + exit 1 + fi + fi + ;; + stop) + if is_running; then + echo -n "Stopping $name.." + kill `get_pid` + for i in {1..10} + do + if ! is_running; then + break + fi + + echo -n "." + sleep 1 + done + echo + + if is_running; then + echo "Not stopped; may still be shutting down or shutdown may have failed" + exit 1 + else + echo "Stopped" + if [ -f "$pid_file" ]; then + rm "$pid_file" + fi + fi + else + echo "Not running" + fi + ;; + restart) + $0 stop + if is_running; then + echo "Unable to stop, will not attempt to start" + exit 1 + fi + $0 start + ;; + status) + if is_running; then + echo "Running" + else + echo "Stopped" + exit 1 + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/vnfs/vCPE/scripts/v_dhcp_init.sh b/vnfs/vCPE/scripts/v_dhcp_init.sh new file mode 100644 index 00000000..aa32b792 --- /dev/null +++ b/vnfs/vCPE/scripts/v_dhcp_init.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +service kea-dhcp4-server start
\ No newline at end of file diff --git a/vnfs/vCPE/scripts/v_dhcp_install.sh b/vnfs/vCPE/scripts/v_dhcp_install.sh index 025b1980..d88ed509 100644 --- a/vnfs/vCPE/scripts/v_dhcp_install.sh +++ b/vnfs/vCPE/scripts/v_dhcp_install.sh @@ -56,20 +56,27 @@ sleep 1 # download the kea hook cd /opt wget $REPO_URL_ARTIFACTS/org/onap/demo/vnf/vcpe/kea-sdnc-notify-mod/$DEMO_ARTIFACTS_VERSION/kea-sdnc-notify-mod-$DEMO_ARTIFACTS_VERSION-demo.tar.gz -tar -zxvf kea-sdnc-notify-mod.tar.gz -mv kea-sdnc-notify-mod VDHCP +tar -zxvf kea-sdnc-notify-mod-$DEMO_ARTIFACTS_VERSION-demo.tar.gz +mv kea-sdnc-notify-mod-$DEMO_ARTIFACTS_VERSION VDHCP rm *.tar.gz cd VDHCP # build.sh takes a minute or two to run ./build.sh -mv kea-sdnc-notify.so /usr/local/lib +mv build/kea-sdnc-notify.so /usr/local/lib # Download DHCP config files cd /opt wget $REPO_URL_BLOB/org.onap.demo/vnfs/vcpe/$INSTALL_SCRIPT_VERSION/kea-dhcp4.conf wget $REPO_URL_BLOB/org.onap.demo/vnfs/vcpe/$INSTALL_SCRIPT_VERSION/kea-sdnc-notify.conf +wget $REPO_URL_BLOB/org.onap.demo/vnfs/vcpe/$INSTALL_SCRIPT_VERSION/v_dhcp_init.sh +wget $REPO_URL_BLOB/org.onap.demo/vnfs/vcpe/$INSTALL_SCRIPT_VERSION/v_dhcp.sh +chmod +x v_dhcp_init.sh +chmod +x v_dhcp.sh +mv v_dhcp.sh /etc/init.d +update-rc.d v_dhcp.sh defaults # Configure DHCP +cp kea-dhcp4.conf /etc/kea-dhcp4-server.conf mv kea-dhcp4.conf /etc/kea/kea-dhcp4.conf mv kea-sdnc-notify.conf /etc/kea/kea-sdnc-notify.conf sleep 1 @@ -96,3 +103,5 @@ then echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic reboot fi + +./v_dhcp_init.sh
\ No newline at end of file diff --git a/vnfs/vCPE/scripts/v_dns_install.sh b/vnfs/vCPE/scripts/v_dns_install.sh index c07b700b..02ab69bf 100644 --- a/vnfs/vCPE/scripts/v_dns_install.sh +++ b/vnfs/vCPE/scripts/v_dns_install.sh @@ -74,5 +74,4 @@ then reboot fi -# Run docker containers. For openstack Ubuntu 16.04 images this will run as a service after the VM has restarted ./v_dns_init.sh
\ No newline at end of file diff --git a/vnfs/vCPE/scripts/v_gmux_install.sh b/vnfs/vCPE/scripts/v_gmux_install.sh index b301016c..b43cf7bf 100644 --- a/vnfs/vCPE/scripts/v_gmux_install.sh +++ b/vnfs/vCPE/scripts/v_gmux_install.sh @@ -84,5 +84,4 @@ then reboot fi -# Run docker containers. For openstack Ubuntu 16.04 images this will run as a service after the VM has restarted ./v_gmux_init.sh
\ No newline at end of file diff --git a/vnfs/vCPE/scripts/v_gw_install.sh b/vnfs/vCPE/scripts/v_gw_install.sh index 856d0ecc..cafb204d 100644 --- a/vnfs/vCPE/scripts/v_gw_install.sh +++ b/vnfs/vCPE/scripts/v_gw_install.sh @@ -74,5 +74,4 @@ then reboot fi -# Run docker containers. For openstack Ubuntu 16.04 images this will run as a service after the VM has restarted ./v_gw_init.sh
\ No newline at end of file diff --git a/vnfs/vCPE/scripts/v_web_install.sh b/vnfs/vCPE/scripts/v_web_install.sh index 3e47ed2e..94d3ebd7 100644 --- a/vnfs/vCPE/scripts/v_web_install.sh +++ b/vnfs/vCPE/scripts/v_web_install.sh @@ -74,5 +74,4 @@ then reboot fi -# Run docker containers. For openstack Ubuntu 16.04 images this will run as a service after the VM has restarted ./v_web_init.sh
\ No newline at end of file |