Skip to content

partofaplan/weblogic-model-in-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebLogic Model-in-Image Assets

This repository contains everything that is specific to the WebLogic Model in Image deployment:

Directory Purpose
image/ Dockerfile that layers the WDT artifacts and model onto the chosen WebLogic base image.
kubernetes/ Domain, cluster, ingress, and namespace manifests.
model/ The WDT model (model.yaml) plus the zipped archive generated from your application EAR.
scripts/ Helper scripts to build the WDT archive and apply the manifests to a cluster.

The application itself (the EAR/WAR sources) lives elsewhere – for example in the sample-java-application repo. This repo only needs the resulting EAR to build a WebLogic image and deploy it.

Workflow Overview

  1. Build your EAR in the application repo (e.g. mvn -B package in sample-java-application).

  2. Create the WDT archive by pointing scripts/prepare-wdt-artifacts.sh at the EAR:

    scripts/prepare-wdt-artifacts.sh /absolute/path/to/sample-ear.ear

    The script copies the EAR into model/wdt-archive/wlsdeploy/applications/ and produces model/archive.zip.

  3. Build and push the model image:

    docker build -t ghcr.io/your-org/sample-domain:MYTAG -f image/Dockerfile .
    docker push ghcr.io/your-org/sample-domain:MYTAG
  4. Deploy using scripts/deploy-domain.sh. The script expects the usual WebLogic and registry credentials plus a kubeconfig (provided via KUBECONFIG_BASE64 or KUBECONFIG_PATH):

    export IMAGE=ghcr.io/your-org/sample-domain:MYTAG
    export IMAGE_PULL_SECRET_NAME=sample-domain-registry
    export IMAGE_PULL_SECRET_SERVER=ghcr.io
    export IMAGE_PULL_SECRET_USERNAME=gh-user
    export IMAGE_PULL_SECRET_PASSWORD=*****
    export WEBLOGIC_USERNAME=weblogic
    export WEBLOGIC_PASSWORD=*****
    export RUNTIME_ENCRYPTION_PASSWORD=*****
    export KUBECONFIG_PATH=/path/to/kubeconfig
    scripts/deploy-domain.sh

GitHub Actions Pipeline

.github/workflows/deploy-weblogic.yml reproduces the manual steps on a runner:

  1. Runs scripts/prepare-wdt-artifacts.sh using the EAR_PATH secret (must point to the EAR file on the runner).
  2. Builds the Docker image and pushes it to the configured registry.
  3. Applies the Kubernetes manifests via scripts/deploy-domain.sh.

Required secrets mirror the script environment variables:

  • EAR_PATH – absolute path to the EAR on the runner (typically a shared workspace with the application build).
  • BASE_IMAGE, WDT_VERSION (optional overrides).
  • REGISTRY_URL, REGISTRY_USERNAME, REGISTRY_PASSWORD.
  • IMAGE_PULL_SECRET_NAME (optional override), OCR_* (optional), WEBLOGIC_*, RUNTIME_ENCRYPTION_PASSWORD.
  • KUBECONFIG_BASE64 or KUBECONFIG_PATH.

Trigger the workflow either on push/PR (self-hosted runner) or manually via workflow_dispatch to build and deploy a new model image whenever a fresh EAR is available.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published