X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=vnfs%2FvLB%2Fscripts%2Fv_lb_install.sh;h=72bc4163a2adfdee83b07c9659240ad974e09e24;hb=0e9bf965dd84e82625fd7e4c7d523200e2784ae9;hp=c400589f60109d5bf756a542bc240d8eca95203a;hpb=382ee4313cc53c7f16699438496098ed0dd68fb5;p=demo.git diff --git a/vnfs/vLB/scripts/v_lb_install.sh b/vnfs/vLB/scripts/v_lb_install.sh index c400589f..72bc4163 100644 --- a/vnfs/vLB/scripts/v_lb_install.sh +++ b/vnfs/vLB/scripts/v_lb_install.sh @@ -1,8 +1,8 @@ #!/bin/bash -REPO_URL_BLOB=$(cat /opt/config/repo_url_blob.txt) -REPO_URL_ARTIFACTS=$(cat /opt/config/repo_url_artifacts.txt) +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 INSTALL_SCRIPT_VERSION=$(cat /opt/config/install_script_version.txt) CLOUD_ENV=$(cat /opt/config/cloud_env.txt) @@ -60,25 +60,31 @@ 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 sleep 1 +# Install fd.io certificate +HOST=nexus.fd.io +PORT=443 +TRUST_CERT_FILE="/etc/ssl/certs/ca-certificates.crt" +bash -c "echo -n | openssl s_client -showcerts -connect $HOST:$PORT 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' >> $TRUST_CERT_FILE" + # Download vLB demo code for load balancer mkdir /opt/FDserver cd /opt -wget $REPO_URL_BLOB/org.onap.demo/vnfs/vlb/$INSTALL_SCRIPT_VERSION/v_lb_init.sh -wget $REPO_URL_BLOB/org.onap.demo/vnfs/vlb/$INSTALL_SCRIPT_VERSION/vlb.sh -wget $REPO_URL_BLOB/org.onap.demo/vnfs/vlb/$INSTALL_SCRIPT_VERSION/dnsmembership.sh -wget $REPO_URL_BLOB/org.onap.demo/vnfs/vlb/$INSTALL_SCRIPT_VERSION/add_dns.sh -wget $REPO_URL_BLOB/org.onap.demo/vnfs/vlb/$INSTALL_SCRIPT_VERSION/remove_dns.sh -wget $REPO_URL_ARTIFACTS/org/onap/demo/vnf/vlb/dns-manager/$DEMO_ARTIFACTS_VERSION/dns-manager-$DEMO_ARTIFACTS_VERSION.jar -wget $REPO_URL_ARTIFACTS/org/onap/demo/vnf/ves/ves/$DEMO_ARTIFACTS_VERSION/ves-$DEMO_ARTIFACTS_VERSION-demo.tar.gz -wget $REPO_URL_ARTIFACTS/org/onap/demo/vnf/ves/ves_vlb_reporting/$DEMO_ARTIFACTS_VERSION/ves_vlb_reporting-$DEMO_ARTIFACTS_VERSION-demo.tar.gz +unzip -p -j /opt/vlb-scripts-$INSTALL_SCRIPT_VERSION.zip v_lb_init.sh > /opt/v_lb_init.sh +unzip -p -j /opt/vlb-scripts-$INSTALL_SCRIPT_VERSION.zip vlb.sh > /opt/vlb.sh +unzip -p -j /opt/vlb-scripts-$INSTALL_SCRIPT_VERSION.zip dnsmembership.sh > /opt/dnsmembership.sh +unzip -p -j /opt/vlb-scripts-$INSTALL_SCRIPT_VERSION.zip add_dns.sh > /opt/add_dns.sh +unzip -p -j /opt/vlb-scripts-$INSTALL_SCRIPT_VERSION.zip remove_dns.sh > /opt/remove_dns.sh +wget -O dns-manager-$DEMO_ARTIFACTS_VERSION.jar "${NEXUS_ARTIFACT_REPO}/service/local/artifact/maven/redirect?r=${REPO}&g=org.onap.demo.vnf.vlb&a=dns-manager&e=jar&v=$DEMO_ARTIFACTS_VERSION" +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 -zxvf ves-$DEMO_ARTIFACTS_VERSION-demo.tar.gz +tar -zmxvf ves-$DEMO_ARTIFACTS_VERSION-demo.tar.gz mv ves-$DEMO_ARTIFACTS_VERSION VES -tar -zxvf ves_vlb_reporting-$DEMO_ARTIFACTS_VERSION-demo.tar.gz +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/code/evel_training/VESreporting +mv VESreporting_vLB /opt/VES/evel/evel-library/code/VESreporting mv dns-manager-$DEMO_ARTIFACTS_VERSION.jar /opt/FDserver/dns-manager-$DEMO_ARTIFACTS_VERSION.jar mv dnsmembership.sh /opt/FDserver/dnsmembership.sh mv add_dns.sh /opt/FDserver/add_dns.sh @@ -87,7 +93,7 @@ rm *.tar.gz chmod +x v_lb_init.sh chmod +x vlb.sh -chmod +x /opt/VES/code/evel_training/VESreporting/go-client.sh +chmod +x /opt/VES/evel/evel-library/code/VESreporting/go-client.sh chmod +x /opt/FDserver/dnsmembership.sh chmod +x /opt/FDserver/add_dns.sh chmod +x /opt/FDserver/remove_dns.sh @@ -102,7 +108,7 @@ apt-get install -y vpp vpp-dpdk-dkms vpp-lib vpp-dbg vpp-plugins vpp-dev sleep 1 # Install VES -cd /opt/VES/bldjobs/ +cd /opt/VES/evel/evel-library/bldjobs/ make clean make sleep 1