aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/src/test/resources/demo/config/RuntimeConfig.json22
-rw-r--r--packages/policy-clamp-docker/pom.xml249
-rw-r--r--packages/policy-clamp-docker/src/main/docker/ClRuntimeDockerfile47
-rw-r--r--packages/policy-clamp-docker/src/main/docker/DcaeParticipantDockerfile50
-rw-r--r--packages/policy-clamp-docker/src/main/docker/PolicyParticipantDockerfile50
-rw-r--r--packages/policy-clamp-docker/src/main/docker/controlloop-runtime.sh62
-rw-r--r--packages/policy-clamp-docker/src/main/docker/dcae-participant.sh64
-rw-r--r--packages/policy-clamp-docker/src/main/docker/policy-participant.sh64
-rw-r--r--packages/policy-clamp-tarball/pom.xml75
-rw-r--r--packages/policy-clamp-tarball/src/main/package/tarball/assembly.xml62
-rw-r--r--packages/policy-clamp-tarball/src/main/resources/etc/ClRuntimeParameters.json53
-rw-r--r--packages/policy-clamp-tarball/src/main/resources/etc/DcaeParticipantParameters.json70
-rw-r--r--packages/policy-clamp-tarball/src/main/resources/etc/PolicyParticipantParameters.json76
-rw-r--r--packages/policy-clamp-tarball/src/main/resources/etc/logback-default.xml52
-rw-r--r--packages/policy-clamp-tarball/src/main/resources/etc/logback.xml194
-rw-r--r--packages/policy-clamp-tarball/src/main/resources/etc/ssl/policy-truststorebin0 -> 124180 bytes
-rw-r--r--packages/pom.xml61
-rw-r--r--participant/participant-impl/participant-impl-dcae/src/test/resources/parameters/Unreadable.json22
-rw-r--r--participant/participant-impl/participant-impl-policy/src/test/resources/parameters/Unreadable.json22
-rw-r--r--participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/Unreadable.json22
-rw-r--r--pom.xml8
-rw-r--r--runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/main/parameters/ClRuntimeParameterGroup.java1
-rw-r--r--runtime-controlloop/src/test/resources/parameters/InstantiationConfigParametersStd.json22
-rw-r--r--runtime-controlloop/src/test/resources/parameters/MinimumParametersH2.json20
-rw-r--r--runtime-controlloop/src/test/resources/parameters/TestParameters.json22
-rw-r--r--runtime-controlloop/src/test/resources/parameters/TestParametersMariaDB.json22
-rw-r--r--runtime-controlloop/src/test/resources/parameters/Unreadable.json22
-rw-r--r--runtime/pom.xml10
28 files changed, 1246 insertions, 198 deletions
diff --git a/common/src/test/resources/demo/config/RuntimeConfig.json b/common/src/test/resources/demo/config/RuntimeConfig.json
index 2c0127b16..529557eab 100644
--- a/common/src/test/resources/demo/config/RuntimeConfig.json
+++ b/common/src/test/resources/demo/config/RuntimeConfig.json
@@ -55,25 +55,5 @@
"topicCommInfrastructure": "dmaap"
}
]
- },
- "healthCheckRestClientParameters": [
- {
- "clientName": "api",
- "hostname": "policy-api",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "policy/api/v1/healthcheck"
- },
- {
- "clientName": "distribution",
- "hostname": "policy-distribution",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "healthcheck"
- }
- ]
+ }
}
diff --git a/packages/policy-clamp-docker/pom.xml b/packages/policy-clamp-docker/pom.xml
new file mode 100644
index 000000000..fc6e36085
--- /dev/null
+++ b/packages/policy-clamp-docker/pom.xml
@@ -0,0 +1,249 @@
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 2021 Nordix Foundation.
+ ================================================================================
+ 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.
+
+ SPDX-License-Identifier: Apache-2.0
+ ============LICENSE_END=========================================================
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.onap.policy.clamp</groupId>
+ <artifactId>clamp-packages</artifactId>
+ <version>6.1.2-SNAPSHOT</version>
+ </parent>
+
+ <packaging>pom</packaging>
+ <artifactId>policy-clamp-docker</artifactId>
+ <name>${project.artifactId}</name>
+ <description>Policy clamp docker image</description>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <dist.project.version>${project.version}</dist.project.version>
+ <docker.skip>false</docker.skip>
+ <docker.skip.build>false</docker.skip.build>
+ <docker.skip.push>false</docker.skip.push>
+ <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
+ <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
+ <maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
+ </properties>
+
+ <build>
+ <finalName>${project.artifactId}-${project.version}</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source>
+ println 'Project version: ' + project.properties['dist.project.version']
+ if (project.properties['dist.project.version'] != null) {
+ def versionArray = project.properties['dist.project.version'].split('-')
+ def minMaxVersionArray = versionArray[0].tokenize('.')
+ if (project.properties['dist.project.version'].endsWith("-SNAPSHOT")) {
+ project.properties['project.docker.latest.minmax.tag.version'] =
+ minMaxVersionArray[0] + "." + minMaxVersionArray[1] + "-SNAPSHOT-latest"
+ } else {
+ project.properties['project.docker.latest.minmax.tag.version'] =
+ minMaxVersionArray[0] + "." + minMaxVersionArray[1] + "-STAGING-latest"
+ }
+ println 'New tag for docker: ' + project.properties['project.docker.latest.minmax.tag.version']
+ }
+ </source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+
+ <configuration>
+ <verbose>true</verbose>
+ <apiVersion>1.23</apiVersion>
+ <pullRegistry>${docker.pull.registry}</pullRegistry>
+ <pushRegistry>${docker.push.registry}</pushRegistry>
+
+ <images>
+ <image>
+ <name>onap/policy-controlloop-runtime</name>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFile>ClRuntimeDockerfile</dockerFile>
+ <tags>
+ <tag>${project.version}</tag>
+ <tag>${project.version}-${maven.build.timestamp}</tag>
+ <tag>${project.docker.latest.minmax.tag.version}</tag>
+ </tags>
+ <assembly>
+ <inline>
+ <dependencySets>
+ <dependencySet>
+ <includes>
+ <include>org.onap.policy.clamp:policy-clamp-tarball</include>
+ </includes>
+ <outputDirectory>/lib</outputDirectory>
+ <outputFileNameMapping>policy-controlloop-runtime.tar.gz</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
+ </inline>
+ </assembly>
+ </build>
+ </image>
+ <image>
+ <name>onap/policy-participant</name>
+ <alias>onap-policy-participant</alias>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFile>PolicyParticipantDockerfile</dockerFile>
+ <tags>
+ <tag>${project.version}</tag>
+ <tag>${project.version}-${maven.build.timestamp}</tag>
+ <tag>${project.docker.latest.minmax.tag.version}</tag>
+ </tags>
+ <assembly>
+ <inline>
+ <dependencySets>
+ <dependencySet>
+ <includes>
+ <include>org.onap.policy.clamp:policy-clamp-tarball</include>
+ </includes>
+ <outputDirectory>/lib</outputDirectory>
+ <outputFileNameMapping>policy-participant.tar.gz</outputFileNameMapping>
+ </dependencySet>
+ <dependencySet>
+ <includes>
+ <include>org.onap.policy.clamp.participant:policy-clamp-participant-impl-policy</include>
+ </includes>
+ <outputFileNameMapping>app.jar</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
+ </inline>
+ </assembly>
+ </build>
+ </image>
+ <image>
+ <name>onap/dcae-participant</name>
+ <alias>onap-dcae-participant</alias>
+ <build>
+ <cleanup>try</cleanup>
+ <dockerFile>DcaeParticipantDockerfile</dockerFile>
+ <tags>
+ <tag>${project.version}</tag>
+ <tag>${project.version}-${maven.build.timestamp}</tag>
+ <tag>${project.docker.latest.minmax.tag.version}</tag>
+ </tags>
+ <assembly>
+ <inline>
+ <dependencySets>
+ <dependencySet>
+ <includes>
+ <include>org.onap.policy.clamp:policy-clamp-tarball</include>
+ </includes>
+ <outputDirectory>/lib</outputDirectory>
+ <outputFileNameMapping>dcae-participant.tar.gz</outputFileNameMapping>
+ </dependencySet>
+ <dependencySet>
+ <includes>
+ <include>org.onap.policy.clamp.participant:policy-clamp-participant-impl-dcae</include>
+ </includes>
+ <outputFileNameMapping>app.jar</outputFileNameMapping>
+ </dependencySet>
+ </dependencySets>
+ </inline>
+ </assembly>
+ </build>
+ </image>
+ </images>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>clean-images</id>
+ <phase>pre-clean</phase>
+ <goals>
+ <goal>remove</goal>
+ </goals>
+ <configuration>
+ <removeAll>true</removeAll>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>generate-images</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+
+ <execution>
+ <id>push-images</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ <configuration>
+ <image>onap/policy-clamp</image>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.policy.clamp</groupId>
+ <artifactId>policy-clamp-tarball</artifactId>
+ <version>${project.version}</version>
+ <classifier>tarball</classifier>
+ <type>tar.gz</type>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.clamp.participant</groupId>
+ <artifactId>policy-clamp-participant-impl-policy</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.clamp.participant</groupId>
+ <artifactId>policy-clamp-participant-impl-dcae</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/packages/policy-clamp-docker/src/main/docker/ClRuntimeDockerfile b/packages/policy-clamp-docker/src/main/docker/ClRuntimeDockerfile
new file mode 100644
index 000000000..bd5000686
--- /dev/null
+++ b/packages/policy-clamp-docker/src/main/docker/ClRuntimeDockerfile
@@ -0,0 +1,47 @@
+#-------------------------------------------------------------------------------
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 Nordix Foundation.
+# ================================================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+#-------------------------------------------------------------------------------
+
+#
+# Docker file to build an image that runs CLAMP on Java 11 or better in alpine
+#
+FROM onap/policy-jre-alpine:2.2.1
+
+LABEL maintainer="Policy Team"
+
+ARG POLICY_LOGS=/var/log/onap/policy/clamp
+
+ENV POLICY_LOGS=$POLICY_LOGS
+ENV POLICY_HOME=$POLICY_HOME/clamp
+
+RUN mkdir -p $POLICY_LOGS $POLICY_HOME $POLICY_HOME/bin && \
+ chown -R policy:policy $POLICY_HOME $POLICY_LOGS && \
+ mkdir /packages
+COPY /maven/* /packages
+RUN tar xvfz /packages/policy-controlloop-runtime.tar.gz --directory $POLICY_HOME && \
+ rm /packages/policy-controlloop-runtime.tar.gz
+
+WORKDIR $POLICY_HOME
+COPY controlloop-runtime.sh bin/.
+
+RUN chown -R policy:policy * && chmod 755 bin/*.sh
+
+USER policy
+WORKDIR $POLICY_HOME/bin
+ENTRYPOINT [ "./controlloop-runtime.sh" ]
diff --git a/packages/policy-clamp-docker/src/main/docker/DcaeParticipantDockerfile b/packages/policy-clamp-docker/src/main/docker/DcaeParticipantDockerfile
new file mode 100644
index 000000000..368b9348a
--- /dev/null
+++ b/packages/policy-clamp-docker/src/main/docker/DcaeParticipantDockerfile
@@ -0,0 +1,50 @@
+#-------------------------------------------------------------------------------
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 Nordix Foundation.
+# ================================================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+#-------------------------------------------------------------------------------
+
+#
+# Docker file to build an image that runs CLAMP on Java 11 or better in alpine
+#
+FROM onap/policy-jre-alpine:2.2.1
+
+LABEL maintainer="Policy Team"
+
+ARG POLICY_LOGS=/var/log/onap/policy/clamp
+
+ENV POLICY_LOGS=$POLICY_LOGS
+ENV POLICY_HOME=$POLICY_HOME/clamp
+
+RUN mkdir -p $POLICY_LOGS $POLICY_HOME $POLICY_HOME/bin && \
+ chown -R policy:policy $POLICY_HOME $POLICY_LOGS && \
+ mkdir /packages
+COPY /maven/lib/dcae-participant.tar.gz /packages
+RUN tar xvfz /packages/dcae-participant.tar.gz --directory $POLICY_HOME && \
+ rm /packages/dcae-participant.tar.gz && \
+ rm -rf $POLICY_HOME/lib
+
+WORKDIR $POLICY_HOME
+COPY dcae-participant.sh bin/.
+COPY /maven/app.jar /app
+
+RUN chown -R policy:policy * && chmod 755 bin/*.sh && \
+ chown -R policy:policy /app
+
+USER policy
+WORKDIR $POLICY_HOME/bin
+ENTRYPOINT [ "./dcae-participant.sh" ]
diff --git a/packages/policy-clamp-docker/src/main/docker/PolicyParticipantDockerfile b/packages/policy-clamp-docker/src/main/docker/PolicyParticipantDockerfile
new file mode 100644
index 000000000..3c2082202
--- /dev/null
+++ b/packages/policy-clamp-docker/src/main/docker/PolicyParticipantDockerfile
@@ -0,0 +1,50 @@
+#-------------------------------------------------------------------------------
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 Nordix Foundation.
+# ================================================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+#-------------------------------------------------------------------------------
+
+#
+# Docker file to build an image that runs CLAMP on Java 11 or better in alpine
+#
+FROM onap/policy-jre-alpine:2.2.1
+
+LABEL maintainer="Policy Team"
+
+ARG POLICY_LOGS=/var/log/onap/policy/clamp
+
+ENV POLICY_LOGS=$POLICY_LOGS
+ENV POLICY_HOME=$POLICY_HOME/clamp
+
+RUN mkdir -p $POLICY_LOGS $POLICY_HOME $POLICY_HOME/bin && \
+ chown -R policy:policy $POLICY_HOME $POLICY_LOGS && \
+ mkdir /packages
+COPY /maven/lib/policy-participant.tar.gz /packages
+RUN tar xvfz /packages/policy-participant.tar.gz --directory $POLICY_HOME && \
+ rm /packages/policy-participant.tar.gz && \
+ rm -rf $POLICY_HOME/lib
+
+WORKDIR $POLICY_HOME
+COPY policy-participant.sh bin/.
+COPY /maven/app.jar /app
+
+RUN chown -R policy:policy * && chmod 755 bin/*.sh && \
+ chown -R policy:policy /app
+
+USER policy
+WORKDIR $POLICY_HOME/bin
+ENTRYPOINT [ "./policy-participant.sh" ]
diff --git a/packages/policy-clamp-docker/src/main/docker/controlloop-runtime.sh b/packages/policy-clamp-docker/src/main/docker/controlloop-runtime.sh
new file mode 100644
index 000000000..8d64fa5a4
--- /dev/null
+++ b/packages/policy-clamp-docker/src/main/docker/controlloop-runtime.sh
@@ -0,0 +1,62 @@
+#!/usr/bin/env sh
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 Nordix Foundation.
+# ================================================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+#
+
+JAVA_HOME=/usr/lib/jvm/java-11-openjdk/
+KEYSTORE="${KEYSTORE:-$POLICY_HOME/etc/ssl/policy-keystore}"
+TRUSTSTORE="${TRUSTSTORE:-$POLICY_HOME/etc/ssl/policy-truststore}"
+KEYSTORE_PASSWD="${KEYSTORE_PASSWD:-Pol1cy_0nap}"
+TRUSTSTORE_PASSWD="${TRUSTSTORE_PASSWD:-Pol1cy_0nap}"
+
+if [ "$#" -eq 1 ]; then
+ CONFIG_FILE=$1
+else
+ CONFIG_FILE=${CONFIG_FILE}
+fi
+
+if [ -z "$CONFIG_FILE" ]; then
+ CONFIG_FILE="${POLICY_HOME}/etc/ClRuntimeParameters.json"
+fi
+
+echo "Policy clamp config file: $CONFIG_FILE"
+
+if [ -f "${POLICY_HOME}/etc/mounted/policy-truststore" ]; then
+ echo "overriding policy-truststore"
+ cp -f "${POLICY_HOME}"/etc/mounted/policy-truststore "${TRUSTSTORE}"
+fi
+
+if [ -f "${POLICY_HOME}/etc/mounted/policy-keystore" ]; then
+ echo "overriding policy-keystore"
+ cp -f "${POLICY_HOME}"/etc/mounted/policy-keystore "${KEYSTORE}"
+fi
+
+if [ -f "${POLICY_HOME}/etc/mounted/logback.xml" ]; then
+ echo "overriding logback.xml"
+ cp -f "${POLICY_HOME}"/etc/mounted/logback.xml "${POLICY_HOME}"/etc/
+fi
+
+$JAVA_HOME/bin/java -cp "${POLICY_HOME}/etc:${POLICY_HOME}/lib/*" \
+ -Dlogback.configurationFile="${POLICY_HOME}/etc/logback.xml" \
+ -Djavax.net.ssl.keyStore="${KEYSTORE}" \
+ -Djavax.net.ssl.keyStorePassword="${KEYSTORE_PASSWD}" \
+ -Djavax.net.ssl.trustStore="${TRUSTSTORE}" \
+ -Djavax.net.ssl.trustStorePassword="${TRUSTSTORE_PASSWD}" \
+ org.onap.policy.clamp.controlloop.runtime.main.startstop.Main \
+ -c "${CONFIG_FILE}"
diff --git a/packages/policy-clamp-docker/src/main/docker/dcae-participant.sh b/packages/policy-clamp-docker/src/main/docker/dcae-participant.sh
new file mode 100644
index 000000000..4acb17b39
--- /dev/null
+++ b/packages/policy-clamp-docker/src/main/docker/dcae-participant.sh
@@ -0,0 +1,64 @@
+#!/usr/bin/env sh
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 Nordix Foundation.
+# ================================================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+#
+
+JAVA_HOME=/usr/lib/jvm/java-11-openjdk/
+KEYSTORE="${KEYSTORE:-$POLICY_HOME/etc/ssl/policy-keystore}"
+TRUSTSTORE="${TRUSTSTORE:-$POLICY_HOME/etc/ssl/policy-truststore}"
+KEYSTORE_PASSWD="${KEYSTORE_PASSWD:-Pol1cy_0nap}"
+TRUSTSTORE_PASSWD="${TRUSTSTORE_PASSWD:-Pol1cy_0nap}"
+
+if [ "$#" -eq 1 ]; then
+ CONFIG_FILE=$1
+else
+ CONFIG_FILE=${CONFIG_FILE}
+fi
+
+if [ -z "$CONFIG_FILE" ]; then
+ CONFIG_FILE="${POLICY_HOME}/etc/DcaeParticipantParameters.json"
+fi
+
+echo "Policy clamp config file: $CONFIG_FILE"
+
+if [ -f "${POLICY_HOME}/etc/mounted/policy-truststore" ]; then
+ echo "overriding policy-truststore"
+ cp -f "${POLICY_HOME}"/etc/mounted/policy-truststore "${TRUSTSTORE}"
+fi
+
+if [ -f "${POLICY_HOME}/etc/mounted/policy-keystore" ]; then
+ echo "overriding policy-keystore"
+ cp -f "${POLICY_HOME}"/etc/mounted/policy-keystore "${KEYSTORE}"
+fi
+
+if [ -f "${POLICY_HOME}/etc/mounted/logback.xml" ]; then
+ echo "overriding logback xml files"
+ cp -f "${POLICY_HOME}"/etc/mounted/logback*.xml "${POLICY_HOME}"/etc/
+fi
+
+touch /app/app.jar
+mkdir -p "${POLICY_HOME}"/config/
+cp -f "${CONFIG_FILE}" "${POLICY_HOME}"/config/
+
+$JAVA_HOME/bin/java -Djavax.net.ssl.keyStore="${KEYSTORE}" \
+ -Djavax.net.ssl.keyStorePassword="${KEYSTORE_PASSWD}" \
+ -Djavax.net.ssl.trustStore="${TRUSTSTORE}" \
+ -Djavax.net.ssl.trustStorePassword="${TRUSTSTORE_PASSWD}" \
+ -jar /app/app.jar \
+ --participant.file="${POLICY_HOME}/config/DcaeParticipantParameters.json"
diff --git a/packages/policy-clamp-docker/src/main/docker/policy-participant.sh b/packages/policy-clamp-docker/src/main/docker/policy-participant.sh
new file mode 100644
index 000000000..2e7a7d54b
--- /dev/null
+++ b/packages/policy-clamp-docker/src/main/docker/policy-participant.sh
@@ -0,0 +1,64 @@
+#!/usr/bin/env sh
+#
+# ============LICENSE_START=======================================================
+# Copyright (C) 2021 Nordix Foundation.
+# ================================================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+#
+
+JAVA_HOME=/usr/lib/jvm/java-11-openjdk/
+KEYSTORE="${KEYSTORE:-$POLICY_HOME/etc/ssl/policy-keystore}"
+TRUSTSTORE="${TRUSTSTORE:-$POLICY_HOME/etc/ssl/policy-truststore}"
+KEYSTORE_PASSWD="${KEYSTORE_PASSWD:-Pol1cy_0nap}"
+TRUSTSTORE_PASSWD="${TRUSTSTORE_PASSWD:-Pol1cy_0nap}"
+
+if [ "$#" -eq 1 ]; then
+ CONFIG_FILE=$1
+else
+ CONFIG_FILE=${CONFIG_FILE}
+fi
+
+if [ -z "$CONFIG_FILE" ]; then
+ CONFIG_FILE="${POLICY_HOME}/etc/PolicyParticipantParameters.json"
+fi
+
+echo "Policy clamp config file: $CONFIG_FILE"
+
+if [ -f "${POLICY_HOME}/etc/mounted/policy-truststore" ]; then
+ echo "overriding policy-truststore"
+ cp -f "${POLICY_HOME}"/etc/mounted/policy-truststore "${TRUSTSTORE}"
+fi
+
+if [ -f "${POLICY_HOME}/etc/mounted/policy-keystore" ]; then
+ echo "overriding policy-keystore"
+ cp -f "${POLICY_HOME}"/etc/mounted/policy-keystore "${KEYSTORE}"
+fi
+
+if [ -f "${POLICY_HOME}/etc/mounted/logback.xml" ]; then
+ echo "overriding logback xml files"
+ cp -f "${POLICY_HOME}"/etc/mounted/logback*.xml "${POLICY_HOME}"/etc/
+fi
+
+touch /app/app.jar
+mkdir -p "${POLICY_HOME}"/config/
+cp -f "${CONFIG_FILE}" "${POLICY_HOME}"/config/
+
+$JAVA_HOME/bin/java -Djavax.net.ssl.keyStore="${KEYSTORE}" \
+ -Djavax.net.ssl.keyStorePassword="${KEYSTORE_PASSWD}" \
+ -Djavax.net.ssl.trustStore="${TRUSTSTORE}" \
+ -Djavax.net.ssl.trustStorePassword="${TRUSTSTORE_PASSWD}" \
+ -jar /app/app.jar \
+ --participant.file="${POLICY_HOME}/config/PolicyParticipantParameters.json"
diff --git a/packages/policy-clamp-tarball/pom.xml b/packages/policy-clamp-tarball/pom.xml
new file mode 100644
index 000000000..559dbaa4d
--- /dev/null
+++ b/packages/policy-clamp-tarball/pom.xml
@@ -0,0 +1,75 @@
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 2021 Nordix Foundation.
+ ================================================================================
+ 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.
+
+ SPDX-License-Identifier: Apache-2.0
+ ============LICENSE_END=========================================================
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.policy.clamp</groupId>
+ <artifactId>clamp-packages</artifactId>
+ <version>6.1.2-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>policy-clamp-tarball</artifactId>
+ <name>${project.artifactId}</name>
+ <description>[${project.parent.artifactId}]</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.onap.policy.clamp</groupId>
+ <artifactId>policy-clamp-runtime-controlloop</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.clamp.participant</groupId>
+ <artifactId>policy-clamp-participant-impl-policy</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.policy.clamp.participant</groupId>
+ <artifactId>policy-clamp-participant-impl-dcae</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>generate-complete-tar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/package/tarball/assembly.xml</descriptor>
+ </descriptors>
+ <finalName>${project.artifactId}-${project.version}</finalName>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/packages/policy-clamp-tarball/src/main/package/tarball/assembly.xml b/packages/policy-clamp-tarball/src/main/package/tarball/assembly.xml
new file mode 100644
index 000000000..6e8cd454a
--- /dev/null
+++ b/packages/policy-clamp-tarball/src/main/package/tarball/assembly.xml
@@ -0,0 +1,62 @@
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 2021 Nordix Foundation.
+ ================================================================================
+ 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.
+
+ SPDX-License-Identifier: Apache-2.0
+ ============LICENSE_END=========================================================
+-->
+
+<assembly>
+ <id>tarball</id>
+ <formats>
+ <format>tar.gz</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <dependencySets>
+ <dependencySet>
+ <useProjectArtifact>true</useProjectArtifact>
+ <outputDirectory>${file.separator}lib</outputDirectory>
+ <unpack>false</unpack>
+ <scope>runtime</scope>
+ <includes>
+ <include>*:jar</include>
+ </includes>
+ </dependencySet>
+ </dependencySets>
+ <fileSets>
+ <fileSet>
+ <directory>${project.basedir}/src/main/resources/etc
+ </directory>
+ <includes>
+ <include>*.json</include>
+ <include>*.xml</include>
+ </includes>
+ <outputDirectory>${file.separator}etc</outputDirectory>
+ <lineEnding>unix</lineEnding>
+ <excludes>
+ <exclude>*.formatted</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet>
+ <directory>${project.basedir}/src/main/resources/etc/ssl
+ </directory>
+ <includes>
+ <include>policy*</include>
+ </includes>
+ <outputDirectory>${file.separator}etc${file.separator}ssl</outputDirectory>
+ <lineEnding>keep</lineEnding>
+ </fileSet>
+ </fileSets>
+</assembly>
diff --git a/packages/policy-clamp-tarball/src/main/resources/etc/ClRuntimeParameters.json b/packages/policy-clamp-tarball/src/main/resources/etc/ClRuntimeParameters.json
new file mode 100644
index 000000000..5726fa54d
--- /dev/null
+++ b/packages/policy-clamp-tarball/src/main/resources/etc/ClRuntimeParameters.json
@@ -0,0 +1,53 @@
+{
+ "name": "ControlLoopRuntimeGroup",
+ "restServerParameters": {
+ "host": "0.0.0.0",
+ "port": 6969,
+ "userName": "healthcheck",
+ "password": "zb!XztG34",
+ "https": false,
+ "aaf": false
+ },
+ "participantParameters": {
+ "heartBeatMs": 120000,
+ "updateParameters": {
+ "maxRetryCount": 1,
+ "maxWaitMs": 30000
+ },
+ "stateChangeParameters": {
+ "maxRetryCount": 1,
+ "maxWaitMs": 30000
+ }
+ },
+ "databaseProviderParameters": {
+ "name": "PolicyProviderParameterGroup",
+ "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl",
+ "databaseDriver": "org.mariadb.jdbc.Driver",
+ "databaseUrl": "jdbc:mariadb://localhost:3306/controlloop",
+ "databaseUser": "policy",
+ "databasePassword": "P01icY",
+ "persistenceUnit": "CommissioningMariaDb"
+ },
+ "topicParameterGroup": {
+ "topicSources": [
+ {
+ "topic": "POLICY-CLRUNTIME-PARTICIPANT",
+ "servers": [ "message-router" ],
+ "topicCommInfrastructure": "dmaap",
+ "fetchTimeout": 15000
+ }
+ ],
+ "topicSinks": [
+ {
+ "topic": "POLICY-CLRUNTIME-PARTICIPANT",
+ "servers": [ "message-router" ],
+ "topicCommInfrastructure": "dmaap"
+ },
+ {
+ "topic": "POLICY-NOTIFICATION",
+ "servers": [ "message-router" ],
+ "topicCommInfrastructure": "dmaap"
+ }
+ ]
+ }
+}
diff --git a/packages/policy-clamp-tarball/src/main/resources/etc/DcaeParticipantParameters.json b/packages/policy-clamp-tarball/src/main/resources/etc/DcaeParticipantParameters.json
new file mode 100644
index 000000000..f3ff62325
--- /dev/null
+++ b/packages/policy-clamp-tarball/src/main/resources/etc/DcaeParticipantParameters.json
@@ -0,0 +1,70 @@
+{
+ "name": "ControlLoopParticipantDcae",
+ "clampClientParameters": {
+ "clientName": "Clamp",
+ "hostname": "0.0.0.0",
+ "port": 8443,
+ "userName": "admin",
+ "password": "password",
+ "useHttps": true,
+ "allowSelfSignedCerts": false
+ },
+ "consulClientParameters": {
+ "clientName": "Consul",
+ "hostname": "consul",
+ "port": 31321,
+ "userName": "admin",
+ "password": "password",
+ "useHttps": false
+ },
+ "intermediaryParameters": {
+ "name": "Participant parameters",
+ "reportingTimeInterval": 120000,
+ "description": "Participant Description",
+ "participantId": {
+ "name": "DCAEParticipant0",
+ "version": "1.0.0"
+ },
+ "participantType": {
+ "name": "org.onap.dcae.controlloop.DCAEMicroserviceControlLoopParticipant",
+ "version": "2.3.4"
+ },
+ "clampControlLoopTopics": {
+ "topicSources": [
+ {
+ "topic": "POLICY-CLRUNTIME-PARTICIPANT",
+ "servers": [
+ "message-router"
+ ],
+ "topicCommInfrastructure": "dmaap",
+ "fetchTimeout": 15000
+ }
+ ],
+ "topicSinks": [
+ {
+ "topic": "POLICY-CLRUNTIME-PARTICIPANT",
+ "servers": [
+ "message-router"
+ ],
+ "topicCommInfrastructure": "dmaap"
+ },
+ {
+ "topic": "POLICY-NOTIFICATION",
+ "servers": [
+ "message-router"
+ ],
+ "topicCommInfrastructure": "dmaap"
+ }
+ ]
+ }
+ },
+ "databaseProviderParameters": {
+ "name": "PolicyProviderParameterGroup",
+ "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl",
+ "databaseDriver": "org.mariadb.jdbc.Driver",
+ "databaseUrl": "jdbc:mariadb://mariadb:3306/policyadmin",
+ "databaseUser": "policy_user",
+ "databasePassword": "policy_user",
+ "persistenceUnit": "PolicyMariaDb"
+ }
+}
diff --git a/packages/policy-clamp-tarball/src/main/resources/etc/PolicyParticipantParameters.json b/packages/policy-clamp-tarball/src/main/resources/etc/PolicyParticipantParameters.json
new file mode 100644
index 000000000..e2eb067d9
--- /dev/null
+++ b/packages/policy-clamp-tarball/src/main/resources/etc/PolicyParticipantParameters.json
@@ -0,0 +1,76 @@
+{
+ "name":"ParticipantParameterGroup",
+ "participantStatusParameters":{
+ "timeIntervalMs":10000,
+ "description":"Participant Status",
+ "participantId":{
+ "name": "PolicyParticipant0",
+ "version":"1.0.0"
+ },
+ "participantType":{
+ "name": "org.onap.policy.controlloop.PolicyControlLoopParticipant",
+ "version":"2.3.1"
+ },
+ "participantDefinition":{
+ "name": "org.onap.policy.controlloop.PolicyControlLoopParticipant",
+ "version":"2.3.1"
+ }
+ },
+ "intermediaryParameters": {
+ "name": "Participant parameters",
+ "reportingTimeInterval": 120000,
+ "description": "Participant Description",
+ "participantId": {
+ "name": "PolicyParticipant0",
+ "version": "1.0.0"
+ },
+ "participantType": {
+ "name": "org.onap.policy.controlloop.PolicyControlLoopParticipant",
+ "version": "2.3.1"
+ },
+ "clampControlLoopTopics": {
+ "topicSources": [
+ {
+ "topic": "POLICY-CLRUNTIME-PARTICIPANT",
+ "servers": [
+ "message-router"
+ ],
+ "topicCommInfrastructure": "dmaap",
+ "fetchTimeout": 15000
+ }
+ ],
+ "topicSinks": [
+ {
+ "topic": "POLICY-CLRUNTIME-PARTICIPANT",
+ "servers": [
+ "message-router"
+ ],
+ "topicCommInfrastructure": "dmaap"
+ },
+ {
+ "topic": "POLICY-NOTIFICATION",
+ "servers": [
+ "message-router"
+ ],
+ "topicCommInfrastructure": "dmaap"
+ },
+ {
+ "topic": "POLICY-NOTIFICATION",
+ "servers": [
+ "message-router"
+ ],
+ "topicCommInfrastructure": "dmaap"
+ }
+ ]
+ }
+ },
+ "databaseProviderParameters": {
+ "name": "PolicyProviderParameterGroup",
+ "implementation": "org.onap.policy.models.provider.impl.DatabasePolicyModelsProviderImpl",
+ "databaseDriver": "org.mariadb.jdbc.Driver",
+ "databaseUrl": "jdbc:mariadb://mariadb:3306/policyadmin",
+ "databaseUser": "policy_user",
+ "databasePassword": "policy_user",
+ "persistenceUnit": "PolicyMariaDb"
+ }
+}
diff --git a/packages/policy-clamp-tarball/src/main/resources/etc/logback-default.xml b/packages/policy-clamp-tarball/src/main/resources/etc/logback-default.xml
new file mode 100644
index 000000000..33446c543
--- /dev/null
+++ b/packages/policy-clamp-tarball/src/main/resources/etc/logback-default.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 2016-2018 Ericsson. 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.
+
+ SPDX-License-Identifier: Apache-2.0
+ ============LICENSE_END=========================================================
+-->
+
+<configuration scan="true" scanPeriod="30 seconds" debug="false">
+ <statusListener class="ch.qos.logback.core.status.NopStatusListener" />
+
+ <contextName>Clamp</contextName>
+ <property name="VAR_LOG" value="/var/log/onap/policy/clamp/" />
+
+ <!-- USE FOR STD OUT ONLY -->
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <Pattern>%d %contextName [%t] %level %logger{36} - %msg%n</Pattern>
+ </encoder>
+ </appender>
+
+ <root level="info">
+ <appender-ref ref="STDOUT" />
+ </root>
+
+ <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+ <file>${VAR_LOG}/clamp.log</file>
+ <encoder>
+ <pattern>%d %-5relative [procId=${processId}] [%thread] %-5level
+ %logger{26} - %msg %n %ex{full}</pattern>
+ </encoder>
+ </appender>
+
+ <logger name="org.onap.policy.clamp" level="info" additivity="false">
+ <appender-ref ref="STDOUT" />
+ <appender-ref ref="FILE" />
+ </logger>
+
+</configuration>
diff --git a/packages/policy-clamp-tarball/src/main/resources/etc/logback.xml b/packages/policy-clamp-tarball/src/main/resources/etc/logback.xml
new file mode 100644
index 000000000..781861f58
--- /dev/null
+++ b/packages/policy-clamp-tarball/src/main/resources/etc/logback.xml
@@ -0,0 +1,194 @@
+<!--
+ ============LICENSE_START=======================================================
+ policy-clamp
+ ================================================================================
+ Copyright (C) 2021 Nordix Foundation.
+ ================================================================================
+ 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=========================================================
+ -->
+
+<configuration scan="true" scanPeriod="30 seconds" debug="false">
+
+ <property name="logDir" value="${POLICY_LOGS}" />
+
+ <property name="errorLog" value="error" />
+ <property name="debugLog" value="debug" />
+ <property name="networkLog" value="network" />
+
+ <property name="metricLog" value="metric" />
+ <property name="transactionLog" value="audit" />
+
+ <property name="debugPattern"
+ value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n" />
+ <property name="errorPattern" value="${debugPattern}" />
+ <property name="networkPattern"
+ value="[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n" />
+
+ <property
+ name="mpPreamble"
+ value="%X{RequestID}|%X{InvocationID}|%X{ServiceName}|%X{PartnerName}" />
+
+ <property
+ name="mpTime"
+ value="%X{BeginTimestamp}|%X{EndTimestamp}|%X{ElapsedTime}" />
+
+ <property
+ name="mpLine1"
+ value="%X{ServiceInstanceID}|%X{VirtualServerName}|%X{StatusCode}|%X{ResponseCode}|%X{ResponseDescription}" />
+
+ <property
+ name="mpLine2"
+ value="%X{InstanceUUID}|%X{Severity}|%X{TargetEntity}|%X{TargetServiceName}|%X{Server}|%X{ServerIPAddress}" />
+
+ <property
+ name="mpLine3"
+ value="%X{ServerFQDN}|%X{ClientIPAddress}|%X{ProcessKey}|%X{RemoteHost}|%X{AlertSeverity}" />
+
+ <property
+ name="mpLine4"
+ value="%X{TargetVirtualEntity}|%level|%thread| %msg%n" />
+
+
+ <property name="metricPattern"
+ value="{$mpPreamble}|{$mpTime}|{$mpLine1}|{$mpLine2}|{$mpLine3}|$mpLine4" />
+
+ <property name="transactionPattern" value="${metricPattern}" />
+
+ <appender name="ErrorOut"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDir}/${errorLog}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${logDir}/${errorLog}.%d{yyyy-MM-dd}.%i.log.zip
+ </fileNamePattern>
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>30</maxHistory>
+ <totalSizeCap>10GB</totalSizeCap>
+ </rollingPolicy>
+ <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
+ <level>WARN</level>
+ </filter>
+ <encoder>
+ <pattern>${errorPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="AsyncErrorOut"
+ class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="ErrorOut" />
+ </appender>
+
+ <appender name="DebugOut"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDir}/${debugLog}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${logDir}/${debugLog}.%d{yyyy-MM-dd}.%i.log.zip
+ </fileNamePattern>
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>30</maxHistory>
+ <totalSizeCap>10GB</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${debugPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="AsyncDebugOut"
+ class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="DebugOut" />
+ </appender>
+
+ <appender name="NetworkOut"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDir}/${networkLog}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${logDir}/${networkLog}.%d{yyyy-MM-dd}.%i.log.zip
+ </fileNamePattern>
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>30</maxHistory>
+ <totalSizeCap>10GB</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${networkPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="AsyncNetworkOut"
+ class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="NetworkOut" />
+ </appender>
+
+ <appender name="MetricOut"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDir}/${metricLog}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${logDir}/${metricLog}.%d{yyyy-MM-dd}.%i.log.zip
+ </fileNamePattern>
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>30</maxHistory>
+ <totalSizeCap>10GB</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${metricPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="AsyncMetricOut"
+ class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="MetricOut" />
+ </appender>
+
+ <appender name="TransactionOut"
+ class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${logDir}/${transactionLog}.log</file>
+ <rollingPolicy
+ class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
+ <fileNamePattern>${logDir}/${transactionLog}.%d{yyyy-MM-dd}.%i.log.zip
+ </fileNamePattern>
+ <maxFileSize>50MB</maxFileSize>
+ <maxHistory>30</maxHistory>
+ <totalSizeCap>10GB</totalSizeCap>
+ </rollingPolicy>
+ <encoder>
+ <pattern>${transactionPattern}</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="AsyncTransactionOut"
+ class="ch.qos.logback.classic.AsyncAppender">
+ <appender-ref ref="TransactionOut" />
+ </appender>
+
+ <logger name="network" level="INFO" additivity="false">
+ <appender-ref ref="AsyncNetworkOut" />
+ </logger>
+
+ <logger name="org.eclipse.jetty.server.RequestLog" level="info"
+ additivity="false">
+ <appender-ref ref="AsyncNetworkOut" />
+ </logger>
+
+ <logger name="org.eclipse.jetty" level="ERROR" />
+
+ <root level="INFO">
+ <appender-ref ref="AsyncDebugOut" />
+ <appender-ref ref="AsyncErrorOut" />
+ <appender-ref ref="AsyncMetricOut" />
+ <appender-ref ref="AsyncTransactionOut" />
+ </root>
+
+</configuration>
diff --git a/packages/policy-clamp-tarball/src/main/resources/etc/ssl/policy-truststore b/packages/policy-clamp-tarball/src/main/resources/etc/ssl/policy-truststore
new file mode 100644
index 000000000..8834ac257
--- /dev/null
+++ b/packages/policy-clamp-tarball/src/main/resources/etc/ssl/policy-truststore
Binary files differ
diff --git a/packages/pom.xml b/packages/pom.xml
new file mode 100644
index 000000000..4f5a0849e
--- /dev/null
+++ b/packages/pom.xml
@@ -0,0 +1,61 @@
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 2021 Nordix Foundation.
+ ================================================================================
+ 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.
+
+ SPDX-License-Identifier: Apache-2.0
+ ============LICENSE_END=========================================================
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.onap.policy.clamp</groupId>
+ <artifactId>policy-clamp</artifactId>
+ <version>6.1.2-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>clamp-packages</artifactId>
+ <packaging>pom</packaging>
+
+ <name>${project.artifactId}</name>
+ <description>[${project.parent.artifactId}] packaging</description>
+
+ <properties>
+ <!-- There is no code in this sub-module, only holds interfaces. So skip sonar. -->
+ <sonar.skip>true</sonar.skip>
+ </properties>
+
+ <profiles>
+ <profile>
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <modules>
+ <module>policy-clamp-tarball</module>
+ </modules>
+ </profile>
+ <profile>
+ <id>docker</id>
+ <modules>
+ <module>policy-clamp-tarball</module>
+ <module>policy-clamp-docker</module>
+ </modules>
+ <properties>
+ <docker.skip.push>false</docker.skip.push>
+ </properties>
+ </profile>
+ </profiles>
+</project>
+
diff --git a/participant/participant-impl/participant-impl-dcae/src/test/resources/parameters/Unreadable.json b/participant/participant-impl/participant-impl-dcae/src/test/resources/parameters/Unreadable.json
index 581ce8f4f..b918defe4 100644
--- a/participant/participant-impl/participant-impl-dcae/src/test/resources/parameters/Unreadable.json
+++ b/participant/participant-impl/participant-impl-dcae/src/test/resources/parameters/Unreadable.json
@@ -55,27 +55,7 @@
"topicCommInfrastructure": "dmaap"
}
]
- },
- "healthCheckRestClientParameters": [
- {
- "clientName": "api",
- "hostname": "policy-api",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "policy/api/v1/healthcheck"
- },
- {
- "clientName": "distribution",
- "hostname": "policy-distribution",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "healthcheck"
- }
- ]
+ }
}
diff --git a/participant/participant-impl/participant-impl-policy/src/test/resources/parameters/Unreadable.json b/participant/participant-impl/participant-impl-policy/src/test/resources/parameters/Unreadable.json
index efbfbe29f..e33409f82 100644
--- a/participant/participant-impl/participant-impl-policy/src/test/resources/parameters/Unreadable.json
+++ b/participant/participant-impl/participant-impl-policy/src/test/resources/parameters/Unreadable.json
@@ -47,27 +47,7 @@
"topicCommInfrastructure": "dmaap"
}
]
- },
- "healthCheckRestClientParameters": [
- {
- "clientName": "api",
- "hostname": "policy-api",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "policy/api/v1/healthcheck"
- },
- {
- "clientName": "distribution",
- "hostname": "policy-distribution",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "healthcheck"
- }
- ]
+ }
}
diff --git a/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/Unreadable.json b/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/Unreadable.json
index f11bd8c95..fc36b49e4 100644
--- a/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/Unreadable.json
+++ b/participant/participant-impl/participant-impl-simulator/src/test/resources/parameters/Unreadable.json
@@ -55,27 +55,7 @@
"topicCommInfrastructure": "dmaap"
}
]
- },
- "healthCheckRestClientParameters": [
- {
- "clientName": "api",
- "hostname": "policy-api",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "policy/api/v1/healthcheck"
- },
- {
- "clientName": "distribution",
- "hostname": "policy-distribution",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "healthcheck"
- }
- ]
+ }
}
diff --git a/pom.xml b/pom.xml
index d9640b45d..b9d0efd98 100644
--- a/pom.xml
+++ b/pom.xml
@@ -137,5 +137,13 @@
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ </dependency>
</dependencies>
</project>
diff --git a/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/main/parameters/ClRuntimeParameterGroup.java b/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/main/parameters/ClRuntimeParameterGroup.java
index 4c99b8e57..ba25a6dad 100644
--- a/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/main/parameters/ClRuntimeParameterGroup.java
+++ b/runtime-controlloop/src/main/java/org/onap/policy/clamp/controlloop/runtime/main/parameters/ClRuntimeParameterGroup.java
@@ -42,7 +42,6 @@ public class ClRuntimeParameterGroup extends ParameterGroupImpl {
private PolicyModelsProviderParameters databaseProviderParameters;
private ParticipantParameters participantParameters;
private TopicParameterGroup topicParameterGroup;
- private List<BusTopicParams> healthCheckRestClientParameters;
/**
* Create the Control Loop parameter group.
diff --git a/runtime-controlloop/src/test/resources/parameters/InstantiationConfigParametersStd.json b/runtime-controlloop/src/test/resources/parameters/InstantiationConfigParametersStd.json
index 7682a1812..410c35684 100644
--- a/runtime-controlloop/src/test/resources/parameters/InstantiationConfigParametersStd.json
+++ b/runtime-controlloop/src/test/resources/parameters/InstantiationConfigParametersStd.json
@@ -55,25 +55,5 @@
"topicCommInfrastructure": "dmaap"
}
]
- },
- "healthCheckRestClientParameters": [
- {
- "clientName": "api",
- "hostname": "policy-api",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "policy/api/v1/healthcheck"
- },
- {
- "clientName": "distribution",
- "hostname": "policy-distribution",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "healthcheck"
- }
- ]
+ }
}
diff --git a/runtime-controlloop/src/test/resources/parameters/MinimumParametersH2.json b/runtime-controlloop/src/test/resources/parameters/MinimumParametersH2.json
index f784dcd16..cce0ab5ee 100644
--- a/runtime-controlloop/src/test/resources/parameters/MinimumParametersH2.json
+++ b/runtime-controlloop/src/test/resources/parameters/MinimumParametersH2.json
@@ -37,23 +37,5 @@
"servers" : [ "message-router" ],
"topicCommInfrastructure" : "dmaap"
}]
- },
- "healthCheckRestClientParameters":[{
- "clientName": "api",
- "hostname": "policy-api",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "policy/api/v1/healthcheck"
- },
- {
- "clientName": "distribution",
- "hostname": "policy-distribution",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "healthcheck"
- }]
+ }
}
diff --git a/runtime-controlloop/src/test/resources/parameters/TestParameters.json b/runtime-controlloop/src/test/resources/parameters/TestParameters.json
index c3be762d6..9fbcfb28c 100644
--- a/runtime-controlloop/src/test/resources/parameters/TestParameters.json
+++ b/runtime-controlloop/src/test/resources/parameters/TestParameters.json
@@ -55,25 +55,5 @@
"topicCommInfrastructure": "dmaap"
}
]
- },
- "healthCheckRestClientParameters": [
- {
- "clientName": "api",
- "hostname": "policy-api",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "policy/api/v1/healthcheck"
- },
- {
- "clientName": "distribution",
- "hostname": "policy-distribution",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "healthcheck"
- }
- ]
+ }
}
diff --git a/runtime-controlloop/src/test/resources/parameters/TestParametersMariaDB.json b/runtime-controlloop/src/test/resources/parameters/TestParametersMariaDB.json
index 2c0127b16..529557eab 100644
--- a/runtime-controlloop/src/test/resources/parameters/TestParametersMariaDB.json
+++ b/runtime-controlloop/src/test/resources/parameters/TestParametersMariaDB.json
@@ -55,25 +55,5 @@
"topicCommInfrastructure": "dmaap"
}
]
- },
- "healthCheckRestClientParameters": [
- {
- "clientName": "api",
- "hostname": "policy-api",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "policy/api/v1/healthcheck"
- },
- {
- "clientName": "distribution",
- "hostname": "policy-distribution",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "healthcheck"
- }
- ]
+ }
}
diff --git a/runtime-controlloop/src/test/resources/parameters/Unreadable.json b/runtime-controlloop/src/test/resources/parameters/Unreadable.json
index 3d117f416..1c1e93897 100644
--- a/runtime-controlloop/src/test/resources/parameters/Unreadable.json
+++ b/runtime-controlloop/src/test/resources/parameters/Unreadable.json
@@ -55,24 +55,4 @@
"topicCommInfrastructure": "dmaap"
}
]
- },
- "healthCheckRestClientParameters": [
- {
- "clientName": "api",
- "hostname": "policy-api",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "policy/api/v1/healthcheck"
- },
- {
- "clientName": "distribution",
- "hostname": "policy-distribution",
- "port": 6969,
- "userName": "healthcheck",
- "password": "zb!XztG34",
- "useHttps": true,
- "basePath": "healthcheck"
- }
- ]
+ }
diff --git a/runtime/pom.xml b/runtime/pom.xml
index 1f1a64390..7dda5c6b8 100644
--- a/runtime/pom.xml
+++ b/runtime/pom.xml
@@ -351,16 +351,6 @@
</exclusions>
</dependency>
<dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- <version>1.2.3</version>
- </dependency>
- <dependency>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <version>1.2.3</version>
- </dependency>
- <dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>