X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=vnfs%2FvLBMS%2Fscripts%2Fv_lb_install.sh;h=83c1bbb1544d3c30355161802c28897c83a62fbf;hb=17b851b0c50b52bea6f8d8b88ed389d4d925a0f2;hp=c82368ce56f942448e331027a1f4a90aaec1bb4d;hpb=a0081c9434b6ef4b43ef29af01b1f1f06dcc0b25;p=demo.git diff --git a/vnfs/vLBMS/scripts/v_lb_install.sh b/vnfs/vLBMS/scripts/v_lb_install.sh index c82368ce..83c1bbb1 100644 --- a/vnfs/vLBMS/scripts/v_lb_install.sh +++ b/vnfs/vLBMS/scripts/v_lb_install.sh @@ -1,8 +1,8 @@ #!/bin/bash NEXUS_ARTIFACT_REPO=$(cat /opt/config/nexus_artifact_repo.txt) -#DEMO_ARTIFACTS_VERSION=$(cat /opt/config/demo_artifacts_version.txt) -#if [[ "$DEMO_ARTIFACTS_VERSION" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi +DEMO_ARTIFACTS_VERSION=$(cat /opt/config/demo_artifacts_version.txt) +if [[ "$DEMO_ARTIFACTS_VERSION" =~ "SNAPSHOT" ]]; then REPO=snapshots; else REPO=releases; fi NB_API_VERSION=$(cat /opt/config/nb_api_version.txt) INSTALL_SCRIPT_VERSION=$(cat /opt/config/install_script_version.txt) CLOUD_ENV=$(cat /opt/config/cloud_env.txt) @@ -69,144 +69,28 @@ unzip -p -j /opt/vlbms-scripts-$INSTALL_SCRIPT_VERSION.zip add_dns.sh > /opt/add unzip -p -j /opt/vlbms-scripts-$INSTALL_SCRIPT_VERSION.zip remove_dns.sh > /opt/remove_dns.sh unzip -p -j /opt/vlbms-scripts-$INSTALL_SCRIPT_VERSION.zip properties.conf > /opt/config/properties.conf unzip -p -j /opt/vlbms-scripts-$INSTALL_SCRIPT_VERSION.zip run_health.sh > /opt/run_health.sh -#wget -O ves-$DEMO_ARTIFACTS_VERSION-demo.tar.gz "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.ves5&a=ves&c=demo&e=tar.gz&v=$DEMO_ARTIFACTS_VERSION" -#wget -O ves_vlb_reporting-$DEMO_ARTIFACTS_VERSION-demo.tar.gz "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.ves5&a=ves_vlb_reporting&c=demo&e=tar.gz&v=$DEMO_ARTIFACTS_VERSION" - -#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 beijing - -mkdir ~/.m2 -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 - -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-$NB_API_VERSION-hc/vlb-vnf-onap-distribution-$NB_API_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-$NB_API_VERSION-hc/vlb-vnf-onap-distribution-$NB_API_VERSION/config/honeycomb.json -#rm *.tar.gz +wget -O ves-$DEMO_ARTIFACTS_VERSION-demo.tar.gz "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.ves5&a=ves&c=demo&e=tar.gz&v=$DEMO_ARTIFACTS_VERSION" +wget -O ves_vlb_reporting-$DEMO_ARTIFACTS_VERSION-demo.tar.gz "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.ves5&a=ves_vlb_reporting&c=demo&e=tar.gz&v=$DEMO_ARTIFACTS_VERSION" + +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 + +# Download Honeycomb artifacts +wget -O vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf&a=vlb-vnf-onap-distribution&c=hc&e=tar.gz&v=$DEMO_ARTIFACTS_VERSION" +tar -zmxvf sample-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz +mv sample-distribution-$DEMO_ARTIFACTS_VERSION honeycomb + +sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' honeycomb/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' honeycomb/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 @@ -223,10 +107,10 @@ apt-get install -y vpp vpp-dpdk-dkms vpp-lib vpp-dbg vpp-plugins vpp-dev sleep 1 # Install VES -#cd /opt/VES/evel/evel-library/bldjobs/ -#make clean -#make -#sleep 1 +cd /opt/VES/evel/evel-library/bldjobs/ +make clean +make +sleep 1 # Run instantiation script cd /opt