diff options
author | Kanagaraj M <mkr1481@gmail.com> | 2019-09-04 18:29:04 +0530 |
---|---|---|
committer | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2019-09-04 18:29:04 +0530 |
commit | e41218c92dfcb182ecbdf06ccabe23e9deb32b32 (patch) | |
tree | 9e1266dd4671ee76172c3dd55e9902d3e25f7a34 | |
parent | a999e80da5774f79cc67c99770a0b4b0f71d8385 (diff) |
Update VTP installer with env
Issue-ID: CLI-166
Change-Id: Iec7774e6d50896853ec7aca3d9e19ae3aec07013
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
-rw-r--r-- | vnfmarket-be/deployment/install/vtp_install.sh | 51 |
1 files changed, 38 insertions, 13 deletions
diff --git a/vnfmarket-be/deployment/install/vtp_install.sh b/vnfmarket-be/deployment/install/vtp_install.sh index 6ca35707..3fa6bcb0 100644 --- a/vnfmarket-be/deployment/install/vtp_install.sh +++ b/vnfmarket-be/deployment/install/vtp_install.sh @@ -18,26 +18,44 @@ # VTP Installation script supported on Ubuntu 16.04 64 bit # -export OCLIP_DOWNLOAD_URL="https://nexus.onap.org/service/local/artifact/maven/redirect?r=releases&g=org.onap.cli&a=cli-zip&e=zip&v=LATEST" -export VTP_DOWNLOAD_URL="https://nexus.onap.org/service/local/artifact/maven/redirect?r=releases&g=org.onap.vnfsdk.refrepo&a=vnf-sdk-marketplace&e=war&v=LATEST" -export CSAR_VALIDATE_DOWNLOAD_URL="https://nexus.onap.org/service/local/artifact/maven/redirect?r=releases&g=org.onap.vnfsdk.validation&a=csarvalidation-deployment&e=zip&v=LATEST" -export CSAR_VALIDATE_JAR_DOWNLOAD_URL="https://nexus.onap.org/service/local/artifact/maven/redirect?r=releases&g=org.onap.vnfsdk.validation&a=validation-csar&e=jar&v=LATEST" +if [ -z "$OCLIP_DOWNLOAD_URL" ] +then + export OCLIP_DOWNLOAD_URL="https://nexus.onap.org/service/local/artifact/maven/redirect?r=releases&g=org.onap.cli&a=cli-zip&e=zip&v=LATEST" +fi + +if [ -z "$VTP_DOWNLOAD_URL" ] +then + export VTP_DOWNLOAD_URL="https://nexus.onap.org/service/local/artifact/maven/redirect?r=releases&g=org.onap.vnfsdk.refrepo&a=vnf-sdk-marketplace&e=war&v=LATEST" +fi + +if [ -z "$CSAR_VALIDATE_DOWNLOAD_URL" ] +then + export CSAR_VALIDATE_DOWNLOAD_URL="https://nexus.onap.org/service/local/artifact/maven/redirect?r=releases&g=org.onap.vnfsdk.validation&a=csarvalidation-deployment&e=zip&v=LATEST" +fi + +if [ -z "$CSAR_VALIDATE_JAR_DOWNLOAD_URL" ] +then + export CSAR_VALIDATE_JAR_DOWNLOAD_URL="https://nexus.onap.org/service/local/artifact/maven/redirect?r=releases&g=org.onap.vnfsdk.validation&a=validation-csar&e=jar&v=LATEST" +fi + export TOMCAT8_DOWNLOAD_URL="https://archive.apache.org/dist/tomcat/tomcat-8/v8.5.30/bin/apache-tomcat-8.5.30.tar.gz" export SAMPLE_VTP_CSAR="https://github.com/onap/vnfsdk-validation/raw/master/csarvalidation/src/test/resources/VoLTE.csar" #export VVP_GITHUB="https://github.com/onap/vvp-validation-scripts" #export SAMPLE_VTP_HOT="https://git.openstack.org/cgit/openstack/heat-templates/plain/hot/hello_world.yaml" export VTP_STAGE_DIR=/opt/vtp_stage - export OPEN_CLI_HOME=/opt/oclip export PATH=$OPEN_CLI_HOME/bin:$PATH export CATALINA_HOME=/opt/controller export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ -export ONAP_VVP_HOME=$VTP_STAGE_DIR/vvp-validation-scripts/ice_validator -export VTP_TRACK_MARK=++++++++++++++++++++++++ -#init.d or systemd -export SERVICE_MODE=init.d +#export ONAP_VVP_HOME=$VTP_STAGE_DIR/vvp-validation-scripts/ice_validator +export VTP_TRACK_MARK=+++++++++++++++++++++++++++++++++++ +#init.d or systemd +if [ -z "$SERVICE_MODE" ] +then + export SERVICE_MODE=init.d +fi function vtp_download() { echo $VTP_TRACK_MARK Downloading VTP binaries and setup the dependencies ... @@ -127,8 +145,13 @@ function vtp_csar_validation_install() { if [ ! -f $OPEN_CLI_HOME/lib/csar-validate.jar ] then echo "$VTP_TRACK_MARK Installing CSAR Validation Test cases (TOSCA & HEAT)" - mkdir -p $OPEN_CLI_HOME/CSAR-VALIDATE + mkdir -p $VTP_STAGE_DIR/CSAR-VALIDATE + unzip $VTP_STAGE_DIR/CSAR-VALIDATE.zip -d $VTP_STAGE_DIR/CSAR-VALIDATE cp $VTP_STAGE_DIR/csar-validate.jar $OPEN_CLI_HOME/lib + cp $VTP_STAGE_DIR/CSAR-VALIDATE/commons-lang3*.jar $OPEN_CLI_HOME/lib + cp $VTP_STAGE_DIR/CSAR-VALIDATE/validation-csar*.jar $OPEN_CLI_HOME/lib + cp $VTP_STAGE_DIR/CSAR-VALIDATE/bcpkix-jdk15on-1.61.jar $OPEN_CLI_HOME/lib + cp $VTP_STAGE_DIR/CSAR-VALIDATE/bcprov-jdk15on-1.61.jar $OPEN_CLI_HOME/lib else echo "CSAR Validation Test cases (TOSCA & HEAT) already installed" fi @@ -169,7 +192,7 @@ function vtp_stop() { echo $VTP_TRACK_MARK Stoping VTP Backend... if [[ $SERVICE_MODE == 'systemd' ]] then - systemctl stop oclip + systemctl stop oclip | cat systemctl status oclip | cat else service oclip-grpc stop @@ -191,9 +214,11 @@ function vtp_purge() { echo $VTP_TRACK_MARK Purging VTP... rm -rf $OPEN_CLI_HOME rm -rf $CATALINA_HOME + rm -rf $VTP_STAGE_DIR/CSAR-VALIDATE rm -f /etc/systemd/system/oclip.service - rm -f /etc/init.d/oclip + systemctl daemon-reload | cat + rm -f /etc/init.d/oclip-grpc #vtp_vvp_uninstall } @@ -236,7 +261,7 @@ function vtp_test() { echo $VTP_TRACK_MARK Check the VTP Controller curl -X GET http://localhost:8080/onapapi/vnfsdk-marketplace/v1/vtp/scenarios - curl -X GET http://localhost:8080/onapapi/vnfsdk-marketplace/v1/vtp/scenarios/onap-vtp/testcases + curl -X GET http://localhost:8080/onapapi/vnfsdk-marketplace/v1/vtp/scenarios/onap-dublin/testsuites echo ..... Happy VTPing ...... } |