From 75a90a4f2a2b63c71aab3f458154df2bcce1666f Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 8 Oct 2025 14:28:23 -0400 Subject: [PATCH 1/3] Add changes to support build and push --- .../{Dockerfile => Dockerfile.manual} | 0 cloudbank-v5/customer-helidon/README.md | 40 ++++++++++++++++++- cloudbank-v5/customer-helidon/pom.xml | 21 +++++++++- 3 files changed, 59 insertions(+), 2 deletions(-) rename cloudbank-v5/customer-helidon/{Dockerfile => Dockerfile.manual} (100%) diff --git a/cloudbank-v5/customer-helidon/Dockerfile b/cloudbank-v5/customer-helidon/Dockerfile.manual similarity index 100% rename from cloudbank-v5/customer-helidon/Dockerfile rename to cloudbank-v5/customer-helidon/Dockerfile.manual diff --git a/cloudbank-v5/customer-helidon/README.md b/cloudbank-v5/customer-helidon/README.md index 802a04eca..7151fe356 100644 --- a/cloudbank-v5/customer-helidon/README.md +++ b/cloudbank-v5/customer-helidon/README.md @@ -25,6 +25,34 @@ This creates: libs/ (all dependency JARs) ``` +### Building and Pushing Container Image + +#### Environment Setup (macOS with Rancher Desktop) + +```bash +# Set Docker host for JKube compatibility +export DOCKER_HOST=unix:///Users/$USER/.rd/docker.sock +``` + +#### Commands + +```bash +# Build thin JAR and libs +mvn clean package + +# Build container image +mvn k8s:build + +# Push to Oracle Cloud Registry +docker push us-ashburn-1.ocir.io/maacloud/customer-helidon:5.0-SNAPSHOT +``` + +#### Output +- **JAR**: `target/customer-helidon.jar` (thin JAR) +- **Dependencies**: `target/libs/` (all dependencies) +- **Deployment**: `target/customer-helidon-deployment.zip` +- **Image**: Uses JKube Java base image with automatic Helidon configuration + ### Running the Application **Option 1: Using the thin JAR (requires dependencies in classpath):** @@ -119,9 +147,19 @@ The generation of the executable binary may take a few minutes to complete depen ## Docker Support -### Building the Docker Image +### Building the Docker Image Locally + +**Note:** The `Dockerfile.manual` must be renamed to `Dockerfile` before building locally, as JKube uses the Dockerfile when present. + ```bash +# Rename Dockerfile for local build +git mv Dockerfile.manual Dockerfile + +# Build the Docker image docker build -t customer-helidon . + +# Rename back to avoid conflicts with JKube builds +git mv Dockerfile Dockerfile.manual ``` ### Running the Docker Image diff --git a/cloudbank-v5/customer-helidon/pom.xml b/cloudbank-v5/customer-helidon/pom.xml index 476b23283..6d6d5b7a3 100644 --- a/cloudbank-v5/customer-helidon/pom.xml +++ b/cloudbank-v5/customer-helidon/pom.xml @@ -11,7 +11,13 @@ com.example customer-helidon - 1.0-SNAPSHOT + 5.0-SNAPSHOT + + + 4.0.14 + 1.16.2 + us-ashburn-1.ocir.io/maacloud/${project.artifactId}:${project.version} + @@ -46,6 +52,7 @@ io.helidon.integrations.eureka helidon-integrations-eureka + runtime io.helidon.integrations.cdi @@ -215,6 +222,18 @@ + + + io.helidon.build-tools + helidon-maven-plugin + ${helidon-maven-plugin.version} + + + + org.eclipse.jkube + kubernetes-maven-plugin + ${jkube.version} + From 462090695d4aeb522bf32cead531a42ebb0e050f Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 8 Oct 2025 14:36:44 -0400 Subject: [PATCH 2/3] generic tenancy --- cloudbank-v5/customer-helidon/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudbank-v5/customer-helidon/README.md b/cloudbank-v5/customer-helidon/README.md index 7151fe356..ddc66ac80 100644 --- a/cloudbank-v5/customer-helidon/README.md +++ b/cloudbank-v5/customer-helidon/README.md @@ -44,7 +44,7 @@ mvn clean package mvn k8s:build # Push to Oracle Cloud Registry -docker push us-ashburn-1.ocir.io/maacloud/customer-helidon:5.0-SNAPSHOT +docker push us-ashburn-1.ocir.io/tenancy/customer-helidon:5.0-SNAPSHOT ``` #### Output From 2c413e022ddfb80fbd1ccab3d23cb15c6ba7aa06 Mon Sep 17 00:00:00 2001 From: Doug Drechsel Date: Wed, 8 Oct 2025 14:40:35 -0400 Subject: [PATCH 3/3] generic tenancy --- cloudbank-v5/customer-helidon/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloudbank-v5/customer-helidon/pom.xml b/cloudbank-v5/customer-helidon/pom.xml index 6d6d5b7a3..ddf2f5076 100644 --- a/cloudbank-v5/customer-helidon/pom.xml +++ b/cloudbank-v5/customer-helidon/pom.xml @@ -16,7 +16,7 @@ 4.0.14 1.16.2 - us-ashburn-1.ocir.io/maacloud/${project.artifactId}:${project.version} + us-ashburn-1.ocir.io/tenancy/${project.artifactId}:${project.version}