diff options
Diffstat (limited to 'kubernetes/appc')
-rw-r--r-- | kubernetes/appc/Chart.yaml | 2 | ||||
-rw-r--r-- | kubernetes/appc/charts/appc-ansible-server/Chart.yaml | 2 | ||||
-rw-r--r-- | kubernetes/appc/charts/appc-ansible-server/requirements.yaml | 2 | ||||
-rw-r--r-- | kubernetes/appc/charts/appc-ansible-server/values.yaml | 2 | ||||
-rw-r--r-- | kubernetes/appc/charts/appc-cdt/Chart.yaml | 2 | ||||
-rw-r--r-- | kubernetes/appc/charts/appc-cdt/requirements.yaml | 2 | ||||
-rw-r--r-- | kubernetes/appc/requirements.yaml | 6 | ||||
-rwxr-xr-x | kubernetes/appc/resources/config/appc/opt/onap/appc/bin/installFeatures.sh | 184 | ||||
-rwxr-xr-x | kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh | 77 | ||||
-rw-r--r-- | kubernetes/appc/templates/statefulset.yaml | 3 | ||||
-rw-r--r-- | kubernetes/appc/values.yaml | 2 |
11 files changed, 239 insertions, 45 deletions
diff --git a/kubernetes/appc/Chart.yaml b/kubernetes/appc/Chart.yaml index dd79ae039e..b7a0755841 100644 --- a/kubernetes/appc/Chart.yaml +++ b/kubernetes/appc/Chart.yaml @@ -16,4 +16,4 @@ apiVersion: v1 description: Application Controller name: appc -version: 3.0.0 +version: 4.0.0 diff --git a/kubernetes/appc/charts/appc-ansible-server/Chart.yaml b/kubernetes/appc/charts/appc-ansible-server/Chart.yaml index d2760b3a05..de5213fd40 100644 --- a/kubernetes/appc/charts/appc-ansible-server/Chart.yaml +++ b/kubernetes/appc/charts/appc-ansible-server/Chart.yaml @@ -15,4 +15,4 @@ apiVersion: v1 description: ONAP APPC Ansible Server name: appc-ansible-server -version: 3.0.0 +version: 4.0.0 diff --git a/kubernetes/appc/charts/appc-ansible-server/requirements.yaml b/kubernetes/appc/charts/appc-ansible-server/requirements.yaml index 9e5715e966..394444104e 100644 --- a/kubernetes/appc/charts/appc-ansible-server/requirements.yaml +++ b/kubernetes/appc/charts/appc-ansible-server/requirements.yaml @@ -14,5 +14,5 @@ dependencies: - name: common - version: ~3.0.0 + version: ~4.x-0 repository: '@local' diff --git a/kubernetes/appc/charts/appc-ansible-server/values.yaml b/kubernetes/appc/charts/appc-ansible-server/values.yaml index 93d4c56e27..66f39ecfb0 100644 --- a/kubernetes/appc/charts/appc-ansible-server/values.yaml +++ b/kubernetes/appc/charts/appc-ansible-server/values.yaml @@ -29,7 +29,7 @@ flavor: small # application image repository: nexus3.onap.org:10001 -image: onap/ccsdk-ansible-server-image:0.3.2 +image: onap/ccsdk-ansible-server-image:0.3.3 pullPolicy: Always # flag to enable debugging - application support required diff --git a/kubernetes/appc/charts/appc-cdt/Chart.yaml b/kubernetes/appc/charts/appc-cdt/Chart.yaml index 4d981a8c8b..7680f7fd50 100644 --- a/kubernetes/appc/charts/appc-cdt/Chart.yaml +++ b/kubernetes/appc/charts/appc-cdt/Chart.yaml @@ -15,4 +15,4 @@ apiVersion: v1 description: ONAP APPC Self Service Controller Design Tool name: appc-cdt -version: 3.0.0 +version: 4.0.0 diff --git a/kubernetes/appc/charts/appc-cdt/requirements.yaml b/kubernetes/appc/charts/appc-cdt/requirements.yaml index 220dc4619b..fae2fe2fe7 100644 --- a/kubernetes/appc/charts/appc-cdt/requirements.yaml +++ b/kubernetes/appc/charts/appc-cdt/requirements.yaml @@ -14,5 +14,5 @@ dependencies: - name: common - version: ~3.0.0 + version: ~4.x-0 repository: '@local' diff --git a/kubernetes/appc/requirements.yaml b/kubernetes/appc/requirements.yaml index cc912b538c..e48d857709 100644 --- a/kubernetes/appc/requirements.yaml +++ b/kubernetes/appc/requirements.yaml @@ -14,11 +14,11 @@ dependencies: - name: common - version: ~3.0.0 + version: ~4.x-0 repository: '@local' - name: mariadb-galera - version: ~3.0.0 + version: ~4.x-0 repository: '@local' - name: dgbuilder - version: ~3.0.0 + version: ~4.x-0 repository: '@local' diff --git a/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/installFeatures.sh b/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/installFeatures.sh new file mode 100755 index 0000000000..724f4e767d --- /dev/null +++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/installFeatures.sh @@ -0,0 +1,184 @@ +#!/bin/bash + +### +# ============LICENSE_START======================================================= +# APPC +# ================================================================================ +# 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========================================================= +# ECOMP is a trademark and service mark of AT&T Intellectual Property. +### + +ODL_HOME=${ODL_HOME:-/opt/opendaylight/current} +APPC_HOME=${APPC_HOME:-/opt/onap/appc} +ENABLE_ODL_CLUSTER=${ENABLE_ODL_CLUSTER:-false} +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 + cat /tmp/installErr + if grep -q 'Failed to get the session' /tmp/installErr; then + sleep 10 + else + let COUNT=10 + fi + 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" + +APPC_FEATURES_1=" \ + onap-appc-core \ + onap-appc-metric \ + onap-appc-dmaap-adapter \ + onap-appc-chef-adapter \ + onap-appc-netconf-adapter \ + onap-appc-rest-adapter \ + onap-appc-lifecycle-management \ + onap-appc-license-manager" + + APPC_FEATURES_2=" \ + 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 \ + onap-appc-artifact-handler + onap-appc-aai-client \ + onap-appc-event-listener \ + 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 \ + 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 \ + appc-network-inventory-client \ + appc-design-services \ + appc-interfaces-service" + + +if $ENABLE_ODL_CLUSTER + then + echo "Enabling core APP-C features with clustering enabled" + featureInstall odl-netconf-connector-all + featureInstall odl-restconf-noauth + featureInstall odl-netconf-clustered-topology + else + echo "Enabling core APP-C features with clustering disabled" + featureInstall odl-netconf-connector-all + featureInstall odl-restconf-noauth + featureInstall odl-netconf-topology +fi + +sleep 7s +echo "Installing APP-C Features" +echo "" + +for feature in ${APPC_FEATURES_UNZIP} +do + if [ -f ${APPC_FEATURE_DIR}/${feature}/install-feature.sh ] + then + ${APPC_FEATURE_DIR}/${feature}/install-feature.sh + else + echo "No installer found for feature ${feature}" + 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}" + start=$(date +%s) + ${ODL_HOME}/bin/client "feature:install -r ${feature}" + end=$(date +%s) + echo "Install of ${feature} 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 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 + echo "Sleep Finished" + +for feature in ${APPC_FEATURES_2} +do + echo "Installing ${feature}" + start=$(date +%s) + ${ODL_HOME}/bin/client "feature:install -r ${feature}" + end=$(date +%s) + echo "Install of ${feature} took $(expr $end - $start) seconds" + sleep 7s + echo "Sleep Finished" +done + diff --git a/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh b/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh index 6a36fdf37b..ed35de8f77 100755 --- a/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh +++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.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. # Modifications Copyright © 2018 Amdocs,Bell Canada # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -26,6 +26,7 @@ # This script takes care of installing the SDNC & APPC platform components # if not already installed, and starts the APPC Docker Container # +#set -x function enable_odl_cluster(){ if [ -z $APPC_REPLICAS ]; then @@ -58,8 +59,6 @@ ENABLE_ODL_CLUSTER=${ENABLE_ODL_CLUSTER:-false} ENABLE_AAF=${ENABLE_AAF:-true} DBINIT_DIR=${DBINIT_DIR:-/opt/opendaylight/current/daexim} -appcInstallStartTime=$(date +%s) - # # Wait for database to init properly # @@ -86,16 +85,18 @@ END then echo "Installing SDNC database" ${SDNC_HOME}/bin/installSdncDb.sh - fi - appc_db_exists=$(mysql -h {{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}} -u root -p{{.Values.config.mariadbRootPassword}} mysql <<-END + appc_db_exists=$(mysql -h {{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}} -u root -p{{.Values.config.mariadbRootPassword}} mysql <<-END show databases like 'appcctl'; END ) - if [ "x${appc_db_exists}" == "x" ] - then - echo "Installing APPC database" - ${APPC_HOME}/bin/installAppcDb.sh + if [ "x${appc_db_exists}" == "x" ] + then + echo "Installing APPC database" + ${APPC_HOME}/bin/installAppcDb.sh + fi + else + sleep 30 fi echo "Installed at `date`" > ${DBINIT_DIR}/.installed @@ -107,19 +108,15 @@ then echo "Installing ODL Host Key" ${SDNC_HOME}/bin/installOdlHostKey.sh +# echo "Copying a working version of the logging configuration into the opendaylight etc folder" +# cp ${APPC_HOME}/data/org.ops4j.pax.logging.cfg ${ODL_HOME}/etc/org.ops4j.pax.logging.cfg + echo "Starting OpenDaylight" ${ODL_HOME}/bin/start echo "Waiting ${SLEEP_TIME} seconds for OpenDaylight to initialize" sleep ${SLEEP_TIME} - echo "Copying a working version of the logging configuration into the opendaylight etc folder" - cp ${APPC_HOME}/data/org.ops4j.pax.logging.cfg ${ODL_HOME}/etc/org.ops4j.pax.logging.cfg - echo "Copying a new version of aaf cadi shiro into the opendaylight deploy folder" - cp ${APPC_HOME}/data/aaf-shiro-aafrealm-osgi-bundle.jar ${ODL_HOME}/deploy/aaf-shiro-aafrealm-osgi-bundle.jar - - echo "Installing SDNC platform features" - ${SDNC_HOME}/bin/installFeatures.sh if [ -x ${SDNC_HOME}/svclogic/bin/install.sh ] then @@ -127,29 +124,18 @@ then ${SDNC_HOME}/svclogic/bin/install.sh fi - if $ENABLE_ODL_CLUSTER ; then echo "Installing Opendaylight cluster features" ; ${ODL_HOME}/bin/client feature:install odl-mdsal-clustering ; ${ODL_HOME}/bin/client feature:install odl-jolokia ; fi - - echo "Installing APPC platform features" - ${APPC_HOME}/bin/installFeatures.sh - - if [ -x ${APPC_HOME}/svclogic/bin/install.sh ] - then - echo "Installing APPC DGs using platform-logic" - ${APPC_HOME}/svclogic/bin/install.sh - fi - if [ -x ${APPC_HOME}/svclogic/bin/install-converted-dgs.sh ] then echo "Installing APPC JSON DGs converted to XML using dg-loader" ${APPC_HOME}/svclogic/bin/install-converted-dgs.sh fi - if $ENABLE_ODL_CLUSTER ; then enable_odl_cluster ; fi - - echo "Adding a property system.properties for AAF cadi.properties location" - echo "" >> ${ODL_HOME}/etc/system.properties - echo "cadi_prop_files=${APPC_HOME}/data/properties/cadi.properties" >> ${ODL_HOME}/etc/system.properties - echo "" >> ${ODL_HOME}/etc/system.properties + if $ENABLE_ODL_CLUSTER + then + echo "Installing Opendaylight cluster features" + ${ODL_HOME}/bin/client feature:install odl-mdsal-clustering + enable_odl_cluster + fi echo "Copying the aaa shiro configuration into opendaylight" if $ENABLE_AAF @@ -180,11 +166,32 @@ then done echo "Karaf process has stopped" sleep 10s + echo "Installed at `date`" > ${SDNC_HOME}/.installed fi - appcInstallEndTime=$(date +%s) - echo "Total Appc install took $(expr $appcInstallEndTime - $appcInstallStartTime) seconds" +# Move journal and snapshots directory to persistent storage + +hostdir=${ODL_HOME}/daexim/$(hostname -s) +if [ ! -d $hostdir ] +then + mkdir -p $hostdir + if [ -d ${ODL_HOME}/journal ] + then + mv ${ODL_HOME}/journal ${hostdir} + else + mkdir ${hostdir}/journal + fi + if [ -d ${ODL_HOME}/snapshots ] + then + mv ${ODL_HOME}/snapshots ${hostdir} + else + mkdir ${hostdir}/snapshots + fi +fi + +ln -s ${hostdir}/journal ${ODL_HOME}/journal +ln -s ${hostdir}/snapshots ${ODL_HOME}/snapshots echo "Starting cdt-proxy-service jar, logging to ${APPC_HOME}/cdt-proxy-service/jar.log" java -jar ${APPC_HOME}/cdt-proxy-service/cdt-proxy-service.jar > ${APPC_HOME}/cdt-proxy-service/jar.log & diff --git a/kubernetes/appc/templates/statefulset.yaml b/kubernetes/appc/templates/statefulset.yaml index 6b0373fbc8..6677516990 100644 --- a/kubernetes/appc/templates/statefulset.yaml +++ b/kubernetes/appc/templates/statefulset.yaml @@ -116,6 +116,9 @@ spec: - mountPath: /opt/onap/appc/bin/installAppcDb.sh name: onap-appc-bin subPath: installAppcDb.sh + - mountPath: /opt/onap/appc/bin/installFeatures.sh + name: onap-appc-bin + subPath: installFeatures.sh - mountPath: /opt/onap/appc/bin/health_check.sh name: onap-appc-bin subPath: health_check.sh diff --git a/kubernetes/appc/values.yaml b/kubernetes/appc/values.yaml index d8856164fb..f3d20bc3a4 100644 --- a/kubernetes/appc/values.yaml +++ b/kubernetes/appc/values.yaml @@ -31,7 +31,7 @@ global: flavor: small # application image repository: nexus3.onap.org:10001 -image: onap/appc-image:1.4.3 +image: onap/appc-image:1.5.0-SNAPSHOT-latest pullPolicy: Always # flag to enable debugging - application support required |