Update INFO.yaml with new PTL
[demo.git] / vnfs / vCPE / kea-sdnc-notify-mod / README.md
1 #
2 # kea-sdnc-notify-mod
3
4 Kea module utilizing hooks api to notify SDNC of macaddr, yiaddr, dhcp-msg-name via HTTP POST request.
5
6 # ONAP installation of vDHCP will install and configure on the vDHCP VM
7 #
8 # for local development/testing follow these steps.
9 #
10
11 #
12 # install kea on ubuntu
13 apt-get install  kea-dhcp4-server
14
15
16 #
17 # Usage
18 Install the compiled library from the ./build direction to  /usr/local/lib/kea-sdnc-notify.so
19
20 Configure /etc/kea/kea-sdnc-notify.conf using the ./etc example
21
22 Configure /etc/kea/kea-dhcp4.conf usign the ./etc example
23
24 The hook will POST json from the the variables from the DHCP Acknowledgement message to the SDNC "url" in the form of "url+macaddr"
25 "url": "http://localhost/sdnc.php?macaddr="
26
27 Example: http://localhost/sdnc.php?macaddr=aa:bb:cc:dd:ee:ff
28
29 In the ONAP installation instead of localhost it will be to either a DMaaP Topic or to SDNC directly.
30
31
32 ## START DHCP
33 [as root]
34 cd /etc/init.d 
35 ./kea-dhcp4-server start or
36 ./kea-dhcp4-server restart 
37
38 ./kea-dhcp4-server stop 
39
40 ## logs are in 
41 /var/log/kea-dhcp4.log
42
43 ## Build requirements
44 This software has been developed on Ubuntu 16.04.  
45
46 apt-get install g++ libcurl4-gnutls-dev libboost-dev kea-dev
47
48 ./build.sh
49
50 ## Installation in  ONAP
51 The vdhcp install scripts for ONAP will do the build on the vDHCP VM from these source files and copy the resulting library into /usr/local/lib and the configuration files into /etc/kea
52
53 ## Testing locally
54
55 #### USE THIS ON OPENSTACK UBUNTU 16.04 GUEST VM
56
57 Create a veth pair:
58
59 ip link add veth0 type veth peer name veth1
60
61 ip link set veth0 up && ip link set veth1 up
62
63 ip address add dev veth0 10.3.0.1/24
64
65 dhclient -d -v veth1
66
67 dhclient -d -v veth1 -r (to release) 
68