From 2e787d86ed62467f8b7a4043581a32ad123630ca Mon Sep 17 00:00:00 2001 From: Aleks Seovic Date: Wed, 27 Jan 2021 17:24:06 -0500 Subject: [PATCH 1/3] Switch to Jib to create Docker image that works with Coherence Operator 3.x --- .../roberts-coherence/Dockerfile | 33 ------------- .../roberts-books/roberts-coherence/build.sh | 4 +- .../roberts-books/roberts-coherence/pom.xml | 48 ++++++++++++++++++- .../roberts-coherence/src/main/k8s/app.yaml | 34 +++++++++++++ ...-config.xml => coherence-cache-config.xml} | 0 .../{books-pof-config.xml => pof-config.xml} | 0 6 files changed, 81 insertions(+), 38 deletions(-) delete mode 100644 bobs-books/roberts-books/roberts-coherence/Dockerfile create mode 100644 bobs-books/roberts-books/roberts-coherence/src/main/k8s/app.yaml rename bobs-books/roberts-books/roberts-coherence/src/main/resources/{books-cache-config.xml => coherence-cache-config.xml} (100%) rename bobs-books/roberts-books/roberts-coherence/src/main/resources/{books-pof-config.xml => pof-config.xml} (100%) diff --git a/bobs-books/roberts-books/roberts-coherence/Dockerfile b/bobs-books/roberts-books/roberts-coherence/Dockerfile deleted file mode 100644 index 692c6d8..0000000 --- a/bobs-books/roberts-books/roberts-coherence/Dockerfile +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2020, Oracle and/or its affiliates. -# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. - -FROM container-registry.oracle.com/os/oraclelinux:7-slim@sha256:fcc6f54bb01fc83319990bf5fa1b79f1dec93cbb87db3c5a8884a5a44148e7bb - -RUN yum update -y \ - && yum-config-manager --save --setopt=ol7_ociyum_config.skip_if_unavailable=true \ - && yum -y install tar gzip \ - && yum clean all; rm -rf /var/cache/yum \ - && mkdir -p /app/lib \ - && mkdir -p /app/conf \ - && mkdir -p /license - -ENV JAVA_HOME=/usr/java -ENV PATH $JAVA_HOME/bin:$PATH -ARG JDK_BINARY="${JDK_BINARY:-jdk-8u261-linux-x64.tar.gz}" -COPY ${JDK_BINARY} jdk.tar.gz -ENV JDK_DOWNLOAD_SHA256=5a04e01a091f6b1ed9c0b801be4fd10689af07eeb9e27f012c9aa3af9948ea34 - -RUN set -eux \ - echo "Checking JDK hash"; \ - echo "${JDK_DOWNLOAD_SHA256} *jdk.tar.gz" | sha256sum --check -; \ - echo "Installing JDK"; \ - mkdir -p "$JAVA_HOME"; \ - tar xzf jdk.tar.gz --directory "${JAVA_HOME}" --strip-components=1; \ - rm -f jdk.tar.gz; - -COPY target/*.jar /app/lib/ -COPY src/main/resources/books-cache-config.xml /app/conf/ -COPY src/main/resources/books-pof-config.xml /app/conf/ -COPY src/main/resources/books.csv /app/conf/ -COPY LICENSE.txt /license/ -COPY THIRD_PARTY_LICENSES.txt /license/ \ No newline at end of file diff --git a/bobs-books/roberts-books/roberts-coherence/build.sh b/bobs-books/roberts-books/roberts-coherence/build.sh index a845124..3b83d51 100755 --- a/bobs-books/roberts-books/roberts-coherence/build.sh +++ b/bobs-books/roberts-books/roberts-coherence/build.sh @@ -2,7 +2,5 @@ # Copyright (c) 2020, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -TAG=${1:-test} - mvn clean install -docker build -t ghcr.io/verrazzano/example-roberts-coherence:${TAG} . \ No newline at end of file +mvn package -Pdocker diff --git a/bobs-books/roberts-books/roberts-coherence/pom.xml b/bobs-books/roberts-books/roberts-coherence/pom.xml index 789d8fb..b9b392e 100644 --- a/bobs-books/roberts-books/roberts-coherence/pom.xml +++ b/bobs-books/roberts-books/roberts-coherence/pom.xml @@ -17,7 +17,7 @@ UTF-8 UTF-8 -Dfile.encoding=UTF-8 - 12.2.1-4-0 + 20.12 4.1.43.Final 4.5.10 @@ -103,7 +103,7 @@ - com.oracle.coherence + com.oracle.coherence.ce coherence ${version.lib.coherence} @@ -113,4 +113,48 @@ ${version.lib.httpclient} + + + + docker + + + + com.google.cloud.tools + jib-maven-plugin + 2.7.1 + + + + gcr.io/distroless/java:11 + + + + ghcr.io/verrazzano/example-${project.artifactId} + + ${project.version} + + + + com.tangosol.net.DefaultCacheServer + + 9000 + + + packaged + + + + + dockerBuild + + package + + + + + + + + diff --git a/bobs-books/roberts-books/roberts-coherence/src/main/k8s/app.yaml b/bobs-books/roberts-books/roberts-coherence/src/main/k8s/app.yaml new file mode 100644 index 0000000..a0fd620 --- /dev/null +++ b/bobs-books/roberts-books/roberts-coherence/src/main/k8s/app.yaml @@ -0,0 +1,34 @@ +# +# Copyright (c) 2021 Oracle and/or its affiliates. +# +# Licensed under the Universal Permissive License v 1.0 as shown at +# http://oss.oracle.com/licenses/upl. +# +apiVersion: coherence.oracle.com/v1 +kind: Coherence +metadata: + name: roberts-coherence + namespace: bobs-books +spec: + replicas: 3 + image: ghcr.io/verrazzano/example-roberts-coherence:latest + imagePullPolicy: Always + env: + - name: BACKEND_PORT + value: "8001" + - name: BACKEND_HOSTNAME + value: bobs-bookstore-cluster-cluster-1.bobs-books.svc.cluster.local + - name: TRACING_HOST + value: "jaeger-collector" + - name: JAEGER_SAMPLER_TYPE + value: "const" + - name: JAEGER_SAMPLER_PARAM + value: "1" + jvm: + memory: + heapSize: 1g + ports: + - name: extend + port: 9000 + service: + name: roberts-coherence-extend \ No newline at end of file diff --git a/bobs-books/roberts-books/roberts-coherence/src/main/resources/books-cache-config.xml b/bobs-books/roberts-books/roberts-coherence/src/main/resources/coherence-cache-config.xml similarity index 100% rename from bobs-books/roberts-books/roberts-coherence/src/main/resources/books-cache-config.xml rename to bobs-books/roberts-books/roberts-coherence/src/main/resources/coherence-cache-config.xml diff --git a/bobs-books/roberts-books/roberts-coherence/src/main/resources/books-pof-config.xml b/bobs-books/roberts-books/roberts-coherence/src/main/resources/pof-config.xml similarity index 100% rename from bobs-books/roberts-books/roberts-coherence/src/main/resources/books-pof-config.xml rename to bobs-books/roberts-books/roberts-coherence/src/main/resources/pof-config.xml From 4e1e795113ffcf112b0c78bd20fcea2cac68e014 Mon Sep 17 00:00:00 2001 From: Aleks Seovic Date: Thu, 28 Jan 2021 00:47:33 -0500 Subject: [PATCH 2/3] Revert "Switch to Jib to create Docker image that works with Coherence Operator 3.x" This reverts commit 2e787d86 --- .../roberts-coherence/Dockerfile | 33 +++++++++++++ .../roberts-books/roberts-coherence/build.sh | 4 +- .../roberts-books/roberts-coherence/pom.xml | 48 +------------------ .../roberts-coherence/src/main/k8s/app.yaml | 34 ------------- ...ache-config.xml => books-cache-config.xml} | 0 .../{pof-config.xml => books-pof-config.xml} | 0 6 files changed, 38 insertions(+), 81 deletions(-) create mode 100644 bobs-books/roberts-books/roberts-coherence/Dockerfile delete mode 100644 bobs-books/roberts-books/roberts-coherence/src/main/k8s/app.yaml rename bobs-books/roberts-books/roberts-coherence/src/main/resources/{coherence-cache-config.xml => books-cache-config.xml} (100%) rename bobs-books/roberts-books/roberts-coherence/src/main/resources/{pof-config.xml => books-pof-config.xml} (100%) diff --git a/bobs-books/roberts-books/roberts-coherence/Dockerfile b/bobs-books/roberts-books/roberts-coherence/Dockerfile new file mode 100644 index 0000000..692c6d8 --- /dev/null +++ b/bobs-books/roberts-books/roberts-coherence/Dockerfile @@ -0,0 +1,33 @@ +# Copyright (c) 2020, Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. + +FROM container-registry.oracle.com/os/oraclelinux:7-slim@sha256:fcc6f54bb01fc83319990bf5fa1b79f1dec93cbb87db3c5a8884a5a44148e7bb + +RUN yum update -y \ + && yum-config-manager --save --setopt=ol7_ociyum_config.skip_if_unavailable=true \ + && yum -y install tar gzip \ + && yum clean all; rm -rf /var/cache/yum \ + && mkdir -p /app/lib \ + && mkdir -p /app/conf \ + && mkdir -p /license + +ENV JAVA_HOME=/usr/java +ENV PATH $JAVA_HOME/bin:$PATH +ARG JDK_BINARY="${JDK_BINARY:-jdk-8u261-linux-x64.tar.gz}" +COPY ${JDK_BINARY} jdk.tar.gz +ENV JDK_DOWNLOAD_SHA256=5a04e01a091f6b1ed9c0b801be4fd10689af07eeb9e27f012c9aa3af9948ea34 + +RUN set -eux \ + echo "Checking JDK hash"; \ + echo "${JDK_DOWNLOAD_SHA256} *jdk.tar.gz" | sha256sum --check -; \ + echo "Installing JDK"; \ + mkdir -p "$JAVA_HOME"; \ + tar xzf jdk.tar.gz --directory "${JAVA_HOME}" --strip-components=1; \ + rm -f jdk.tar.gz; + +COPY target/*.jar /app/lib/ +COPY src/main/resources/books-cache-config.xml /app/conf/ +COPY src/main/resources/books-pof-config.xml /app/conf/ +COPY src/main/resources/books.csv /app/conf/ +COPY LICENSE.txt /license/ +COPY THIRD_PARTY_LICENSES.txt /license/ \ No newline at end of file diff --git a/bobs-books/roberts-books/roberts-coherence/build.sh b/bobs-books/roberts-books/roberts-coherence/build.sh index 3b83d51..a845124 100755 --- a/bobs-books/roberts-books/roberts-coherence/build.sh +++ b/bobs-books/roberts-books/roberts-coherence/build.sh @@ -2,5 +2,7 @@ # Copyright (c) 2020, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. +TAG=${1:-test} + mvn clean install -mvn package -Pdocker +docker build -t ghcr.io/verrazzano/example-roberts-coherence:${TAG} . \ No newline at end of file diff --git a/bobs-books/roberts-books/roberts-coherence/pom.xml b/bobs-books/roberts-books/roberts-coherence/pom.xml index b9b392e..789d8fb 100644 --- a/bobs-books/roberts-books/roberts-coherence/pom.xml +++ b/bobs-books/roberts-books/roberts-coherence/pom.xml @@ -17,7 +17,7 @@ UTF-8 UTF-8 -Dfile.encoding=UTF-8 - 20.12 + 12.2.1-4-0 4.1.43.Final 4.5.10 @@ -103,7 +103,7 @@ - com.oracle.coherence.ce + com.oracle.coherence coherence ${version.lib.coherence} @@ -113,48 +113,4 @@ ${version.lib.httpclient} - - - - docker - - - - com.google.cloud.tools - jib-maven-plugin - 2.7.1 - - - - gcr.io/distroless/java:11 - - - - ghcr.io/verrazzano/example-${project.artifactId} - - ${project.version} - - - - com.tangosol.net.DefaultCacheServer - - 9000 - - - packaged - - - - - dockerBuild - - package - - - - - - - - diff --git a/bobs-books/roberts-books/roberts-coherence/src/main/k8s/app.yaml b/bobs-books/roberts-books/roberts-coherence/src/main/k8s/app.yaml deleted file mode 100644 index a0fd620..0000000 --- a/bobs-books/roberts-books/roberts-coherence/src/main/k8s/app.yaml +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (c) 2021 Oracle and/or its affiliates. -# -# Licensed under the Universal Permissive License v 1.0 as shown at -# http://oss.oracle.com/licenses/upl. -# -apiVersion: coherence.oracle.com/v1 -kind: Coherence -metadata: - name: roberts-coherence - namespace: bobs-books -spec: - replicas: 3 - image: ghcr.io/verrazzano/example-roberts-coherence:latest - imagePullPolicy: Always - env: - - name: BACKEND_PORT - value: "8001" - - name: BACKEND_HOSTNAME - value: bobs-bookstore-cluster-cluster-1.bobs-books.svc.cluster.local - - name: TRACING_HOST - value: "jaeger-collector" - - name: JAEGER_SAMPLER_TYPE - value: "const" - - name: JAEGER_SAMPLER_PARAM - value: "1" - jvm: - memory: - heapSize: 1g - ports: - - name: extend - port: 9000 - service: - name: roberts-coherence-extend \ No newline at end of file diff --git a/bobs-books/roberts-books/roberts-coherence/src/main/resources/coherence-cache-config.xml b/bobs-books/roberts-books/roberts-coherence/src/main/resources/books-cache-config.xml similarity index 100% rename from bobs-books/roberts-books/roberts-coherence/src/main/resources/coherence-cache-config.xml rename to bobs-books/roberts-books/roberts-coherence/src/main/resources/books-cache-config.xml diff --git a/bobs-books/roberts-books/roberts-coherence/src/main/resources/pof-config.xml b/bobs-books/roberts-books/roberts-coherence/src/main/resources/books-pof-config.xml similarity index 100% rename from bobs-books/roberts-books/roberts-coherence/src/main/resources/pof-config.xml rename to bobs-books/roberts-books/roberts-coherence/src/main/resources/books-pof-config.xml From 3eba4fc21c7cddcbf1f1fbad0f904c135f6e429a Mon Sep 17 00:00:00 2001 From: Aleks Seovic Date: Thu, 28 Jan 2021 02:30:24 -0500 Subject: [PATCH 3/3] Upgraded to Coherence CE 20.12 and Operator 3.x --- .../roberts-coherence/Dockerfile | 14 ++++---- .../roberts-books/roberts-coherence/pom.xml | 7 ++-- .../roberts-coherence/src/main/k8s/app.yaml | 33 +++++++++++++++++++ ...-config.xml => coherence-cache-config.xml} | 0 .../{books-pof-config.xml => pof-config.xml} | 0 .../Dockerfile | 17 ++++------ .../roberts-helidon-stock-application/pom.xml | 6 ++-- .../src/main/docker/Dockerfile | 10 ------ .../src/main/k8s/app.yaml | 26 +++++++-------- ...-config.xml => coherence-cache-config.xml} | 2 +- ...{roberts-pof-config.xml => pof-config.xml} | 0 11 files changed, 65 insertions(+), 50 deletions(-) create mode 100644 bobs-books/roberts-books/roberts-coherence/src/main/k8s/app.yaml rename bobs-books/roberts-books/roberts-coherence/src/main/resources/{books-cache-config.xml => coherence-cache-config.xml} (100%) rename bobs-books/roberts-books/roberts-coherence/src/main/resources/{books-pof-config.xml => pof-config.xml} (100%) delete mode 100644 bobs-books/roberts-books/roberts-helidon-stock-application/src/main/docker/Dockerfile rename bobs-books/roberts-books/roberts-helidon-stock-application/src/main/resources/{roberts-cache-config.xml => coherence-cache-config.xml} (95%) rename bobs-books/roberts-books/roberts-helidon-stock-application/src/main/resources/{roberts-pof-config.xml => pof-config.xml} (100%) diff --git a/bobs-books/roberts-books/roberts-coherence/Dockerfile b/bobs-books/roberts-books/roberts-coherence/Dockerfile index 692c6d8..9903ac5 100644 --- a/bobs-books/roberts-books/roberts-coherence/Dockerfile +++ b/bobs-books/roberts-books/roberts-coherence/Dockerfile @@ -7,15 +7,15 @@ RUN yum update -y \ && yum-config-manager --save --setopt=ol7_ociyum_config.skip_if_unavailable=true \ && yum -y install tar gzip \ && yum clean all; rm -rf /var/cache/yum \ - && mkdir -p /app/lib \ - && mkdir -p /app/conf \ + && mkdir -p /app/libs \ + && mkdir -p /app/classpath \ && mkdir -p /license ENV JAVA_HOME=/usr/java ENV PATH $JAVA_HOME/bin:$PATH -ARG JDK_BINARY="${JDK_BINARY:-jdk-8u261-linux-x64.tar.gz}" +ARG JDK_BINARY="${JDK_BINARY:-openjdk-11+28_linux-x64_bin.tar.gz}" COPY ${JDK_BINARY} jdk.tar.gz -ENV JDK_DOWNLOAD_SHA256=5a04e01a091f6b1ed9c0b801be4fd10689af07eeb9e27f012c9aa3af9948ea34 +ENV JDK_DOWNLOAD_SHA256=3784cfc4670f0d4c5482604c7c513beb1a92b005f569df9bf100e8bef6610f2e RUN set -eux \ echo "Checking JDK hash"; \ @@ -25,9 +25,7 @@ RUN set -eux \ tar xzf jdk.tar.gz --directory "${JAVA_HOME}" --strip-components=1; \ rm -f jdk.tar.gz; -COPY target/*.jar /app/lib/ -COPY src/main/resources/books-cache-config.xml /app/conf/ -COPY src/main/resources/books-pof-config.xml /app/conf/ -COPY src/main/resources/books.csv /app/conf/ +COPY target/libs/*.jar /app/libs/ +COPY target/*.jar /app/classpath/ COPY LICENSE.txt /license/ COPY THIRD_PARTY_LICENSES.txt /license/ \ No newline at end of file diff --git a/bobs-books/roberts-books/roberts-coherence/pom.xml b/bobs-books/roberts-books/roberts-coherence/pom.xml index 789d8fb..92f956e 100644 --- a/bobs-books/roberts-books/roberts-coherence/pom.xml +++ b/bobs-books/roberts-books/roberts-coherence/pom.xml @@ -17,7 +17,7 @@ UTF-8 UTF-8 -Dfile.encoding=UTF-8 - 12.2.1-4-0 + 20.12 4.1.43.Final 4.5.10 @@ -87,13 +87,12 @@ copy-dependencies - ${project.build.directory} + ${project.build.directory}/libs false false true true compile - coherence @@ -103,7 +102,7 @@ - com.oracle.coherence + com.oracle.coherence.ce coherence ${version.lib.coherence} diff --git a/bobs-books/roberts-books/roberts-coherence/src/main/k8s/app.yaml b/bobs-books/roberts-books/roberts-coherence/src/main/k8s/app.yaml new file mode 100644 index 0000000..96bfe47 --- /dev/null +++ b/bobs-books/roberts-books/roberts-coherence/src/main/k8s/app.yaml @@ -0,0 +1,33 @@ +# +# Copyright (c) 2021 Oracle and/or its affiliates. +# +# Licensed under the Universal Permissive License v 1.0 as shown at +# http://oss.oracle.com/licenses/upl. +# +apiVersion: coherence.oracle.com/v1 +kind: Coherence +metadata: + name: roberts-coherence + namespace: bobs-books +spec: + replicas: 3 + image: ghcr.io/verrazzano/example-roberts-coherence:test + env: + - name: BACKEND_PORT + value: "8001" + - name: BACKEND_HOSTNAME + value: bobs-bookstore-cluster-cluster-1.bobs-books.svc.cluster.local + - name: TRACING_HOST + value: "jaeger-collector" + - name: JAEGER_SAMPLER_TYPE + value: "const" + - name: JAEGER_SAMPLER_PARAM + value: "1" + jvm: + memory: + heapSize: 1g + ports: + - name: extend + port: 9000 + service: + name: roberts-coherence-extend \ No newline at end of file diff --git a/bobs-books/roberts-books/roberts-coherence/src/main/resources/books-cache-config.xml b/bobs-books/roberts-books/roberts-coherence/src/main/resources/coherence-cache-config.xml similarity index 100% rename from bobs-books/roberts-books/roberts-coherence/src/main/resources/books-cache-config.xml rename to bobs-books/roberts-books/roberts-coherence/src/main/resources/coherence-cache-config.xml diff --git a/bobs-books/roberts-books/roberts-coherence/src/main/resources/books-pof-config.xml b/bobs-books/roberts-books/roberts-coherence/src/main/resources/pof-config.xml similarity index 100% rename from bobs-books/roberts-books/roberts-coherence/src/main/resources/books-pof-config.xml rename to bobs-books/roberts-books/roberts-coherence/src/main/resources/pof-config.xml diff --git a/bobs-books/roberts-books/roberts-helidon-stock-application/Dockerfile b/bobs-books/roberts-books/roberts-helidon-stock-application/Dockerfile index 362a240..f5bbb8b 100644 --- a/bobs-books/roberts-books/roberts-helidon-stock-application/Dockerfile +++ b/bobs-books/roberts-books/roberts-helidon-stock-application/Dockerfile @@ -7,15 +7,14 @@ RUN yum update -y \ && yum-config-manager --save --setopt=ol7_ociyum_config.skip_if_unavailable=true \ && yum -y install tar gzip \ && yum clean all; rm -rf /var/cache/yum \ - && mkdir -p /app/lib \ - && mkdir -p /app/conf \ + && mkdir -p /app/libs \ && mkdir -p /license ENV JAVA_HOME=/usr/java ENV PATH $JAVA_HOME/bin:$PATH -ARG JDK_BINARY="${JDK_BINARY:-openjdk-14.0.2_linux-x64_bin.tar.gz}" +ARG JDK_BINARY="${JDK_BINARY:-openjdk-11+28_linux-x64_bin.tar.gz}" COPY ${JDK_BINARY} jdk.tar.gz -ENV JDK_DOWNLOAD_SHA256=91310200f072045dc6cef2c8c23e7e6387b37c46e9de49623ce0fa461a24623d +ENV JDK_DOWNLOAD_SHA256=3784cfc4670f0d4c5482604c7c513beb1a92b005f569df9bf100e8bef6610f2e RUN set -eux \ echo "Checking JDK hash"; \ @@ -25,13 +24,9 @@ RUN set -eux \ tar xzf jdk.tar.gz --directory "${JAVA_HOME}" --strip-components=1; \ rm -f jdk.tar.gz; -ENV COH_WKA roberts-coherence-wka -ENV COH_CLUSTER roberts-coherence -ENV COH_CACHE_CONFIG roberts-cache-config.xml -ENV COH_POF_CONFIG roberts-pof-config.xml - -COPY target/* /app/ +COPY target/libs/*.jar /app/libs/ +COPY target/*.jar /app/ COPY LICENSE.txt /license/ COPY THIRD_PARTY_LICENSES.txt /license/ -CMD java -cp /app/roberts-helidon-stock-application.jar:/app/coherence-12.2.1-4-0.jar:/app/* -Dcoherence.distributed.localstorage=true -Dcoherence.wka=$COH_WKA -Dcoherence.cluster=$COH_CLUSTER -Dcoherence.cacheconfig=$COH_CACHE_CONFIG -Dcoherence.pof.config=$COH_POF_CONFIG -Dcoherence.tracing.endpoint=zipkin.istio-system -Dcoherence.tracing.ratio=1 org.books.robert.Main +CMD java -cp /app/*:/app/libs/* -Dcoherence.tracing.endpoint=zipkin.istio-system -Dcoherence.tracing.ratio=1 org.books.robert.Main diff --git a/bobs-books/roberts-books/roberts-helidon-stock-application/pom.xml b/bobs-books/roberts-books/roberts-helidon-stock-application/pom.xml index 945d15c..a391455 100644 --- a/bobs-books/roberts-books/roberts-helidon-stock-application/pom.xml +++ b/bobs-books/roberts-books/roberts-helidon-stock-application/pom.xml @@ -42,7 +42,7 @@ UTF-8 -Dfile.encoding=UTF-8 etc/checkstyle.xml - 12.2.1-4-0 + 20.12 @@ -103,7 +103,7 @@ copy-dependencies - ${project.build.directory} + ${project.build.directory}/libs false false true @@ -207,7 +207,7 @@ - com.oracle.coherence + com.oracle.coherence.ce coherence ${version.lib.coherence} diff --git a/bobs-books/roberts-books/roberts-helidon-stock-application/src/main/docker/Dockerfile b/bobs-books/roberts-books/roberts-helidon-stock-application/src/main/docker/Dockerfile deleted file mode 100644 index 45fd7ea..0000000 --- a/bobs-books/roberts-books/roberts-helidon-stock-application/src/main/docker/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -# Copyright (c) 2020, Oracle and/or its affiliates. -# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. - -FROM openjdk:8-jre-slim - -RUN mkdir /app -COPY libs /app/libs -COPY ${project.artifactId}.jar /app - -CMD ["java", "-jar", "/app/${project.artifactId}.jar"] diff --git a/bobs-books/roberts-books/roberts-helidon-stock-application/src/main/k8s/app.yaml b/bobs-books/roberts-books/roberts-helidon-stock-application/src/main/k8s/app.yaml index 57f226e..fc363c1 100644 --- a/bobs-books/roberts-books/roberts-helidon-stock-application/src/main/k8s/app.yaml +++ b/bobs-books/roberts-books/roberts-helidon-stock-application/src/main/k8s/app.yaml @@ -4,38 +4,38 @@ kind: Service apiVersion: v1 metadata: - name: ${project.artifactId} + name: roberts-helidon-stock-application + namespace: bobs-books labels: - app: ${project.artifactId} + app: roberts-helidon-stock-application spec: - type: NodePort - selector: - app: ${project.artifactId} + type: ClusterIP ports: - - port: 8080 + - port: 80 targetPort: 8080 - name: http + selector: + app: roberts-helidon-stock-application --- kind: Deployment apiVersion: apps/v1 metadata: - name: ${project.artifactId} + name: roberts-helidon-stock-application + namespace: bobs-books spec: replicas: 1 template: metadata: labels: - app: ${project.artifactId} + app: roberts-helidon-stock-application version: v1 spec: containers: - - name: ${project.artifactId} - image: ${project.artifactId} - imagePullPolicy: IfNotPresent + - name: roberts-helidon-stock-application + image: ghcr.io/verrazzano/example-roberts-helidon-stock-application:test ports: - containerPort: 8080 selector: matchLabels: - app: ${project.artifactId} + app: roberts-helidon-stock-application version: v1 --- diff --git a/bobs-books/roberts-books/roberts-helidon-stock-application/src/main/resources/roberts-cache-config.xml b/bobs-books/roberts-books/roberts-helidon-stock-application/src/main/resources/coherence-cache-config.xml similarity index 95% rename from bobs-books/roberts-books/roberts-helidon-stock-application/src/main/resources/roberts-cache-config.xml rename to bobs-books/roberts-books/roberts-helidon-stock-application/src/main/resources/coherence-cache-config.xml index 0f08ea3..16080f4 100644 --- a/bobs-books/roberts-books/roberts-helidon-stock-application/src/main/resources/roberts-cache-config.xml +++ b/bobs-books/roberts-books/roberts-helidon-stock-application/src/main/resources/coherence-cache-config.xml @@ -24,7 +24,7 @@ -
roberts-coherence-storage-extend
+
roberts-coherence-extend
9000
diff --git a/bobs-books/roberts-books/roberts-helidon-stock-application/src/main/resources/roberts-pof-config.xml b/bobs-books/roberts-books/roberts-helidon-stock-application/src/main/resources/pof-config.xml similarity index 100% rename from bobs-books/roberts-books/roberts-helidon-stock-application/src/main/resources/roberts-pof-config.xml rename to bobs-books/roberts-books/roberts-helidon-stock-application/src/main/resources/pof-config.xml