aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vnfs/vCPE/scripts/kea-dhcp4.conf2
-rw-r--r--vnfs/vCPE/scripts/kea-dhcp4_no_hook.conf59
-rw-r--r--vnfs/vCPE/scripts/v_aaa_install.sh3
-rw-r--r--vnfs/vCPE/scripts/v_dhcp_install.sh2
-rw-r--r--vnfs/vCPE/scripts/v_dns_init.sh3
-rw-r--r--vnfs/vCPE/scripts/v_dns_install.sh10
6 files changed, 75 insertions, 4 deletions
diff --git a/vnfs/vCPE/scripts/kea-dhcp4.conf b/vnfs/vCPE/scripts/kea-dhcp4.conf
index fa53f3c5..62b77e29 100644
--- a/vnfs/vCPE/scripts/kea-dhcp4.conf
+++ b/vnfs/vCPE/scripts/kea-dhcp4.conf
@@ -36,7 +36,7 @@
"next-server": "10.3.0.1",
"option-data": [
{"name": "tftp-server-name",
- "data": "10.4.0.1"},
+ "data": "10.3.0.1"},
{"name": "boot-file-name",
"data": "/dev/null"}
]
diff --git a/vnfs/vCPE/scripts/kea-dhcp4_no_hook.conf b/vnfs/vCPE/scripts/kea-dhcp4_no_hook.conf
new file mode 100644
index 00000000..3e2287d1
--- /dev/null
+++ b/vnfs/vCPE/scripts/kea-dhcp4_no_hook.conf
@@ -0,0 +1,59 @@
+{
+"Dhcp4":
+ {
+# For testing, you can use veth pair as described in README.md
+ "interfaces-config": {
+ "interfaces": ["eth0" ]
+ },
+
+ "lease-database": {
+ "type": "memfile"
+ },
+
+ "expired-leases-processing": {
+ "reclaim-timer-wait-time": 10,
+ "flush-reclaimed-timer-wait-time": 25,
+ "hold-reclaimed-time": 3600,
+ "max-reclaim-leases": 100,
+ "max-reclaim-time": 250,
+ "unwarned-reclaim-cycles": 5
+ },
+
+ "valid-lifetime": 300,
+
+# Ensure you set some sensible defaults for the siaddr and option-data,
+# otherwise the options won't be added at all.
+# Also keep in mind that if kea doesn't receive the desired values for some
+# reason, these values will be sent to the client.
+ "subnet4": [
+ { "subnet": "10.2.0.0/24",
+ "pools" : [ { "pool": "10.2.0.2 - 10.2.0.255"} ],
+ "next-server": "10.2.0.1",
+ "option-data": [
+ {"name": "tftp-server-name",
+ "data": "10.2.0.1"},
+ {"name": "boot-file-name",
+ "data": "/dev/null"}
+ ]
+ }
+ ]
+
+},
+
+"Logging":
+{
+ "loggers": [
+ {
+ "name": "kea-dhcp4",
+ "output_options": [
+ {
+ "output": "/var/log/kea-dhcp4.log"
+ }
+ ],
+ "severity": "DEBUG",
+ "debuglevel": 0
+ },
+ ]
+}
+
+}
diff --git a/vnfs/vCPE/scripts/v_aaa_install.sh b/vnfs/vCPE/scripts/v_aaa_install.sh
index a4a34aca..5505d1cb 100644
--- a/vnfs/vCPE/scripts/v_aaa_install.sh
+++ b/vnfs/vCPE/scripts/v_aaa_install.sh
@@ -62,6 +62,9 @@ chmod +x v_aaa.sh
mv v_aaa.sh /etc/init.d
update-rc.d v_aaa.sh defaults
+# Download and install FreeRADIUS as AAA server
+apt-get install -y freeradius
+
# Rename network interface in openstack Ubuntu 16.04 images. Then, reboot the VM to pick up changes
if [[ $CLOUD_ENV != "rackspace" ]]
then
diff --git a/vnfs/vCPE/scripts/v_dhcp_install.sh b/vnfs/vCPE/scripts/v_dhcp_install.sh
index f9ea25b7..c8c567d3 100644
--- a/vnfs/vCPE/scripts/v_dhcp_install.sh
+++ b/vnfs/vCPE/scripts/v_dhcp_install.sh
@@ -54,7 +54,7 @@ apt-get update
apt-get install -y wget openjdk-8-jdk apt-transport-https ca-certificates kea-dhcp4-server g++ libcurl4-gnutls-dev libboost-dev kea-dev
sleep 1
-# download the kea hook
+# 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-$DEMO_ARTIFACTS_VERSION-demo.tar.gz
diff --git a/vnfs/vCPE/scripts/v_dns_init.sh b/vnfs/vCPE/scripts/v_dns_init.sh
index a9bf588e..dd85a92d 100644
--- a/vnfs/vCPE/scripts/v_dns_init.sh
+++ b/vnfs/vCPE/scripts/v_dns_init.sh
@@ -1 +1,4 @@
#!/bin/bash
+
+service kea-dhcp4-server start
+service bind9 restart \ 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 02ab69bf..426af3b5 100644
--- a/vnfs/vCPE/scripts/v_dns_install.sh
+++ b/vnfs/vCPE/scripts/v_dns_install.sh
@@ -50,18 +50,24 @@ fi
# Download required dependencies
add-apt-repository -y ppa:openjdk-r/ppa
apt-get update
-apt-get install -y wget openjdk-8-jdk apt-transport-https ca-certificates g++ libcurl4-gnutls-dev
+apt-get install -y wget openjdk-8-jdk bind9 bind9utils bind9-doc apt-transport-https ca-certificates kea-dhcp4-server g++ libcurl4-gnutls-dev libboost-dev kea-dev
sleep 1
-# Download DHCP config files
+# Download DNS and DHCP config files
cd /opt
+wget $REPO_URL_BLOB/org.onap.demo/vnfs/vcpe/$INSTALL_SCRIPT_VERSION/kea-dhcp4_no_hook.conf
wget $REPO_URL_BLOB/org.onap.demo/vnfs/vcpe/$INSTALL_SCRIPT_VERSION/v_dns_init.sh
wget $REPO_URL_BLOB/org.onap.demo/vnfs/vcpe/$INSTALL_SCRIPT_VERSION/v_dns.sh
+mv kea-dhcp4_no_hook.conf /etc/kea/kea-dhcp4.conf
chmod +x v_dns_init.sh
chmod +x v_dns.sh
mv v_dns.sh /etc/init.d
update-rc.d v_dns.sh defaults
+# Install Bind
+mkdir /etc/bind/zones
+sed -i "s/OPTIONS=.*/OPTIONS=\"-4 -u bind\"/g" /etc/default/bind9
+
# Rename network interface in openstack Ubuntu 16.04 images. Then, reboot the VM to pick up changes
if [[ $CLOUD_ENV != "rackspace" ]]
then