From 9eb6ad5b26c1fd6d1f320c7a2c47448cd0449fd8 Mon Sep 17 00:00:00 2001 From: Jorge Hernandez Date: Wed, 2 Aug 2017 09:58:13 -0500 Subject: [POLICY-66] healtcheck feature config and db prep initial commit pre-introduction of db support on per feature basis Change-Id: Ie5aec06d38a84be849386fc76d8f1c804213c803 Signed-off-by: Jorge Hernandez --- config/drools/base.conf | 59 ++++++++++++++++++++++++++++++++-- config/drools/drools-tweaks.sh | 23 ------------- config/drools/feature-healthcheck.conf | 2 ++ 3 files changed, 58 insertions(+), 26 deletions(-) create mode 100644 config/drools/feature-healthcheck.conf (limited to 'config/drools') diff --git a/config/drools/base.conf b/config/drools/base.conf index b8e0d0a4..611e1f7b 100644 --- a/config/drools/base.conf +++ b/config/drools/base.conf @@ -1,14 +1,39 @@ +### +# ============LICENSE_START======================================================= +# ONAP POLICY +# ================================================================================ +# 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========================================================= +### + + +# SYSTEM software configuration + POLICY_HOME=/opt/app/policy JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 KEYSTORE_PASSWD=PolicyR0ck$ +# Telemetry credentials + ENGINE_MANAGEMENT_PORT=9696 ENGINE_MANAGEMENT_HOST=localhost ENGINE_MANAGEMENT_USER=@1b3rt -ENGINE_MANAGEMENT_PASSWORD=31nst@1n +ENGINE_MANAGEMENT_PASSWORD=31nst31n + +# nexus repository -# To use a Nexus repository for rules artifacts, -# following properties must be uncommented and set: snapshotRepositoryID=policy-nexus-snapshots snapshotRepositoryUrl=http://nexus:8081/nexus/content/repositories/snapshots/ releaseRepositoryID=policy-nexus-releases @@ -16,6 +41,14 @@ releaseRepositoryUrl=http://nexus:8081/nexus/content/repositories/releases/ repositoryUsername=admin repositoryPassword=admin123 +# Relational (SQL) DB access + +SQL_HOST=mariadb +SQL_USER=policy_user +SQL_PASSWORD=policy_user + +# PDP-D DMaaP configuration channel + PDPD_CONFIGURATION_TOPIC=PDPD-CONFIGURATION PDPD_CONFIGURATION_SERVERS=vm1.mr.simpledemo.openecomp.org PDPD_CONFIGURATION_API_KEY= @@ -24,3 +57,23 @@ PDPD_CONFIGURATION_CONSUMER_GROUP= PDPD_CONFIGURATION_CONSUMER_INSTANCE= PDPD_CONFIGURATION_PARTITION_KEY= +# PAP + +PAP_HOST=pap +PAP_USERNAME=testpap +PAP_PASSWORD=alpha123 + +# PDP-X + +PDP_HOST=pdp +PDP_USERNAME=testpdp +PDP_PASSWORD=alpha123 + +# DCAE DMaaP + +DCAE_TOPIC=unauthenticated.TCA_EVENT_OUTPUT +DCAE_SERVERS=10.0.4.102 + +# Open DMaaP + +DMAAP_SERVERS=vm1.mr.simpledemo.openecomp.org diff --git a/config/drools/drools-tweaks.sh b/config/drools/drools-tweaks.sh index ab9f3697..09d13416 100755 --- a/config/drools/drools-tweaks.sh +++ b/config/drools/drools-tweaks.sh @@ -1,29 +1,6 @@ #! /bin/bash -# changes for health check ${POLICY_HOME}/bin/features enable healthcheck -sedArgs=("-i") -while read var value ; do - if [[ "${var}" == "" ]] ; then - continue - fi - sedArgs+=("-e" "s@\${{${var}}}@${value}@g") -done <<-EOF - PAP_HOST pap - PAP_USERNAME testpap - PAP_PASSWORD alpha123 - PDP_HOST pdp - PDP_USERNAME testpdp - PDP_PASSWORD alpha123 -EOF - -# convert file -sed "${sedArgs[@]}" ${POLICY_HOME}/config/*health* - -cat >>${POLICY_HOME}/config/*health* <<-'EOF' - http.server.services.HEALTHCHECK.userName=healthcheck - http.server.services.HEALTHCHECK.password=zb!XztG34 -EOF sed -i -e 's/DCAE-CL-EVENT/unauthenticated.TCA_EVENT_OUTPUT/' \ -e '/TCA_EVENT_OUTPUT\.servers/s/servers=.*$/servers=10.0.4.102/' \ diff --git a/config/drools/feature-healthcheck.conf b/config/drools/feature-healthcheck.conf new file mode 100644 index 00000000..3351b78f --- /dev/null +++ b/config/drools/feature-healthcheck.conf @@ -0,0 +1,2 @@ +HEALTHCHECK_USER=healthcheck +HEALTHCHECK_PASSWORD=zb!XztG3 -- cgit 1.2.3-korg