aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhh <jorge.hernandez-herrero@att.com>2019-04-29 22:04:12 -0500
committerjhh <jorge.hernandez-herrero@att.com>2019-04-29 23:08:24 -0500
commit5f7f020b9c40da52a09f588f642dfcec13e6fc4c (patch)
tree69706f8a5f8ac0209197aebd1f92ccced8bafd3a
parentab30d9c18a3428ffe4499eb561ed9f0e665be290 (diff)
No fetching applications load
drools-pdp in docker when it sees this configuration files, it will try to execute them. Since the alpine common image has an immutable BUILD_VERSION that does not refer to the actual drools build, it will not find it. Two solutions: (a) update the scripts to look for the newly added BUILD_VERSION_DROOLS to counter the presence of that variable, or (b) remove them altogether since the control loop application being the only one that is used will have the control loop applications image cooked. Change-Id: Ie8adb4b50565601b09e1100578458e3071ee6e54 Issue-ID: POLICY-1712 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
-rw-r--r--config/drools/apps-install.sh124
-rw-r--r--config/drools/base.conf2
-rw-r--r--config/drools/drools-preinstall.sh52
-rw-r--r--config/pe/base.conf2
4 files changed, 2 insertions, 178 deletions
diff --git a/config/drools/apps-install.sh b/config/drools/apps-install.sh
deleted file mode 100644
index 72f7a746..00000000
--- a/config/drools/apps-install.sh
+++ /dev/null
@@ -1,124 +0,0 @@
-#!/bin/bash
-#
-# ============LICENSE_START=======================================================
-# ONAP
-# ================================================================================
-# Copyright (C) 2018 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=========================================================
-#
-
-# #################################
-# Usage
-# #################################
-
-function usage {
- echo
- echo "Usage: $(basename $0) <application-name> <zipped-application-version> <download-directory>"
- echo "Example: $(basename $0) controlloop 1.2.0 /opt/policy/config/drools"
- echo
-}
-
-# #################################
-# snapshot url computation
-# #################################
-
-function url_snapshot {
- if [[ $DEBUG == y ]]; then
- echo "-- ${FUNCNAME[0]} --"
- set -x
- fi
-
- APP_URL="${APP_URL}/snapshots/org/onap/policy/drools-applications/${APP_NAME}/packages/apps-${APP_NAME}/${APP_VERSION}"
-
- local APP_METADATA_URL="${APP_URL}/maven-metadata.xml"
- local APP_SNAPSHOT_VERSION=$(curl --silent "${APP_METADATA_URL}" | grep -Po "(?<=<value>).*(?=</value>)" | sort -V | tail -1)
-
- if [[ -z ${APP_SNAPSHOT_VERSION} ]]; then
- echo "ERROR: cannot compute SNAPSHOT version"
- usage
- exit 1
- fi
-
- APP_URL="${APP_URL}/apps-${APP_NAME}-${APP_SNAPSHOT_VERSION}.zip"
-}
-
-# #################################
-# release url computation
-# #################################
-
-function url_release {
- if [[ $DEBUG == y ]]; then
- echo "-- ${FUNCNAME[0]} --"
- set -x
- fi
-
- APP_URL="${APP_URL}/releases/org/onap/policy/drools-applications/${APP_NAME}/packages/apps-${APP_NAME}/${APP_VERSION}/apps-${APP_NAME}-${APP_VERSION}.zip"
-}
-
-# #################################
-# Main
-# #################################
-
-if [[ $DEBUG == y ]]; then
- set -x
-fi
-
-APP_NAME=$1
-if [[ -z ${APP_NAME} ]]; then
- echo "ERROR: no APPLICATION NAME provided (ie. controlloop)"
- usage
- exit 1
-fi
-
-APP_VERSION=$2
-if [[ -z ${APP_VERSION} ]]; then
- echo "ERROR: no APPLICATION VERSION provided"
- usage
- exit 1
-fi
-
-DOWNLOAD_DIR=$3
-if [[ -z ${DOWNLOAD_DIR} ]]; then
- echo "ERROR: no DOWNLOAD DIRECTORY provided"
- usage
- exit 1
-fi
-
-if [[ ! -d ${DOWNLOAD_DIR} ]]; then
- echo "ERROR: ${DOWNLOAD_DIR} is not a directory"
- usage
- exit 1
-fi
-
-APP_GROUP_ID="org.onap.policy.drools-applications.${APP_NAME}.packages"
-APP_ARTIFACT_ID="apps-${APP_NAME}"
-APP_BASE_URL="https://nexus.onap.org/content/repositories"
-
-APP_URL="${APP_BASE_URL}"
-
-if [[ ${APP_VERSION} =~ \-SNAPSHOT$ ]]; then
- url_snapshot
-else
- url_release
-fi
-
-wget "${APP_URL}" -O "${DOWNLOAD_DIR}"/apps-"${APP_NAME}".zip
-if [[ $? != 0 ]]; then
- echo "ERROR: cannot download ${DOWNLOAD_DIR}/apps-${APP_NAME}.zip"
- exit 1
-fi
-
-echo "APP ${APP_NAME} stored at ${DOWNLOAD_DIR}/apps-${APP_NAME}.zip"
-ls -l "${DOWNLOAD_DIR}"/apps-"${APP_NAME}".zip
diff --git a/config/drools/base.conf b/config/drools/base.conf
index 59a88e99..070019b5 100644
--- a/config/drools/base.conf
+++ b/config/drools/base.conf
@@ -26,7 +26,7 @@ JVM_OPTIONS=-server -Xms512m -Xmx1024m
POLICY_HOME=/opt/app/policy
POLICY_LOGS=/var/log/onap/policy/pdpd
-JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
KEYSTORE_PASSWD=Pol1cy_0nap
TRUSTSTORE_PASSWD=Pol1cy_0nap
diff --git a/config/drools/drools-preinstall.sh b/config/drools/drools-preinstall.sh
deleted file mode 100644
index 8b290128..00000000
--- a/config/drools/drools-preinstall.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/bash
-#
-# ============LICENSE_START=======================================================
-# ONAP
-# ================================================================================
-# Copyright (C) 2018 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=========================================================
-#
-
-# #################################
-# Usage
-# #################################
-
-function usage {
- echo
- echo "Usage: $(basename $0)"
- echo
-}
-
-if [[ ${DEBUG} == y ]]; then
- set -x
-fi
-
-if [[ -z ${BUILD_VERSION} ]]; then
- echo "no BUILD_VERSION available as environment variable""
- usage
- exit 1
-fi
-
-if [[ -z ${POLICY_INSTALL} ]]; then
- echo "no POLICY_INSTALL available as environment variable""
- usage
- exit 2
-fi
-
-CONFIG_DIR=$(dirname "$0")
-echo "invoking ${CONFIG_DIR}/apps-install.sh for controlloop ${BUILD_VERSION} at ${POLICY_INSTALL}"
-export DEBUG=y
-bash ${CONFIG_DIR}/apps-install.sh controlloop ${BUILD_VERSION} ${POLICY_INSTALL}
-unzip -o ${POLICY_INSTALL}/app*.zip -d ${POLICY_INSTALL}
diff --git a/config/pe/base.conf b/config/pe/base.conf
index 5aeaf266..2bc538c7 100644
--- a/config/pe/base.conf
+++ b/config/pe/base.conf
@@ -11,7 +11,7 @@
# 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.
-JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
POLICY_HOME=/opt/app/policy
POLICY_LOGS=/var/log/onap
KEYSTORE_PASSWD=Pol1cy_0nap