From 43098043c4ef31d9d5dead66568d7d9482a6b165 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Tue, 25 Jan 2022 19:55:43 +0000 Subject: Rename TOSCA Control Loop to ACM This commit renames the TOSCA Control Loop functionality in CLAMP to Automation Composition Management. This review is a direct renaming review and, as everything is renamed together it is large. Issue-ID: POLICY-3939 Change-Id: I28f0a6dd889bf3570a4c1365ae9e71fc58db6d6c Signed-off-by: liamfallon --- packages/policy-clamp-docker/pom.xml | 23 +++---- .../src/main/docker/AcmRuntimeDockerfile | 53 ++++++++++++++++ .../src/main/docker/ClRuntimeDockerfile | 53 ---------------- .../src/main/docker/HttpParticipantDockerfile | 2 +- .../main/docker/KubernetesParticipantDockerfile | 2 +- .../src/main/docker/PolicyParticipantDockerfile | 2 +- .../src/main/docker/acm-runtime.sh | 71 ++++++++++++++++++++++ .../src/main/docker/controlloop-runtime.sh | 71 ---------------------- 8 files changed, 137 insertions(+), 140 deletions(-) create mode 100644 packages/policy-clamp-docker/src/main/docker/AcmRuntimeDockerfile delete mode 100644 packages/policy-clamp-docker/src/main/docker/ClRuntimeDockerfile create mode 100644 packages/policy-clamp-docker/src/main/docker/acm-runtime.sh delete mode 100644 packages/policy-clamp-docker/src/main/docker/controlloop-runtime.sh (limited to 'packages/policy-clamp-docker') diff --git a/packages/policy-clamp-docker/pom.xml b/packages/policy-clamp-docker/pom.xml index 08511e03f..6415d2d79 100644 --- a/packages/policy-clamp-docker/pom.xml +++ b/packages/policy-clamp-docker/pom.xml @@ -92,10 +92,10 @@ - onap/policy-clamp-cl-runtime + onap/policy-clamp-runtime-acm try - ClRuntimeDockerfile + AcmRuntimeDockerfile ${project.version} ${project.version}-${maven.build.timestamp} @@ -109,11 +109,11 @@ org.onap.policy.clamp:policy-clamp-tarball /lib - policy-controlloop-runtime.tar.gz + policy-clamp-runtime-acm.tar.gz - org.onap.policy.clamp:policy-clamp-runtime-controlloop + org.onap.policy.clamp:policy-clamp-runtime-acm app.jar @@ -123,8 +123,8 @@ - onap/policy-clamp-cl-pf-ppnt - onap-policy-clamp-cl-pf-ppnt + onap/policy-clamp-ac-pf-ppnt + onap-policy-clamp-ac-pf-ppnt try PolicyParticipantDockerfile @@ -155,8 +155,8 @@ - onap/policy-clamp-cl-k8s-ppnt - onap-policy-clamp-cl-k8s-ppnt + onap/policy-clamp-ac-k8s-ppnt + onap-policy-clamp-ac-k8s-ppnt try KubernetesParticipantDockerfile @@ -187,8 +187,8 @@ - onap/policy-clamp-cl-http-ppnt - onap-policy-clamp-cl-http-ppnt + onap/policy-clamp-ac-http-ppnt + onap-policy-clamp-ac-http-ppnt try HttpParticipantDockerfile @@ -248,9 +248,6 @@ build push - - onap/policy-clamp - diff --git a/packages/policy-clamp-docker/src/main/docker/AcmRuntimeDockerfile b/packages/policy-clamp-docker/src/main/docker/AcmRuntimeDockerfile new file mode 100644 index 000000000..021a58676 --- /dev/null +++ b/packages/policy-clamp-docker/src/main/docker/AcmRuntimeDockerfile @@ -0,0 +1,53 @@ +#------------------------------------------------------------------------------- +# ============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 the CLAMP ACM runtime on Java 11 or better in alpine +# +FROM onap/policy-jre-alpine:2.4.0 + +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-clamp-runtime-acm.tar.gz /packages + +RUN tar xvfz /packages/policy-clamp-runtime-acm.tar.gz --directory $POLICY_HOME && \ + rm /packages/policy-clamp-runtime-acm.tar.gz + +WORKDIR $POLICY_HOME +COPY acm-runtime.sh bin/. +COPY /maven/app.jar /app + +RUN chown -R policy:policy * && \ + chmod 755 bin/*.sh && \ + chown -R policy:policy /app + +EXPOSE 6969 + +USER policy +WORKDIR $POLICY_HOME/bin +ENTRYPOINT [ "./acm-runtime.sh" ] diff --git a/packages/policy-clamp-docker/src/main/docker/ClRuntimeDockerfile b/packages/policy-clamp-docker/src/main/docker/ClRuntimeDockerfile deleted file mode 100644 index b66fddcc4..000000000 --- a/packages/policy-clamp-docker/src/main/docker/ClRuntimeDockerfile +++ /dev/null @@ -1,53 +0,0 @@ -#------------------------------------------------------------------------------- -# ============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.4.0 - -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-controlloop-runtime.tar.gz /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/. -COPY /maven/app.jar /app - -RUN chown -R policy:policy * && \ - chmod 755 bin/*.sh && \ - chown -R policy:policy /app - -EXPOSE 6969 - -USER policy -WORKDIR $POLICY_HOME/bin -ENTRYPOINT [ "./controlloop-runtime.sh" ] diff --git a/packages/policy-clamp-docker/src/main/docker/HttpParticipantDockerfile b/packages/policy-clamp-docker/src/main/docker/HttpParticipantDockerfile index 2497f5d3b..b6f2c44eb 100644 --- a/packages/policy-clamp-docker/src/main/docker/HttpParticipantDockerfile +++ b/packages/policy-clamp-docker/src/main/docker/HttpParticipantDockerfile @@ -19,7 +19,7 @@ #------------------------------------------------------------------------------- # -# Docker file to build an image that runs CLAMP on Java 11 or better in alpine +# Docker file to build an image that runs the CLAMP ACM HTTP Participant on Java 11 or better in alpine # FROM onap/policy-jre-alpine:2.4.0 diff --git a/packages/policy-clamp-docker/src/main/docker/KubernetesParticipantDockerfile b/packages/policy-clamp-docker/src/main/docker/KubernetesParticipantDockerfile index e7fc89021..688e68d09 100644 --- a/packages/policy-clamp-docker/src/main/docker/KubernetesParticipantDockerfile +++ b/packages/policy-clamp-docker/src/main/docker/KubernetesParticipantDockerfile @@ -19,7 +19,7 @@ #------------------------------------------------------------------------------- # -# Docker file to build an image that runs CLAMP on Java 11 or better in alpine +# Docker file to build an image that runs the CLAMP ACM K8S Participant on Java 11 or better in alpine # FROM onap/policy-jre-alpine:2.4.0 diff --git a/packages/policy-clamp-docker/src/main/docker/PolicyParticipantDockerfile b/packages/policy-clamp-docker/src/main/docker/PolicyParticipantDockerfile index a0d003292..50d4210bf 100644 --- a/packages/policy-clamp-docker/src/main/docker/PolicyParticipantDockerfile +++ b/packages/policy-clamp-docker/src/main/docker/PolicyParticipantDockerfile @@ -19,7 +19,7 @@ #------------------------------------------------------------------------------- # -# Docker file to build an image that runs CLAMP on Java 11 or better in alpine +# Docker file to build an image that runs the CLAMP ACM Policy Framework Participant on Java 11 or better in alpine # FROM onap/policy-jre-alpine:2.4.0 diff --git a/packages/policy-clamp-docker/src/main/docker/acm-runtime.sh b/packages/policy-clamp-docker/src/main/docker/acm-runtime.sh new file mode 100644 index 000000000..84550de82 --- /dev/null +++ b/packages/policy-clamp-docker/src/main/docker/acm-runtime.sh @@ -0,0 +1,71 @@ +#!/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/AcRuntimeParameters.yaml" +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/AcRuntimeParameters.yaml + +$JAVA_HOME/bin/java -Dserver.ssl.enabled="true" \ + -Dserver.ssl.keyStore="${KEYSTORE}" \ + -Dserver.ssl.keyStorePassword="${KEYSTORE_PASSWD}" \ + -Djavax.net.ssl.trustStore="${TRUSTSTORE}" \ + -Djavax.net.ssl.trustStorePassword="${TRUSTSTORE_PASSWD}" \ + -Dcom.sun.management.jmxremote.rmi.port=9090 \ + -Dcom.sun.management.jmxremote=true \ + -Dcom.sun.management.jmxremote.port=9090 \ + -Dcom.sun.management.jmxremote.ssl=false \ + -Dcom.sun.management.jmxremote.authenticate=false \ + -Dcom.sun.management.jmxremote.local.only=false \ + -jar /app/app.jar \ + --spring.config.location="${POLICY_HOME}/config/AcRuntimeParameters.yaml" diff --git a/packages/policy-clamp-docker/src/main/docker/controlloop-runtime.sh b/packages/policy-clamp-docker/src/main/docker/controlloop-runtime.sh deleted file mode 100644 index c428fd553..000000000 --- a/packages/policy-clamp-docker/src/main/docker/controlloop-runtime.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/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.yaml" -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/ClRuntimeParameters.yaml - -$JAVA_HOME/bin/java -Dserver.ssl.enabled="true" \ - -Dserver.ssl.keyStore="${KEYSTORE}" \ - -Dserver.ssl.keyStorePassword="${KEYSTORE_PASSWD}" \ - -Djavax.net.ssl.trustStore="${TRUSTSTORE}" \ - -Djavax.net.ssl.trustStorePassword="${TRUSTSTORE_PASSWD}" \ - -Dcom.sun.management.jmxremote.rmi.port=9090 \ - -Dcom.sun.management.jmxremote=true \ - -Dcom.sun.management.jmxremote.port=9090 \ - -Dcom.sun.management.jmxremote.ssl=false \ - -Dcom.sun.management.jmxremote.authenticate=false \ - -Dcom.sun.management.jmxremote.local.only=false \ - -jar /app/app.jar \ - --spring.config.location="${POLICY_HOME}/config/ClRuntimeParameters.yaml" -- cgit 1.2.3-korg