From dda5961d1b32b72123cc6a2e3715c644e79b6fce Mon Sep 17 00:00:00 2001 From: Marco Platania Date: Wed, 9 May 2018 14:57:34 -0400 Subject: [PATCH] Fix POM files for vLB scaling - Allow VNF-C to clone Honeycomb plugins from Gerrit Change-Id: I09d0498bf4256bbcc7a68234647deb3dbad606df Issue-ID: INT-443 Signed-off-by: Marco Platania --- pom.xml | 4 +- vnfs/vLBMS/apis/health-vnf-onap-plugin/pom.xml | 4 +- vnfs/vLBMS/apis/pom.xml | 19 +++ .../apis/vlb-business-vnf-onap-plugin/pom.xml | 4 +- vnfs/vLBMS/scripts/v_dns_init.sh | 7 +- vnfs/vLBMS/scripts/v_dns_install.sh | 133 +++++++++++++++++- vnfs/vLBMS/scripts/v_lb_init.sh | 3 +- vnfs/vLBMS/scripts/v_lb_install.sh | 148 +++++++++++++++++++-- vnfs/vLBMS/scripts/v_packetgen_init.sh | 6 +- vnfs/vLBMS/scripts/v_packetgen_install.sh | 131 +++++++++++++++++- 10 files changed, 424 insertions(+), 35 deletions(-) create mode 100644 vnfs/vLBMS/apis/pom.xml diff --git a/pom.xml b/pom.xml index be4f0e64..b5c633e2 100755 --- a/pom.xml +++ b/pom.xml @@ -52,9 +52,9 @@ vnfs/VESreporting_vLB5.0 vnfs/VESreporting_vFW5.0 vnfs/vCPE/kea-sdnc-notify-mod - vnfs/vLBMS/apis/vlb-business-vnf-onap-plugin + diff --git a/vnfs/vLBMS/apis/health-vnf-onap-plugin/pom.xml b/vnfs/vLBMS/apis/health-vnf-onap-plugin/pom.xml index 4b45d684..a8324664 100755 --- a/vnfs/vLBMS/apis/health-vnf-onap-plugin/pom.xml +++ b/vnfs/vLBMS/apis/health-vnf-onap-plugin/pom.xml @@ -16,9 +16,9 @@ demo-aggregator - 1.2.0-SNAPSHOT + 1.2.0 org.onap.demo.vnf - ../../../../pom.xml + ../pom.xml org.onap.demo.vnf.health diff --git a/vnfs/vLBMS/apis/pom.xml b/vnfs/vLBMS/apis/pom.xml new file mode 100644 index 00000000..6a43943e --- /dev/null +++ b/vnfs/vLBMS/apis/pom.xml @@ -0,0 +1,19 @@ + + + org.onap.demo.vnf + demo-aggregator + 1.2.0 + demo + pom + 4.0.0 + + 3.1.1 + + + + vlb-business-vnf-onap-plugin + health-vnf-onap-plugin + vlb-vnf-onap-distribution + + \ No newline at end of file diff --git a/vnfs/vLBMS/apis/vlb-business-vnf-onap-plugin/pom.xml b/vnfs/vLBMS/apis/vlb-business-vnf-onap-plugin/pom.xml index a522cdb4..53017c52 100644 --- a/vnfs/vLBMS/apis/vlb-business-vnf-onap-plugin/pom.xml +++ b/vnfs/vLBMS/apis/vlb-business-vnf-onap-plugin/pom.xml @@ -16,9 +16,9 @@ demo-aggregator - 1.2.0-SNAPSHOT + 1.2.0 org.onap.demo.vnf - ../../../../pom.xml + ../pom.xml org.onap.demo.vnf.vlb diff --git a/vnfs/vLBMS/scripts/v_dns_init.sh b/vnfs/vLBMS/scripts/v_dns_init.sh index 4ae98746..710a5651 100644 --- a/vnfs/vLBMS/scripts/v_dns_init.sh +++ b/vnfs/vLBMS/scripts/v_dns_init.sh @@ -1,5 +1,10 @@ #!/bin/bash +# Start Honeycomb +VERSION=$(cat /opt/config/demo_artifacts_version.txt) cd /opt -./vlb-vnf-onap-distribution-$(cat /opt/config/demo_artifacts_version.txt)/honeycomb &>/var/log/honeycomb.log &disown +./honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$VERSION-hc/vlb-vnf-onap-distribution-$VERSION/honeycomb &>/var/log/honeycomb.log &disown +sleep 10 + +#Set GRE tunnel ./set_gre_tunnel.sh diff --git a/vnfs/vLBMS/scripts/v_dns_install.sh b/vnfs/vLBMS/scripts/v_dns_install.sh index a7874cf9..7b444cc7 100644 --- a/vnfs/vLBMS/scripts/v_dns_install.sh +++ b/vnfs/vLBMS/scripts/v_dns_install.sh @@ -48,7 +48,7 @@ fi echo "deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list echo "deb-src http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list apt-get update -apt-get install --allow-unauthenticated -y wget openjdk-8-jdk bind9 bind9utils bind9-doc apt-transport-https ca-certificates +apt-get install --allow-unauthenticated -y wget openjdk-8-jdk bind9 bind9utils bind9-doc apt-transport-https ca-certificates git maven sleep 1 # Download vDNS demo code for DNS Server @@ -62,12 +62,133 @@ wget $REPO_URL_BLOB/org.onap.demo/vnfs/vlbms/$INSTALL_SCRIPT_VERSION/run_health_ sed -i 's/primary=.*/primary=false/g' /opt/config/properties.conf sed -i 's/vnfc=.*/vnfc=vDNS/g' /opt/config/properties.conf -wget $REPO_URL_ARTIFACTS/org/onap/demo/vnf/vlb/vlb-vnf-onap-distribution/$DEMO_ARTIFACTS_VERSION/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz -tar -zmxvf vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz -rm vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz -sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json -sed -i 's/"netconf-tcp-binding-address": "127.0.0.1",/"netconf-tcp-binding-address": "0.0.0.0",/g' vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json +# Clone Honeycomb interface for the VNF component +mkdir honeycomb-api +git init honeycomb-api +cd honeycomb-api +git remote add origin https://gerrit.onap.org/r/p/demo.git +git config core.sparsecheckout true +echo "vnfs/vLBMS/apis" >> .git/info/sparse-checkout +git pull --depth=1 origin master + +cat > ~/.m2/settings.xml << EOF + + + + + + + fd.io-release + + + fd.io-mirror + fd.io-mirror + https://nexus.fd.io/content/groups/public/ + + true + never + + + false + + + + + + fd.io-mirror + fd.io-mirror + https://nexus.fd.io/content/repositories/public/ + + true + never + + + false + + + + + + + fd.io-snapshots + + + fd.io-snapshot + fd.io-snapshot + https://nexus.fd.io/content/repositories/fd.io.snapshot/ + + false + + + true + + + + + + fd.io-snapshot + fd.io-snapshot + https://nexus.fd.io/content/repositories/fd.io.snapshot/ + + false + + + true + + + + + + opendaylight-snapshots + + + opendaylight-snapshot + opendaylight-snapshot + https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ + + false + + + true + + + + + + opendaylight-shapshot + opendaylight-snapshot + https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ + + false + + + true + + + + + + + + fd.io-release + fd.io-snapshots + opendaylight-snapshots + + +EOF + +cd /opt/honeycomb-api/vnfs/vLBMS/apis +mvn clean install + +#wget $REPO_URL_ARTIFACTS/org/onap/demo/vnf/vlb/vlb-vnf-onap-distribution/$DEMO_ARTIFACTS_VERSION/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz +#tar -zmxvf vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz +sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' /opt/honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json +sed -i 's/"netconf-tcp-binding-address": "127.0.0.1",/"netconf-tcp-binding-address": "0.0.0.0",/g' /opt/honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json +#rm *.tar.gz +cd /opt chmod +x v_dns_init.sh chmod +x vdns.sh chmod +x set_gre_tunnel.sh diff --git a/vnfs/vLBMS/scripts/v_lb_init.sh b/vnfs/vLBMS/scripts/v_lb_init.sh index 4300c553..fcbb1d61 100644 --- a/vnfs/vLBMS/scripts/v_lb_init.sh +++ b/vnfs/vLBMS/scripts/v_lb_init.sh @@ -76,8 +76,9 @@ vppctl set interface proxy-arp tap-0 enable vppctl set ip arp tap-0 $PKTGEN_IPADDR $PKTGEN_MAC # Start Honeycomb and initialize the vLB with information about vDNS +VERSION=$(cat /opt/config/demo_artifacts_version.txt) cd /opt -./vlb-vnf-onap-distribution-$(cat /opt/config/demo_artifacts_version.txt)/honeycomb &>/var/log/honeycomb.log &disown +./honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$VERSION-hc/vlb-vnf-onap-distribution-$VERSION/honeycomb &>/var/log/honeycomb.log &disown sleep 10 OAM_VDNS_IP=$(cat /opt/config/oam_vdns_ip.txt) diff --git a/vnfs/vLBMS/scripts/v_lb_install.sh b/vnfs/vLBMS/scripts/v_lb_install.sh index e8392e0a..ecccbfd7 100644 --- a/vnfs/vLBMS/scripts/v_lb_install.sh +++ b/vnfs/vLBMS/scripts/v_lb_install.sh @@ -57,7 +57,7 @@ fi echo "deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list echo "deb-src http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list apt-get update -apt-get install --allow-unauthenticated -y make gcc wget openjdk-8-jdk bridge-utils libcurl4-openssl-dev apt-transport-https ca-certificates +apt-get install --allow-unauthenticated -y make gcc wget openjdk-8-jdk bridge-utils libcurl4-openssl-dev apt-transport-https ca-certificates git maven sleep 1 # Download vLB demo code for load balancer @@ -71,22 +71,142 @@ wget $REPO_URL_BLOB/org.onap.demo/vnfs/vlbms/$INSTALL_SCRIPT_VERSION/run_health. #wget $REPO_URL_ARTIFACTS/org/onap/demo/vnf/ves5/ves/$DEMO_ARTIFACTS_VERSION/ves-$DEMO_ARTIFACTS_VERSION-demo.tar.gz #wget $REPO_URL_ARTIFACTS/org/onap/demo/vnf/ves5/ves_vlb_reporting/$DEMO_ARTIFACTS_VERSION/ves_vlb_reporting-$DEMO_ARTIFACTS_VERSION-demo.tar.gz -tar -zmxvf ves-$DEMO_ARTIFACTS_VERSION-demo.tar.gz -mv ves-$DEMO_ARTIFACTS_VERSION VES -tar -zmxvf ves_vlb_reporting-$DEMO_ARTIFACTS_VERSION-demo.tar.gz -mv ves_vlb_reporting-$DEMO_ARTIFACTS_VERSION VESreporting_vLB -mv VESreporting_vLB /opt/VES/evel/evel-library/code/VESreporting - -wget $REPO_URL_ARTIFACTS/org/onap/demo/vnf/vlb/vlb-vnf-onap-distribution/$DEMO_ARTIFACTS_VERSION/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz -tar -zmxvf vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz -sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json -sed -i 's/"netconf-tcp-binding-address": "127.0.0.1",/"netconf-tcp-binding-address": "0.0.0.0",/g' vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json - -rm *.tar.gz +#tar -zmxvf ves-$DEMO_ARTIFACTS_VERSION-demo.tar.gz +#mv ves-$DEMO_ARTIFACTS_VERSION VES +#tar -zmxvf ves_vlb_reporting-$DEMO_ARTIFACTS_VERSION-demo.tar.gz +#mv ves_vlb_reporting-$DEMO_ARTIFACTS_VERSION VESreporting_vLB +#mv VESreporting_vLB /opt/VES/evel/evel-library/code/VESreporting + +# Clone Honeycomb interface for the VNF component +mkdir honeycomb-api +git init honeycomb-api +cd honeycomb-api +git remote add origin https://gerrit.onap.org/r/p/demo.git +git config core.sparsecheckout true +echo "vnfs/vLBMS/apis" >> .git/info/sparse-checkout +git pull --depth=1 origin master + +cat > ~/.m2/settings.xml << EOF + + + + + + + fd.io-release + + + fd.io-mirror + fd.io-mirror + https://nexus.fd.io/content/groups/public/ + + true + never + + + false + + + + + + fd.io-mirror + fd.io-mirror + https://nexus.fd.io/content/repositories/public/ + + true + never + + + false + + + + + + + fd.io-snapshots + + + fd.io-snapshot + fd.io-snapshot + https://nexus.fd.io/content/repositories/fd.io.snapshot/ + + false + + + true + + + + + + fd.io-snapshot + fd.io-snapshot + https://nexus.fd.io/content/repositories/fd.io.snapshot/ + + false + + + true + + + + + + opendaylight-snapshots + + + opendaylight-snapshot + opendaylight-snapshot + https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ + + false + + + true + + + + + + opendaylight-shapshot + opendaylight-snapshot + https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ + + false + + + true + + + + + + + + fd.io-release + fd.io-snapshots + opendaylight-snapshots + + +EOF + +cd /opt/honeycomb-api/vnfs/vLBMS/apis +mvn clean install + +#wget $REPO_URL_ARTIFACTS/org/onap/demo/vnf/vlb/vlb-vnf-onap-distribution/$DEMO_ARTIFACTS_VERSION/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz +#tar -zmxvf vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz +sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' /opt/honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json +sed -i 's/"netconf-tcp-binding-address": "127.0.0.1",/"netconf-tcp-binding-address": "0.0.0.0",/g' /opt/honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json +#rm *.tar.gz +cd /opt chmod +x v_lb_init.sh chmod +x vlb.sh -chmod +x /opt/VES/evel/evel-library/code/VESreporting/go-client.sh +#chmod +x /opt/VES/evel/evel-library/code/VESreporting/go-client.sh chmod +x add_dns.sh chmod +x remove_dns.sh chmod +x run_health.sh diff --git a/vnfs/vLBMS/scripts/v_packetgen_init.sh b/vnfs/vLBMS/scripts/v_packetgen_init.sh index fe956efc..2c823de3 100644 --- a/vnfs/vLBMS/scripts/v_packetgen_init.sh +++ b/vnfs/vLBMS/scripts/v_packetgen_init.sh @@ -94,9 +94,11 @@ vppctl exec /opt/dns_streams/stream_dns10 vppctl set int ip address pg0 $(cat /opt/config/pg_int.txt)"/"$IPADDR1_CIDR sleep 1 -# Start Honeycomb and enable traffic flows +# Start Honeycomb +VERSION=$(cat /opt/config/demo_artifacts_version.txt) cd /opt -./vlb-vnf-onap-distribution-$(cat /opt/config/demo_artifacts_version.txt)/honeycomb &>/var/log/honeycomb.log &disown +./honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$VERSION-hc/vlb-vnf-onap-distribution-$VERSION/honeycomb &>/var/log/honeycomb.log &disown +sleep 10 chmod +x run_streams_dns.sh ./run_streams_dns.sh &>/dev/null &disown diff --git a/vnfs/vLBMS/scripts/v_packetgen_install.sh b/vnfs/vLBMS/scripts/v_packetgen_install.sh index e2ed6c5e..e99fa54d 100644 --- a/vnfs/vLBMS/scripts/v_packetgen_install.sh +++ b/vnfs/vLBMS/scripts/v_packetgen_install.sh @@ -48,7 +48,7 @@ fi echo "deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list echo "deb-src http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list apt-get update -apt-get install --allow-unauthenticated -y make wget openjdk-8-jdk gcc libcurl4-openssl-dev python-pip bridge-utils apt-transport-https ca-certificates +apt-get install --allow-unauthenticated -y make wget openjdk-8-jdk gcc libcurl4-openssl-dev python-pip bridge-utils apt-transport-https ca-certificates git maven pip install jsonschema # Download vFirewall demo code for packet generator @@ -66,11 +66,132 @@ sed -i 's/vnfc=.*/vnfc=vPacketGen/g' /opt/config/properties.conf tar -zmxvf vlb_dns_streams-$DEMO_ARTIFACTS_VERSION-demo.tar.gz mv vlb_dns_streams-$DEMO_ARTIFACTS_VERSION dns_streams -wget $REPO_URL_ARTIFACTS/org/onap/demo/vnf/vlb/vlb-vnf-onap-distribution/$DEMO_ARTIFACTS_VERSION/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz -tar -zmxvf vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz -sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json -sed -i 's/"netconf-tcp-binding-address": "127.0.0.1",/"netconf-tcp-binding-address": "0.0.0.0",/g' vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json +# Clone Honeycomb interface for the VNF component +mkdir honeycomb-api +git init honeycomb-api +cd honeycomb-api +git remote add origin https://gerrit.onap.org/r/p/demo.git +git config core.sparsecheckout true +echo "vnfs/vLBMS/apis" >> .git/info/sparse-checkout +git pull --depth=1 origin master + +cat > ~/.m2/settings.xml << EOF + + + + + + + fd.io-release + + + fd.io-mirror + fd.io-mirror + https://nexus.fd.io/content/groups/public/ + + true + never + + + false + + + + + + fd.io-mirror + fd.io-mirror + https://nexus.fd.io/content/repositories/public/ + + true + never + + + false + + + + + + + fd.io-snapshots + + + fd.io-snapshot + fd.io-snapshot + https://nexus.fd.io/content/repositories/fd.io.snapshot/ + + false + + + true + + + + + + fd.io-snapshot + fd.io-snapshot + https://nexus.fd.io/content/repositories/fd.io.snapshot/ + + false + + + true + + + + + + opendaylight-snapshots + + + opendaylight-snapshot + opendaylight-snapshot + https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ + + false + + + true + + + + + + opendaylight-shapshot + opendaylight-snapshot + https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ + + false + + + true + + + + + + + + fd.io-release + fd.io-snapshots + opendaylight-snapshots + + +EOF + +cd /opt/honeycomb-api/vnfs/vLBMS/apis +mvn clean install + +#wget $REPO_URL_ARTIFACTS/org/onap/demo/vnf/vlb/vlb-vnf-onap-distribution/$DEMO_ARTIFACTS_VERSION/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz +#tar -zmxvf vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz +sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' /opt/honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json +sed -i 's/"netconf-tcp-binding-address": "127.0.0.1",/"netconf-tcp-binding-address": "0.0.0.0",/g' /opt/honeycomb-api/vnfs/vLBMS/apis/vlb-vnf-onap-distribution/target/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc/vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json +cd /opt rm *.tar.gz chmod +x v_packetgen_init.sh chmod +x vpacketgen.sh -- 2.16.6