aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Platania <platania@research.att.com>2018-03-28 21:42:43 -0700
committerMarco Platania <platania@research.att.com>2018-03-28 21:42:43 -0700
commit589b2531a2f2c70363244a9cf082b94ca70ac2e9 (patch)
treee8898501aaf4a2de0732eeba908afe9cfad69d85
parent448b70b7b74aed5c7ef777d860f2d094ea9e7420 (diff)
Add static vDNS config to vLBMS
Change-Id: Ib30f2f2a5da2ffccab2ce505c5c6ca21a32531f6 Issue-ID: INT-431 Signed-off-by: Marco Platania <platania@research.att.com>
-rw-r--r--heat/vLBMS/base_vlb.yaml4
-rw-r--r--vnfs/vLBMS/scripts/v_lb_init.sh8
2 files changed, 11 insertions, 1 deletions
diff --git a/heat/vLBMS/base_vlb.yaml b/heat/vLBMS/base_vlb.yaml
index 9c9cb53b..b04feb7f 100644
--- a/heat/vLBMS/base_vlb.yaml
+++ b/heat/vLBMS/base_vlb.yaml
@@ -259,9 +259,11 @@ resources:
__ip_to_dns_net__: { get_param: vlb_private_ip_0 }
__ip_to_pktgen_net__: { get_param: vlb_private_ip_2 }
__oam_vpktgen_ip__: { get_param: vpg_private_ip_1 }
+ __oam_vdns_ip__: { get_param: vdns_private_ip_1 }
__vip__: { get_param: vip }
__gre_ipaddr__: { get_param: gre_ipaddr }
__pktgen_ipaddr__: { get_param: vpg_private_ip_0 }
+ __vdns_ipaddr__: { get_param: vdns_private_ip_0 }
__oam_private_ipaddr__: { get_param: vlb_private_ip_1 }
__repo_url_blob__: { get_param: repo_url_blob }
__repo_url_artifacts__: { get_param: repo_url_artifacts }
@@ -282,9 +284,11 @@ resources:
echo "__ip_to_dns_net__" > /opt/config/ip_to_dns_net.txt
echo "__ip_to_pktgen_net__" > /opt/config/ip_to_pktgen_net.txt
echo "__oam_vpktgen_ip__" > /opt/config/oam_vpktgen_ip.txt
+ echo "__oam_vdns_ip__" > /opt/config/oam_vdns_ip.txt
echo "__vip__" > /opt/config/vip.txt
echo "__gre_ipaddr__" > /opt/config/gre_ipaddr.txt
echo "__pktgen_ipaddr__" > /opt/config/pktgen_ipaddr.txt
+ echo "__vdns_ipaddr__" > /opt/config/vdns_ipaddr.txt
echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt
echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt
echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt
diff --git a/vnfs/vLBMS/scripts/v_lb_init.sh b/vnfs/vLBMS/scripts/v_lb_init.sh
index 072d3ae2..26d88c08 100644
--- a/vnfs/vLBMS/scripts/v_lb_init.sh
+++ b/vnfs/vLBMS/scripts/v_lb_init.sh
@@ -75,10 +75,16 @@ vppctl set ip arp proxy $IPADDR1" - "$IPADDR1
vppctl set interface proxy-arp tap-0 enable
vppctl set ip arp tap-0 $PKTGEN_IPADDR $PKTGEN_MAC
-# Start Honeycomb and VES client
+# Start Honeycomb and initialize the vLB with information about vDNS
cd /opt
./vlb-vnf-onap-distribution-$(cat /opt/config/demo_artifacts_version.txt)-SNAPSHOT/honeycomb &>/var/log/honeycomb.log &disown
+sleep 10
+OAM_VDNS_IP=$(cat /opt/config/oam_vdns_ip.txt)
+VDNS_IPADDR=$(cat /opt/config/vdns_ipaddr.txt)
+curl -X PUT http://localhost:8183/restconf/config/vlb-business-vnf-onap-plugin:vlb-business-vnf-onap-plugin/vdns-instances/vdns-instance/$VDNS_IPADDR -H 'Accept: application/json' -H 'Cache-Control: no-cache' -H 'Content-Type: application/json' -H 'Postman-Token: 8bfe8815-3efb-4c9b-8974-7b8d7b6da4c6' -H "Authorization: Basic YWRtaW46YWRtaW4=" -d '{"vdns-instance": [{ "ip-addr": "'$VDNS_IPADDR'", "oam-ip-addr": "'$OAM_VDNS_IP'", "enabled": true }]}'
+
+# Start VES agent
cd /opt/VES/evel/evel-library/code/VESreporting/
echo 0 > active_dns.txt
./go-client.sh &>/dev/null &disown