Install vDNS, vAAA and vDHCP services in vCPE 35/9235/1
authorMarco Platania <platania@research.att.com>
Tue, 29 Aug 2017 22:15:49 +0000 (18:15 -0400)
committerMarco Platania <platania@research.att.com>
Tue, 29 Aug 2017 22:17:44 +0000 (18:17 -0400)
- Bind as vDNS
- FreeRADIUS as vAAA
- KEA-DHCP-SERVER as vDHCP

Change-Id: I9a54add31542c075163bf946f475a184e14600aa
Issue-ID: INT-84
Signed-off-by: Marco Platania <platania@research.att.com>
vnfs/vCPE/scripts/kea-dhcp4.conf
vnfs/vCPE/scripts/kea-dhcp4_no_hook.conf [new file with mode: 0644]
vnfs/vCPE/scripts/v_aaa_install.sh
vnfs/vCPE/scripts/v_dhcp_install.sh
vnfs/vCPE/scripts/v_dns_init.sh
vnfs/vCPE/scripts/v_dns_install.sh

index fa53f3c..62b77e2 100644 (file)
@@ -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 (file)
index 0000000..3e2287d
--- /dev/null
@@ -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
+    },
+  ]
+}
+
+}
index a4a34ac..5505d1c 100644 (file)
@@ -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
index f9ea25b..c8c567d 100644 (file)
@@ -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
index a9bf588..dd85a92 100644 (file)
@@ -1 +1,4 @@
 #!/bin/bash
+
+service kea-dhcp4-server start
+service bind9 restart
\ No newline at end of file
index 02ab69b..426af3b 100644 (file)
@@ -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