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
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\r
vbrgemu_name_0: zdcpe11cpe01brgemu01
vnf_id: vCPE_Infrastructure_BGREMU_demo_app
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
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
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
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
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
{
# For testing, you can use veth pair as described in README.md
"interfaces-config": {
- "interfaces": ["veth0" ]
+ "interfaces": ["eth0" ]
},
# How to load the hook library.
{
# For testing, you can use veth pair as described in README.md
"interfaces-config": {
- "interfaces": ["veth0" ]
+ "interfaces": ["eth0" ]
},
# How to load the hook library.
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
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
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
--- /dev/null
+#!/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
--- /dev/null
+#!/bin/bash
+
+service kea-dhcp4-server start
\ No newline at end of file
# 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
echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic
reboot
fi
+
+./v_dhcp_init.sh
\ No newline at end of file
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
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
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
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