diff options
Diffstat (limited to 'odlsli/src/main/scripts')
-rw-r--r-- | odlsli/src/main/scripts/installCcsdkFeatures.sh | 108 | ||||
-rw-r--r-- | odlsli/src/main/scripts/installFeatures.sh | 85 | ||||
-rw-r--r-- | odlsli/src/main/scripts/installSdncDb.sh | 6 | ||||
-rw-r--r-- | odlsli/src/main/scripts/installZips.sh | 49 | ||||
-rw-r--r-- | odlsli/src/main/scripts/startODL.sh | 14 |
5 files changed, 145 insertions, 117 deletions
diff --git a/odlsli/src/main/scripts/installCcsdkFeatures.sh b/odlsli/src/main/scripts/installCcsdkFeatures.sh new file mode 100644 index 00000000..9aff1d8c --- /dev/null +++ b/odlsli/src/main/scripts/installCcsdkFeatures.sh @@ -0,0 +1,108 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# openECOMP : SDN-C +# ================================================================================ +# Copyright (C) 2017 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END========================================================= +### + +ODL_HOME=${ODL_HOME:-/opt/opendaylight/current} +ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U} +CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk} +CCSDK_FEATURE_DIR=${CCSDK_FEATURE_DIR:-${CCSDK_HOME}/features} + +CCSDK_CORE_FEATURES=" \ + slicore-utils \ + dblib \ + filters \ + sli \ + sliPluginUtils \ + sliapi" + +CCSDK_ADAPTORS_FEATURES=" \ + aai-service \ + mdsal-resource \ + resource-assignment \ + sql-resource" + +CCSDK_NORTHBOUND_FEATURES=" \ + asdcApi \ + dataChange" + +CCSDK_PLUGINS_FEATURES=" \ + properties-node \ + restapi-call-node" + + +CCSDK_CORE_VERSION=${CCSDK_CORE_VERSION:-0.0.1-SNAPSHOT} +CCSDK_ADAPTORS_VERSION=${CCSDK_ADAPTORS_VERSION:-0.0.1-SNAPSHOT} +CCSDK_NORTHBOUND_VERSION=${CCSDK_NORTHBOUND_VERSION:-0.0.1-SNAPSHOT} +CCSDK_PLUGINS_VERSION=${CCSDK_PLUGINS_VERSION:-0.0.1-SNAPSHOT} + +echo "Enabling core features" +${ODL_HOME}/bin/client feature:install odl-mdsal-all +${ODL_HOME}/bin/client feature:install odl-mdsal-apidocs +${ODL_HOME}/bin/client feature:install odl-restconf-all + + + + +echo "Installing CCSDK sli/core" +for feature in ${CCSDK_CORE_FEATURES} +do + if [ -f ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh ] + then + ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh + else + echo "No installer found for feature sdnc-${feature}" + fi +done + +echo "Installing CCSDK sli/adaptors" +for feature in ${CCSDK_ADAPTORS_FEATURES} +do + if [ -f ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh ] + then + ${CCSDK_FEATURE_DIR}/ccsdk-${feature}/install-feature.sh + else + echo "No installer found for feature ccsdk-${feature}" + fi +done + +echo "Installing CCSDK sli/northbound" +for feature in ${CCSDK_NORTHBOUND_FEATURES} +do + if [ -f ${CCSDK_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ] + then + ${CCSDK_FEATURE_DIR}/sdnc-${feature}/install-feature.sh + else + echo "No installer found for feature sdnc-${feature}" + fi +done + + +echo "Installing CCSDK sli/plugins" +for feature in ${CCSDK_PLUGINS_FEATURES} +do + if [ -f ${CCSDK_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ] + then + ${CCSDK_FEATURE_DIR}/sdnc-${feature}/install-feature.sh + else + echo "No installer found for feature sdnc-${feature}" + fi +done diff --git a/odlsli/src/main/scripts/installFeatures.sh b/odlsli/src/main/scripts/installFeatures.sh index 37532e7d..e6b35bdd 100644 --- a/odlsli/src/main/scripts/installFeatures.sh +++ b/odlsli/src/main/scripts/installFeatures.sh @@ -21,87 +21,6 @@ # ============LICENSE_END========================================================= ### -ODL_HOME=${ODL_HOME:-/opt/opendaylight/current} -ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U} -SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc} -SDNC_FEATURE_DIR=${SDNC_FEATURE_DIR:-${SDNC_HOME}/features} +CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk} -SDNC_CORE_FEATURES=" \ - slicore-utils \ - dblib \ - filters \ - sli \ - sliPluginUtils \ - sliapi" - -SDNC_ADAPTORS_FEATURES=" \ - aai-service \ - mdsal-resource \ - resource-assignment \ - sql-resource" - -SDNC_NORTHBOUND_FEATURES=" \ - asdcApi \ - dataChange" - -SDNC_PLUGINS_FEATURES=" \ - properties-node \ - restapi-call-node" - - -SDNC_CORE_VERSION=${SDNC_CORE_VERSION:-0.0.1-SNAPSHOT} -SDNC_ADAPTORS_VERSION=${SDNC_ADAPTORS_VERSION:-0.0.1-SNAPSHOT} -SDNC_NORTHBOUND_VERSION=${SDNC_NORTHBOUND_VERSION:-0.0.1-SNAPSHOT} -SDNC_PLUGINS_VERSION=${SDNC_PLUGINS_VERSION:-0.0.1-SNAPSHOT} - -echo "Enabling core features" -${ODL_HOME}/bin/client -u karaf feature:install odl-mdsal-all -${ODL_HOME}/bin/client -u karaf feature:install odl-mdsal-apidocs -${ODL_HOME}/bin/client -u karaf feature:install odl-restconf-all - - - - -echo "Installing SDN-C core" -for feature in ${SDNC_CORE_FEATURES} -do - if [ -f ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ] - then - ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh - else - echo "No installer found for feature sdnc-${feature}" - fi -done - -echo "Installing SDN-C adaptors" -for feature in ${SDNC_ADAPTORS_FEATURES} -do - if [ -f ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ] - then - ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh - else - echo "No installer found for feature sdnc-${feature}" - fi -done - -echo "Installing SDN-C northbound" -for feature in ${SDNC_NORTHBOUND_FEATURES} -do - if [ -f ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ] - then - ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh - else - echo "No installer found for feature sdnc-${feature}" - fi -done - -echo "Installing SDN-C plugins" -for feature in ${SDNC_PLUGINS_FEATURES} -do - if [ -f ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh ] - then - ${SDNC_FEATURE_DIR}/sdnc-${feature}/install-feature.sh - else - echo "No installer found for feature sdnc-${feature}" - fi -done +${CCSDK_HOME}/bin/installCcsdkFeatures.sh
\ No newline at end of file diff --git a/odlsli/src/main/scripts/installSdncDb.sh b/odlsli/src/main/scripts/installSdncDb.sh index eaac0221..efd7fe02 100644 --- a/odlsli/src/main/scripts/installSdncDb.sh +++ b/odlsli/src/main/scripts/installSdncDb.sh @@ -21,7 +21,7 @@ # ============LICENSE_END========================================================= ### -SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc} +CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk} MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0} SDNC_DB_USER=${SDNC_DB_USER:-sdnctl} @@ -39,7 +39,7 @@ GRANT ALL PRIVILEGES ON ${SDNC_DB_DATABASE}.* TO '${SDNC_DB_USER}'@'%' WITH GRAN commit; END -if [ -f ${SDNC_HOME}/data/odlsli.dump ] +if [ -f ${CCSDK_HOME}/data/odlsli.dump ] then -mysql -h dbhost -u root -p${MYSQL_PASSWD} sdnctl < ${SDNC_HOME}/data/odlsli.dump +mysql -h dbhost -u root -p${MYSQL_PASSWD} sdnctl < ${CCSDK_HOME}/data/odlsli.dump fi diff --git a/odlsli/src/main/scripts/installZips.sh b/odlsli/src/main/scripts/installZips.sh index 85e33800..f3d296a2 100644 --- a/odlsli/src/main/scripts/installZips.sh +++ b/odlsli/src/main/scripts/installZips.sh @@ -28,12 +28,12 @@ then GLOBAL_SETTINGS_FILE=${GLOBAL_SETTINGS_FILE:-${DEFAULT_MAVEN_SETTINGS}} fi -SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc} +CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk} -targetDir=${1:-${SDNC_HOME}} +targetDir=${1:-${CCSDK_HOME}} featureDir=${targetDir}/features -SDNC_CORE_FEATURES=" \ +CCSDK_CORE_FEATURES=" \ utils \ dblib \ filters \ @@ -41,24 +41,24 @@ SDNC_CORE_FEATURES=" \ sliPluginUtils \ sliapi" -SDNC_ADAPTORS_FEATURES=" \ +CCSDK_ADAPTORS_FEATURES=" \ aai-service \ mdsal-resource \ resource-assignment \ sql-resource" -SDNC_NORTHBOUND_FEATURES=" \ +CCSDK_NORTHBOUND_FEATURES=" \ asdcApi \ dataChange " -SDNC_PLUGINS_FEATURES=" \ +CCSDK_PLUGINS_FEATURES=" \ properties-node \ restapi-call-node" -SDNC_CORE_VERSION=${SDNC_CORE_VERSION:-0.1.2} -SDNC_ADAPTORS_VERSION=${SDNC_ADAPTORS_VERSION:-0.1.1} -SDNC_NORTHBOUND_VERSION=${SDNC_NORTHBOUND_VERSION:-0.1.1} -SDNC_PLUGINS_VERSION=${SDNC_PLUGINS_VERSION:-0.1.1} +CCSDK_CORE_VERSION=${CCSDK_CORE_VERSION:-0.2.1-SNAPSHOT} +CCSDK_ADAPTORS_VERSION=${CCSDK_ADAPTORS_VERSION:-0.2.1-SNAPSHOT} +CCSDK_NORTHBOUND_VERSION=${CCSDK_NORTHBOUND_VERSION:-0.2.1-SNAPSHOT} +CCSDK_PLUGINS_VERSION=${CCSDK_PLUGINS_VERSION:-0.2.1-SNAPSHOT} if [ ! -d ${targetDir} ] then @@ -75,43 +75,44 @@ cwd=$(pwd) mavenOpts=${2:-"-s ${SETTINGS_FILE} -gs ${GLOBAL_SETTINGS_FILE}"} cd /tmp -echo "Installing SDN-C core version ${SDNC_CORE_VERSION}" -for feature in ${SDNC_CORE_FEATURES} +echo "Installing CCSDK sli/core version ${CCSDK_CORE_VERSION}" +for feature in ${CCSDK_CORE_FEATURES} do rm -f /tmp/${feature}-installer*.zip -mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.ccsdk.sli.core:${feature}-installer:${SDNC_CORE_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true +mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.ccsdk.sli.core:${feature}-installer:${CCSDK_CORE_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true unzip -d ${featureDir} /tmp/${feature}-installer*zip done -echo "Installing SDN-C adaptors version ${SDNC_ADAPTORS_VERSION}" -for feature in ${SDNC_ADAPTORS_FEATURES} +echo "Installing CCSDK sli/adaptors version ${CCSDK_ADAPTORS_VERSION}" +for feature in ${CCSDK_ADAPTORS_FEATURES} do rm -f /tmp/${feature}-installer*.zip -mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.ccsdk.sli.adaptors:${feature}-installer:${SDNC_ADAPTORS_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true +mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.ccsdk.sli.adaptors:${feature}-installer:${CCSDK_ADAPTORS_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true unzip -d ${featureDir} /tmp/${feature}-installer*zip done -echo "Installing SDN-C northbound version ${SDNC_NORTHBOUND_VERSION}" -for feature in ${SDNC_NORTHBOUND_FEATURES} +echo "Installing CCSDK sli/northbound version ${CCSDK_NORTHBOUND_VERSION}" +for feature in ${CCSDK_NORTHBOUND_FEATURES} do rm -f /tmp/${feature}-installer*.zip -mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.ccsdk.sli.northbound:${feature}-installer:${SDNC_NORTHBOUND_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true +mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.ccsdk.sli.northbound:${feature}-installer:${CCSDK_NORTHBOUND_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true unzip -d ${featureDir} /tmp/${feature}-installer*zip done -echo "Installing SDN-C plugins version ${SDNC_PLUGINS_VERSION}" -for feature in ${SDNC_PLUGINS_FEATURES} + +echo "Installing CCSDK sli/plugins version ${CCSDK_PLUGINS_VERSION}" +for feature in ${CCSDK_PLUGINS_FEATURES} do rm -f /tmp/${feature}-installer*.zip -mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.ccsdk.sli.plugins:${feature}-installer:${SDNC_PLUGINS_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true +mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.ccsdk.sli.plugins:${feature}-installer:${CCSDK_PLUGINS_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true unzip -d ${featureDir} /tmp/${feature}-installer*zip done -echo "Installing platform-logic" +echo "Installing CCSDK platform-logic" rm -f /tmp/platform-logic-installer*.zip -mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.ccsdk.distribution:platform-logic-installer:${SDNC_OAM_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true +mvn -U ${mavenOpts} org.apache.maven.plugins:maven-dependency-plugin:2.9:copy -Dartifact=org.onap.ccsdk.distribution:platform-logic-installer:${CCSDK_OAM_VERSION}:zip -DoutputDirectory=/tmp -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.ssl.insecure=true unzip -d ${targetDir} /tmp/platform-logic-installer*.zip find ${targetDir} -name '*.sh' -exec chmod +x '{}' \; diff --git a/odlsli/src/main/scripts/startODL.sh b/odlsli/src/main/scripts/startODL.sh index cbc856d9..50e45ce0 100644 --- a/odlsli/src/main/scripts/startODL.sh +++ b/odlsli/src/main/scripts/startODL.sh @@ -26,7 +26,7 @@ ODL_HOME=${ODL_HOME:-/opt/opendaylight/current} ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U} -SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc} +CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk} SLEEP_TIME=${SLEEP_TIME:-120} MYSQL_PASSWD=${MYSQL_PASSWD:-openECOMP1.0} @@ -41,26 +41,26 @@ do done echo -e "\nmysql ready" -if [ ! -f ${SDNC_HOME}/.installed ] +if [ ! -f ${CCSDK_HOME}/.installed ] then echo "Installing SDN-C database" - ${SDNC_HOME}/bin/installSdncDb.sh + ${CCSDK_HOME}/bin/installSdncDb.sh echo "Starting OpenDaylight" ${ODL_HOME}/bin/start echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize" sleep ${SLEEP_TIME} echo "Installing SDN-C platform features" - ${SDNC_HOME}/bin/installFeatures.sh - if [ -x ${SDNC_HOME}/svclogic/bin/install.sh ] + ${CCSDK_HOME}/bin/installFeatures.sh + if [ -x ${CCSDK_HOME}/svclogic/bin/install.sh ] then echo "Installing directed graphs" - ${SDNC_HOME}/svclogic/bin/install.sh + ${CCSDK_HOME}/svclogic/bin/install.sh fi echo "Restarting OpenDaylight" ${ODL_HOME}/bin/stop - echo "Installed at `date`" > ${SDNC_HOME}/.installed + echo "Installed at `date`" > ${CCSDK_HOME}/.installed fi exec ${ODL_HOME}/bin/karaf |