X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=installation%2Fappc%2Fsrc%2Fmain%2Fscripts%2FinstallFeatures.sh;h=33b96d9419fdd99a14d602d2864a6bea9cc548ae;hb=refs%2Fheads%2Fmaster;hp=152b751caaffca654b8ec99fd4f53598d4420560;hpb=0f0fe45c47125b2f8df9cb3ee24c20d63deb8aba;p=appc%2Fdeployment.git diff --git a/installation/appc/src/main/scripts/installFeatures.sh b/installation/appc/src/main/scripts/installFeatures.sh index 152b751..33b96d9 100644 --- a/installation/appc/src/main/scripts/installFeatures.sh +++ b/installation/appc/src/main/scripts/installFeatures.sh @@ -4,7 +4,7 @@ # ============LICENSE_START======================================================= # APPC # ================================================================================ -# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. +# Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,7 +28,8 @@ APPC_FEATURE_DIR=${APPC_FEATURE_DIR:-${APPC_HOME}/features} function featureInstall { COUNT=0 while [ $COUNT -lt 10 ]; do - ${ODL_HOME}/bin/client feature:install $1 2> /tmp/installErr +sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:install $1" 2> /tmp/installErr +# ${ODL_HOME}/bin/client feature:install $1 2> /tmp/installErr cat /tmp/installErr if grep -q 'Failed to get the session' /tmp/installErr; then sleep 10 @@ -38,59 +39,57 @@ while [ $COUNT -lt 10 ]; do let COUNT=COUNT+1 done } - - APPC_FEATURES=" \ - appc-metric \ - appc-dmaap-adapter \ - appc-chef-adapter \ - appc-netconf-adapter \ - appc-rest-adapter \ - appc-lifecycle-management \ - appc-dispatcher \ - appc-provider \ - appc-dg-util \ - appc-dg-shared \ - appc-sdc-listener \ - appc-oam \ - appc-iaas-adapter \ - appc-ansible-adapter \ - appc-sequence-generator \ - appc-artifact-handler \ - appc-aai-client" +function waitForKaraf { +COUNT=0 +while [ $COUNT -lt 20 ]; do +sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:list $1" 2> /tmp/installErr +# ${ODL_HOME}/bin/client feature:list $1 2> /tmp/installErr + cat /tmp/installErr + if grep -q 'Failed to get the session' /tmp/installErr; then + sleep 10 + else + let COUNT=20 + fi + let COUNT=COUNT+1 +done +} APPC_FEATURES_1=" \ - appc-metric \ - appc-dmaap-adapter \ - appc-chef-adapter \ - appc-netconf-adapter \ - appc-rest-adapter \ - appc-lifecycle-management \ - appc-license-manager" + onap-appc-core \ + onap-appc-metric \ + onap-appc-chef-adapter \ + onap-appc-netconf-adapter \ + onap-appc-service-communicator \ + onap-appc-rest-adapter \ + onap-appc-lifecycle-management \ + onap-appc-license-manager" APPC_FEATURES_2=" \ - appc-provider \ - appc-dg-util \ - appc-dg-shared \ - appc-sdc-listener \ - appc-oam \ - appc-iaas-adapter \ - appc-ansible-adapter \ - appc-sequence-generator \ - appc-config-generator \ - appc-config-data-services \ - appc-config-adaptor \ - appc-config-audit \ - appc-config-encryption-tool \ - appc-config-flow-controller \ - appc-config-params \ - appc-artifact-handler \ - appc-aai-client \ - appc-event-listener" + onap-appc-dg-util \ + onap-appc-dg-shared \ + onap-appc-sdc-listener \ + onap-appc-oam \ + onap-appc-iaas-adapter \ + onap-appc-ansible-adapter \ + onap-appc-sequence-generator \ + onap-appc-config-generator \ + onap-appc-config-data-services \ + onap-appc-config-adaptor \ + onap-appc-config-audit \ + onap-appc-config-encryption-tool \ + onap-appc-config-flow-controller \ + onap-appc-config-params" + + APPC_FEATURES_3=" \ + onap-appc-artifact-handler \ + onap-appc-aai-client \ + onap-appc-network-inventory-client \ + onap-appc-design-services \ + onap-appc-interfaces-service" APPC_FEATURES_UNZIP=" \ + appc-core \ appc-metric \ - appc-dmaap-adapter \ - appc-event-listener \ appc-chef-adapter \ appc-netconf-adapter \ appc-rest-adapter \ @@ -112,18 +111,19 @@ APPC_FEATURES_1=" \ appc-config-flow-controller \ appc-config-params \ appc-artifact-handler \ - appc-aai-client" + appc-aai-client \ + appc-network-inventory-client \ + appc-design-services \ + appc-interfaces-service \ + appc-service-communicator" -echo "Enabling core APP-C features" -featureInstall odl-netconf-connector-all -featureInstall odl-restconf-noauth -featureInstall odl-netconf-topology - -sleep 7s +#echo "Enabling core APP-C features" +#featureInstall odl-netconf-connector odl-restconf-noauth odl-netconf-clustered-topology odl-mdsal-clustering +#waitForKaraf echo "Installing APP-C Features" echo "" @@ -137,22 +137,24 @@ do fi done -#${ODL_HOME}/bin/client feature:install appc-metric appc-dmaap-adapter appc-event-listener appc-chef-adapter appc-netconf-adapter appc-rest-adapter appc-lifecycle-management appc-dispatcher appc-provider appc-dg-util appc-dg-shared appc-sdc-listener appc-oam appc-iaas-adapter appc-ansible-adapter appc-sequence-generator appc-config-generator appc-config-data-services appc-config-adaptor appc-config-audit appc-config-encryption-tool appc-config-flow-controller appc-config-params appc-artifact-handler appc-aai-client - for feature in ${APPC_FEATURES_1} do - echo "Installing ${feature}" + group1Features="${group1Features} ${feature}" +done + + echo "Installing features: ${group1Features}" start=$(date +%s) - ${ODL_HOME}/bin/client "feature:install -r ${feature}" +sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:install -r ${group1Features}" +# ${ODL_HOME}/bin/client "feature:install -r ${group1Features}" end=$(date +%s) - echo "Install of ${feature} took $(expr $end - $start) seconds" + echo "Install of features took $(expr $end - $start) seconds" sleep 7s echo "Sleep Finished" -done echo "Installing dispatcher features" start=$(date +%s) - ${ODL_HOME}/bin/client "feature:install -r appc-request-handler appc-command-executor appc-lifecycle-management appc-workflow-management lock-manager" +sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:install -r onap-appc-request-handler onap-appc-command-executor onap-appc-lifecycle-management onap-appc-workflow-management lock-manager onap-appc-provider" +# ${ODL_HOME}/bin/client "feature:install -r onap-appc-request-handler onap-appc-command-executor onap-appc-lifecycle-management onap-appc-workflow-management lock-manager onap-appc-provider" end=$(date +%s) echo "Install of dispatcher features took $(expr $end - $start) seconds" sleep 7s @@ -160,11 +162,33 @@ done for feature in ${APPC_FEATURES_2} do - echo "Installing ${feature}" + group2Features="${group2Features} ${feature}" +done + + echo "Installing features: ${group2Features}" start=$(date +%s) - ${ODL_HOME}/bin/client "feature:install -r ${feature}" +sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:install -r ${group2Features}" +# ${ODL_HOME}/bin/client "feature:install -r ${group2Features}" end=$(date +%s) - echo "Install of ${feature} took $(expr $end - $start) seconds" + echo "Install of features took $(expr $end - $start) seconds" sleep 7s echo "Sleep Finished" + +for feature in ${APPC_FEATURES_3} +do + group3Features="${group3Features} ${feature}" done + + echo "Installing features: ${group3Features}" + start=$(date +%s) +sshpass -pkaraf ssh -o StrictHostKeyChecking=no karaf@localhost -p 8101 "feature:install -r ${group3Features}" +# ${ODL_HOME}/bin/client "feature:install -r ${group3Features}" + end=$(date +%s) + echo "Install of features took $(expr $end - $start) seconds" + sleep 7s + echo "Sleep Finished" + +#Copy json template file for use by the generic restart DG aai fix +mkdir -p /opt/onap/appc/restapi/templates +cp /opt/onap/appc/data/aai-named-query.json /opt/onap/appc/restapi/templates/aai-named-query.json +