Thursday, April 4, 2024

Weblogic k8s operator - cleanup

 HOWTO



Run delete


dave@dave:/git/weblogic-kubernetes-operator/kubernetes/samples/scripts$ ./delete-domain/delete-weblogic-domain-resources.sh -d sample-domain1
@@ Deleting kubernetes resources with label weblogic.domainUID 'sample-domain1'.
@@ 9 resources remaining after 0 seconds, including 3 WebLogic Server pods. Max wait is 120 seconds.
@@ Setting serverStartPolicy to Never on each domain (this should cause operator(s) to initiate a controlled shutdown of the domain's pods.)
domain.weblogic.oracle/sample-domain1 patched
@@ Waiting for operator to shutdown pods (will wait for no more than half of max wait seconds before directly deleting them).
@@ 9 resources remaining after 4 seconds, including 3 WebLogic Server pods. Max wait is 120 seconds.
@@ Waiting for operator to shutdown pods (will wait for no more than half of max wait seconds before directly deleting them).
@@ 9 resources remaining after 8 seconds, including 3 WebLogic Server pods. Max wait is 120 seconds.
@@ Waiting for operator to shutdown pods (will wait for no more than half of max wait seconds before directly deleting them).
@@ 9 resources remaining after 11 seconds, including 3 WebLogic Server pods. Max wait is 120 seconds.
@@ Waiting for operator to shutdown pods (will wait for no more than half of max wait seconds before directly deleting them).
@@ 9 resources remaining after 15 seconds, including 3 WebLogic Server pods. Max wait is 120 seconds.
@@ Waiting for operator to shutdown pods (will wait for no more than half of max wait seconds before directly deleting them).
@@ 9 resources remaining after 18 seconds, including 3 WebLogic Server pods. Max wait is 120 seconds.
@@ Waiting for operator to shutdown pods (will wait for no more than half of max wait seconds before directly deleting them).
@@ 9 resources remaining after 22 seconds, including 3 WebLogic Server pods. Max wait is 120 seconds.
@@ Waiting for operator to shutdown pods (will wait for no more than half of max wait seconds before directly deleting them).
@@ 9 resources remaining after 26 seconds, including 3 WebLogic Server pods. Max wait is 120 seconds.
@@ Waiting for operator to shutdown pods (will wait for no more than half of max wait seconds before directly deleting them).
@@ 9 resources remaining after 29 seconds, including 3 WebLogic Server pods. Max wait is 120 seconds.
@@ Waiting for operator to shutdown pods (will wait for no more than half of max wait seconds before directly deleting them).
@@ 9 resources remaining after 33 seconds, including 3 WebLogic Server pods. Max wait is 120 seconds.
@@ Waiting for operator to shutdown pods (will wait for no more than half of max wait seconds before directly deleting them).
@@ 9 resources remaining after 36 seconds, including 3 WebLogic Server pods. Max wait is 120 seconds.
@@ Waiting for operator to shutdown pods (will wait for no more than half of max wait seconds before directly deleting them).
@@ 9 resources remaining after 40 seconds, including 3 WebLogic Server pods. Max wait is 120 seconds.
@@ Waiting for operator to shutdown pods (will wait for no more than half of max wait seconds before directly deleting them).
@@ 9 resources remaining after 44 seconds, including 3 WebLogic Server pods. Max wait is 120 seconds.
@@ Waiting for operator to shutdown pods (will wait for no more than half of max wait seconds before directly deleting them).
@@ 9 resources remaining after 49 seconds, including 3 WebLogic Server pods. Max wait is 120 seconds.
@@ Waiting for operator to shutdown pods (will wait for no more than half of max wait seconds before directly deleting them).
@@ 9 resources remaining after 53 seconds, including 3 WebLogic Server pods. Max wait is 120 seconds.
@@ Waiting for operator to shutdown pods (will wait for no more than half of max wait seconds before directly deleting them).
@@ 9 resources remaining after 57 seconds, including 3 WebLogic Server pods. Max wait is 120 seconds.
@@ Waiting for operator to shutdown pods (will wait for no more than half of max wait seconds before directly deleting them).
@@ 9 resources remaining after 62 seconds, including 3 WebLogic Server pods. Max wait is 120 seconds.
@@ Warning! 3 WebLogic Server pods remaining but wait time exceeds half of max wait seconds. About to directly delete all remaining resources, including the leftover pods.
pod "sample-domain1-admin-server" deleted
pod "sample-domain1-managed-server1" deleted
pod "sample-domain1-managed-server2" deleted
service "sample-domain1-admin-server" deleted
service "sample-domain1-cluster-cluster-1" deleted
service "sample-domain1-managed-server1" deleted
service "sample-domain1-managed-server2" deleted
configmap "sample-domain1-weblogic-domain-introspect-cm" deleted
domain.weblogic.oracle "sample-domain1" deleted
@@ 0 resources remaining after 77 seconds, including 0 WebLogic Server pods. Max wait is 120 seconds.
@@ Success.


Wednesday, April 3, 2024

Weblogic k8s - WIT - create auxiliary image

 Oracle HOWTO


Docker HOWTO


See also 

Auxiliary images are the recommended best approach for including Model in Image model files, application archive files, and the WebLogic Deploy Tooling installation, in your pods. This feature eliminates the need to provide these files in the image specified in domain.spec.image.

Instead:

  • The domain resource’s domain.spec.image directly references a base image that needs to include only a WebLogic installation and a Java installation.
  • The domain resource’s auxiliary image related fields reference one or more smaller images that contain the desired Model in Image files.

References

  • Run the kubectl explain domain.spec.configuration.model.auxiliaryImages command.

  • See the model.auxiliaryImages section in the domain resource schema.


Domain model in image files 

dave@dave:/git/weblogic-kubernetes-operator/kubernetes/samples/quick-start$ find
.
./archive
./archive/wlsdeploy
./archive/wlsdeploy/applications
./archive/wlsdeploy/applications/quickstart
./archive/wlsdeploy/applications/quickstart/WEB-INF
./archive/wlsdeploy/applications/quickstart/WEB-INF/web.xml
./archive/wlsdeploy/applications/quickstart/index.jsp
./domain-resource.yaml
./ingress-route.yaml
./model.properties
./model.yaml





Prepare files for Dave Domain - descriptors and application archive




dave@dave:/git/weblogic/wit/dave-domain-aux-image$ find
.
./archive
./archive/wlsdeploy
./archive/wlsdeploy/applications
./archive/wlsdeploy/applications/basicWebappEjb.war
./DiscoveredABDataSourceEARDomain.yaml
./ABDataSourceEARDomain-k8s.yaml

Run archive helper
$ rm DaveDomainAuxImage.zip
$ archiveHelper.sh  add application -archive_file=DaveDomainAuxImage.zip -source /git/weblogic/wit/dave-domain-aux-image/archive/wlsdeploy/applications/basicWebappEjb.war 
wlsdeploy/applications/basicWebappEjb.war

Created archive - check with unzip
$ unzip -l ../DaveDomainAuxImage.zip
Archive:  ../DaveDomainAuxImage.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
 28381729  04-04-2024 11:10   wlsdeploy/applications/basicWebappEjb.war
---------                     -------
 28381729                     1 file


Created archive - check with archive tool

$ archiveHelper.sh list application -archive_file  DaveDomainAuxImage.zip 
wlsdeploy/applications/basicWebappEjb.war


Add WDT installer into cache 

dave@dave:/git/weblogic/wit/dave-domain-aux-image$ imagetool.sh cache deleteEntry --key wdt_latest
[INFO   ] Nothing to delete for key: wdt_latest
dave@dave:/git/weblogic/wit/dave-domain-aux-image$ imagetool.sh cache addInstaller \
  --type wdt \
  --version latest \
  --path /git/weblogic/installers/weblogic-deploy.zip 
[INFO   ] Successfully added to cache. wdt_latest=/git/weblogic/installers/weblogic-deploy.zip




Create Auxiliary image with WIT


Run imagetool
  • WDT descriptor 
  • application archive 


ave@dave:/git/weblogic/wit/dave-domain-aux-image$ imagetool.sh createAuxImage   --tag dave-aux-wdt-domain-image:WLS-1.0   --wdtModel ./DiscoveredABDataSourceEARDomain.yaml   --wdtArchive ./DaveDomainAuxImage.zip
[INFO   ] WebLogic Image Tool version 1.12.2
[INFO   ] Image Tool build ID: 30ea5b40-b948-4b38-b674-24ec35dd236b
[INFO   ] Temporary directory used for image build context: /home/dave/wlsimgbuilder_temp576740407265692995
[INFO   ] Copying ./DiscoveredABDataSourceEARDomain.yaml to build context folder.
[INFO   ] Copying ./DaveDomainAuxImage.zip to build context folder.
[INFO   ] Copying /git/weblogic/installers/weblogic-deploy.zip to build context folder.
[INFO   ] Starting build: docker build --no-cache --force-rm --tag dave-aux-wdt-domain-image:WLS-1.0 /home/dave/wlsimgbuilder_temp576740407265692995
Sending build context to Docker daemon  30.84MB

Step 1/18 : FROM busybox as os_update
 ---> ba5dc23f65d4
Step 2/18 : LABEL com.oracle.weblogic.imagetool.buildid="30ea5b40-b948-4b38-b674-24ec35dd236b"
 ---> Running in e2ef68d98bf2
Removing intermediate container e2ef68d98bf2
 ---> 4e107816576d
Step 3/18 : USER root
 ---> Running in 1a8e7575a313
Removing intermediate container 1a8e7575a313
 ---> 91aaaff0af83
Step 4/18 : RUN if [ -z "$(grep ^oracle: /etc/group)" ]; then addgroup oracle || exit 1 ; fi  && if [ -z "$(grep ^oracle: /etc/group)" ]; then addgroup oracle || exit 1 ; fi  && if [ -z "$(grep ^oracle: /etc/passwd)" ]; then adduser -D -G oracle oracle || exit 1 ; fi
 ---> Running in 196b518f14a4
Removing intermediate container 196b518f14a4
 ---> fd867c67d0f3
Step 5/18 : FROM os_update as wdt_build
 ---> fd867c67d0f3
Step 6/18 : RUN mkdir -p /auxiliary  && mkdir -p /auxiliary/models  && chown oracle:oracle /auxiliary
 ---> Running in 3d8d3ca61e64
Removing intermediate container 3d8d3ca61e64
 ---> 388f3953e444
Step 7/18 : COPY --chown=oracle:oracle ["weblogic-deploy.zip", "/tmp/imagetool/"]
 ---> 4fe844c892a3
Step 8/18 : RUN test -d /auxiliary/weblogic-deploy && rm -rf /auxiliary/weblogic-deploy || echo Initial WDT install         && unzip -q "/tmp/imagetool/weblogic-deploy.zip" -d /auxiliary
 ---> Running in c1dbd28230ec
Initial WDT install
Removing intermediate container c1dbd28230ec
 ---> 4216a2cc1075
Step 9/18 : FROM os_update as final
 ---> fd867c67d0f3
Step 10/18 : ENV AUXILIARY_IMAGE_PATH=/auxiliary     WDT_HOME=/auxiliary     WDT_MODEL_HOME=/auxiliary/models
 ---> Running in 5f9ae6be833d
Removing intermediate container 5f9ae6be833d
 ---> c7a4f766d1bc
Step 11/18 : RUN mkdir -p /auxiliary && chown oracle:oracle /auxiliary
 ---> Running in 777aec70d270
Removing intermediate container 777aec70d270
 ---> d15ec5a87e2a
Step 12/18 : COPY --from=wdt_build --chown=oracle:oracle /auxiliary /auxiliary/
 ---> 5877bb70ecd0
Step 13/18 : RUN mkdir -p /auxiliary/models && chown oracle:oracle /auxiliary/models
 ---> Running in 6db0d4d979f3
Removing intermediate container 6db0d4d979f3
 ---> acbc52b480c5
Step 14/18 : COPY --chown=oracle:oracle ["DiscoveredABDataSourceEARDomain.yaml", "/auxiliary/models/"]
 ---> d230c6a7af74
Step 15/18 : COPY --chown=oracle:oracle ["DaveDomainAuxImage.zip", "/auxiliary/models/"]
 ---> c26830f8ffa4
Step 16/18 : RUN chmod -R 640 /auxiliary/models/*
 ---> Running in 5cbc03438514
Removing intermediate container 5cbc03438514
 ---> 7828c4cf743b
Step 17/18 : USER oracle
 ---> Running in 13dcde89b0b2
Removing intermediate container 13dcde89b0b2
 ---> de177b7f5a62
Step 18/18 : WORKDIR /auxiliary
 ---> Running in 7a1a402e5807
Removing intermediate container 7a1a402e5807
 ---> 90b60de7d8e1
Successfully built 90b60de7d8e1
Successfully tagged dave-aux-wdt-domain-image:WLS-1.0
[INFO   ] Build successful. Build time=19s. Image tag=dave-aux-wdt-domain-image:WLS-1.0

Check created Docker image

 docker images
REPOSITORY                                                TAG                   IMAGE ID       CREATED              SIZE
dave-aux-wdt-domain-image                                 WLS-1.0               90b60de7d8e1   About a minute ago   37.1MB


List image content
$ docker run -it --rm dave-aux-wdt-domain-image:WLS-1.0 ls -l /auxiliary
total 0
drwxr-xr-x    1 oracle   oracle         116 Apr  4 09:19 models
drwxr-x---    1 oracle   oracle          76 Apr  4 09:19 weblogic-deploy
dave@dave:/git/weblogic/wit/dave-domain-aux-image$ docker run -it --rm dave-aux-wdt-domain-image:WLS-1.0 ls -l /auxiliary/models
total 27724
-rw-r-----    1 oracle   oracle    28385215 Apr  4 09:19 DaveDomainAuxImage.zip
-rw-r-----    1 oracle   oracle        3286 Apr  4 09:19 DiscoveredABDataSourceEARDomain.yaml
dave@dave:/git/weblogic/wit/dave-domain-aux-image$ docker run -it --rm dave-aux-wdt-domain-image:WLS-1.0 ls -l /auxiliary/weblogic-deploy
total 8
-rw-r-----    1 oracle   oracle        1839 Apr  4 09:19 LICENSE.txt
-rw-r-----    1 oracle   oracle          29 Apr  4 09:19 VERSION.txt
drwxr-x---    1 oracle   oracle         826 Apr  4 09:19 bin
drwxr-x---    1 oracle   oracle          36 Apr  4 09:19 etc
drwxr-x---    1 oracle   oracle         298 Apr  4 09:19 lib
drwxr-x---    1 oracle   oracle          96 Apr  4 09:19 samples

Deploy create Dave Auxiliary image to minikube with Weblogic k8s Operator


Steps to do 

  • Create a Secret containing your WebLogic administrator user name and password.
  • Create a Secret containing your Model in Image runtime encryption password:
    • All Model in Image domains must supply a runtime encryption Secret with a password value.
    • It is used to encrypt configuration that is passed around internally by the operator.
    • The value must be kept private but can be arbitrary; you can optionally supply a different secret value every time you restart the domain.
  • Deploy a Domain YAML file that references the new image.
  • Wait for the domain’s Pods to start and reach their ready state.

Create aux image inside Minikube Docker env to use it locally 

$ eval $(minikube docker-env)

$ imagetool.sh createAuxImage   --tag dave-aux-wdt-domain-image:WLS-1.0   --wdtModel ./DiscoveredABDataSourceEARDomain.yaml   --wdtArchive ./DaveDomainAuxImage.zip

$  docker images
REPOSITORY                                          TAG           IMAGE ID       CREATED              SIZE
dave-aux-wdt-domain-image                           WLS-1.0       10b30f4038fb   About a minute ago   65.5MB




Apply via kubectl
$kubectl apply -f domain-resource.yaml 

Forward admin server port, access Weblogic console http://localhost:7001/console/


$ kubectl port-forward base-domain-adminserver 7001:7001 -n sample-domain1-ns
Forwarding from 127.0.0.1:7001 -> 7001
Forwarding from [::1]:7001 -> 7001







Auxiliary image operator inside Minikube

All pods 



Describe domain , get pods
  $ kubectl describe domain base-domain -n sample-domain1-ns Normal   PodCycleStarting  13m                weblogic.operator  Replacing pod base-domain-adminserver because: Pod spec has changed.
  Normal   RollStarting      13m                weblogic.operator  Rolling restart WebLogic server pods in domain base-domain because: .
  Normal   PodCycleStarting  12m                weblogic.operator  Replacing pod base-domain-managedserverb because: Pod spec has changed.
  Normal   RollStarting      12m                weblogic.operator  Rolling restart WebLogic server pods in domain base-domain because: .
  Warning  Unavailable       12m (x2 over 14m)  weblogic.operator  Domain base-domain is unavailable: an insufficient number of its servers that are expected to be running are ready.";
  Normal   PodCycleStarting  11m                weblogic.operator  Replacing pod base-domain-managedservera because: Pod spec has changed.
  Normal   Available         10m (x2 over 14m)  weblogic.operator  Domain base-domain is available: a sufficient number of its servers have reached the ready state.
  Normal   RollCompleted     10m (x2 over 13m)  weblogic.operator  Rolling restart of domain base-domain completed.
  Normal   Completed         9m35s              weblogic.operator  Domain base-domain is complete because all of the following are true: there is no failure detected, there are no pending server shutdowns, and all servers expected to be running are ready and at their target image, auxiliary images, restart version, and introspect version.
dave@dave:/git/weblogic/wit/dave-domain-aux-image$  kubectl get pods -n sample-domain1-ns
NAME                                READY   STATUS    RESTARTS   AGE
base-domain-adminserver             1/1     Running   0          13m
base-domain-managedservera          1/1     Running   0          11m
base-domain-managedserverb          1/1     Running   0          11m
sample-domain1-introspector-qzst6   0/1     Error     0          3h8m

Created domain - config
[oracle@base-domain-adminserver config]$ cat config.xml 
<?xml version="1.0" encoding="UTF-8"?>
<domain xsi:schemaLocation="http://xmlns.oracle.com/weblogic/security/wls http://xmlns.oracle.com/weblogic/security/wls/1.0/wls.xsd http://xmlns.oracle.com/weblogic/domain http://xmlns.oracle.com/weblogic/1.0/domain.xsd http://xmlns.oracle.com/weblogic/security http://xmlns.oracle.com/weblogic/1.0/security.xsd http://xmlns.oracle.com/weblogic/security/xacml http://xmlns.oracle.com/weblogic/security/xacml/1.0/xacml.xsd" xmlns="http://xmlns.oracle.com/weblogic/domain" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <name>base_domain</name>
  <domain-version>14.1.1.0.0</domain-version>
  <security-configuration xmlns:xacml="http://xmlns.oracle.com/weblogic/security/xacml" xmlns:pas="http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator">
    <name>base_domain</name>
    <realm>
      <sec:authentication-provider xsi:type="wls:default-authenticatorType">
        <sec:name>DefaultAuthenticator</sec:name>
      </sec:authentication-provider>
      <sec:authentication-provider xsi:type="wls:default-identity-asserterType">
        <sec:name>DefaultIdentityAsserter</sec:name>
        <sec:active-type>AuthenticatedUser</sec:active-type>
        <sec:active-type>weblogic-jwt-token</sec:active-type>
      </sec:authentication-provider>
      <sec:role-mapper xsi:type="xacml:xacml-role-mapperType">
        <sec:name>XACMLRoleMapper</sec:name>
      </sec:role-mapper>
      <sec:authorizer xsi:type="xacml:xacml-authorizerType">
        <sec:name>XACMLAuthorizer</sec:name>
      </sec:authorizer>
      <sec:adjudicator xsi:type="wls:default-adjudicatorType">
        <sec:name>DefaultAdjudicator</sec:name>
      </sec:adjudicator>
      <sec:credential-mapper xsi:type="wls:default-credential-mapperType">
        <sec:name>DefaultCredentialMapper</sec:name>
      </sec:credential-mapper>
      <sec:cert-path-provider xsi:type="wls:web-logic-cert-path-providerType">
        <sec:name>WebLogicCertPathProvider</sec:name>
      </sec:cert-path-provider>
      <sec:cert-path-builder>WebLogicCertPathProvider</sec:cert-path-builder>
      <sec:name>myrealm</sec:name>
      <sec:password-validator xsi:type="pas:system-password-validatorType">
        <sec:name>SystemPasswordValidator</sec:name>
        <pas:min-password-length>8</pas:min-password-length>
        <pas:min-numeric-or-special-characters>1</pas:min-numeric-or-special-characters>
      </sec:password-validator>
    </realm>
    <default-realm>myrealm</default-realm>
    <credential-encrypted>{AES256}NFOF8DcWvKQxlhAcZiWrifCqOi5l4PluW+09IN9nq1ur39UDANcIqzlNOjpg0ZwoIwTlsgw8Hh/D0D52kfpmCkC2HbmS1Ox75XM24dtacK/zwEGDAtoOsBBym7w/3JNz</credential-encrypted>
    <node-manager-username>weblogic</node-manager-username>
    <node-manager-password-encrypted>{AES256}r30smSbzmUw0hP/oPaKLUlvx8RSn7XVVavl1N1u6Yhs=</node-manager-password-encrypted>
  </security-configuration>
  <server>
    <name>AdminServer</name>
    <listen-address>base-domain-adminserver</listen-address>
    <network-access-point>
      <name>internal-t3</name>
      <listen-address>localhost</listen-address>
      <listen-port>7001</listen-port>
    </network-access-point>
  </server>
  <server>
    <name>ManagedServerA</name>
    <listen-port>7002</listen-port>
    <cluster>cluster1</cluster>
    <web-server>
      <name>ManagedServerA</name>
      <web-server-log>
        <name>ManagedServerA</name>
        <number-of-files-limited>false</number-of-files-limited>
      </web-server-log>
    </web-server>
    <listen-address>base-domain-managedservera</listen-address>
    <jta-migratable-target>
      <name>ManagedServerA</name>
      <user-preferred-server>ManagedServerA</user-preferred-server>
      <cluster>cluster1</cluster>
    </jta-migratable-target>
  </server>
  <server>
    <name>ManagedServerB</name>
    <listen-port>7003</listen-port>
    <cluster>cluster2</cluster>
    <web-server>
      <name>ManagedServerB</name>
      <web-server-log>
        <name>ManagedServerB</name>
        <number-of-files-limited>false</number-of-files-limited>
      </web-server-log>
    </web-server>
    <listen-address>base-domain-managedserverb</listen-address>
    <jta-migratable-target>
      <name>ManagedServerB</name>
      <user-preferred-server>ManagedServerB</user-preferred-server>
      <cluster>cluster2</cluster>
    </jta-migratable-target>
  </server>
  <cluster>
    <name>cluster1</name>
    <cluster-messaging-mode>unicast</cluster-messaging-mode>
  </cluster>
  <cluster>
    <name>cluster2</name>
    <cluster-messaging-mode>unicast</cluster-messaging-mode>
  </cluster>
  <embedded-ldap>
    <name>base_domain</name>
    <credential-encrypted>{AES256}c03SXQ9UQZkCkVVwzsX0N6kKZ+SwVOSCOYw2L/gEn9K67Ao5xnXBpELgldlsLkrq</credential-encrypted>
  </embedded-ldap>
  <configuration-version>14.1.1.0.0</configuration-version>
  <app-deployment>
    <name>basicWebapp</name>
    <target>cluster1, cluster2</target>
    <module-type>war</module-type>
    <source-path>wlsdeploy/applications/basicWebappEjb.war</source-path>
    <security-dd-model>DDOnly</security-dd-model>
  </app-deployment>
  <migratable-target>
    <name>ManagedServerA (migratable)</name>
    <notes>This is a system generated default migratable target for a server. Do not delete manually.</notes>
    <user-preferred-server>ManagedServerA</user-preferred-server>
    <cluster>cluster1</cluster>
    <migration-policy>manual</migration-policy>
  </migratable-target>
  <migratable-target>
    <name>ManagedServerB (migratable)</name>
    <notes>This is a system generated default migratable target for a server. Do not delete manually.</notes>
    <user-preferred-server>ManagedServerB</user-preferred-server>
    <cluster>cluster2</cluster>
    <migration-policy>manual</migration-policy>
  </migratable-target>
  <admin-server-name>AdminServer</admin-server-name>
  <jdbc-system-resource>
    <name>JDBC-Data-Source-Oracle</name>
    <target>cluster1, cluster2</target>
    <descriptor-file-name>jdbc/JDBC-Data-Source-Oracle-3873-jdbc.xml</descriptor-file-name>
  </jdbc-system-resource>
</domain>


Install free Docker Oracle database

HOWTO
Login to Oracle Docker Registry (OCR)  web and create auth token 


Login to  OCR 
Use auth token created on OCR web 
$ docker login container-registry.oracle.com

Download Oracle free db image
$ docker pull container-registry.oracle.com/database/free:latest
latest: Pulling from database/free
089fdfcd47b7: Pull complete 
43c899d88edc: Pull complete 
47aa6f1886a1: Pull complete 
f8d07bb55995: Pull complete 
c31c8c658c1e: Pull complete 
b7d28faa08b4: Pull complete 
1d0d5c628f6f: Pull complete 
db82a695dad3: Pull complete 
25a185515793: Pull complete 
Digest: sha256:5ac0efa9896962f6e0e91c54e23c03ae8f140cf6ed43ca09ef4354268a942882
Status: Downloaded newer image for container-registry.oracle.com/database/free:latest
container-registry.oracle.com/database/free:latest

Start container
$ docker run -it  -d --name oracle  -e ORACLE_PWD=weblogic123 -p1521:1521 container-registry.oracle.com/database/free
6855a46bc9dab584a190950695866692a1d0b911876924b8f98ad48664de3845


$ docker ps
CONTAINER ID   IMAGE                                         COMMAND                  CREATED          STATUS                             PORTS                                       NAMES
93b8809b1204   container-registry.oracle.com/database/free   "/bin/bash -c $ORACL…"   41 seconds ago   Up 38 seconds (health: starting)   0.0.0.0:1521->1521/tcp, :::1521->1521/tcp   oracle




How to Use Custom Configuration Parameters for the Database on Docker

The Oracle Database Docker image enables you to customize the configuration of your database, and to provide initialization parameters for when the database starts.

Oracle Database server container also provides configuration parameters that can be used when starting the container. The following example provides the syntax for a detailed docker run command supporting all custom configurations, with variable values in Italics font, which you can replace with values for your deployment:

For further details see the "Running scripts after setup and on startup" section belotall Oracle sqplus clienInI$ sudo dnf install oracle-instantclient-basic-21.13.0.0.0-1.el8.x86_64.rpm
  $ sudo dnf install oracle-instantclient-sqlplus-21.13.0.0.0-1.el8.x86_64.rpm 


Connect to Oracle Docker db
$ docker exec -it oracle sqlplus / as sysdba

SQL*Plus: Release 23.0.0.0.0 - Production on Wed Apr 3 10:28:37 2024
Version 23.3.0.23.09

Copyright (c) 1982, 2023, Oracle.  All rights reserved.


Connected to:
Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09

SQL> 

Create Oracle db user - connect to Docker container as sysdba
SQL> alter session set "_ORACLE_SCRIPT"=true;

Session altered.

SQL> CREATE USER dave IDENTIFIED BY weblogic123;

User created.

SQL> GRANT CONNECT, RESOURCE, DBA TO dave;

Grant succeeded.

Connect via sqlplus
sqlplus dave@localhost:1521/FREE

SQL*Plus: Release 21.0.0.0.0 - Production on Wed Apr 3 19:47:37 2024
Version 21.13.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Enter password: 

Connected to:
Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09

SQL> 

sqlplus dave@localhost:1521/FREE

SQL*Plus: Release 21.0.0.0.0 - Production on Wed Apr 3 19:47:37 2024
Version 21.13.0.0.0

Copyright (c) 1982, 2022, Oracle.  All rights reserved.

Enter password: 

Connected to:
Oracle Database 23c Free Release 23.0.0.0.0 - Develop, Learn, and Run for Free
Version 23.3.0.23.09

SQL> 


Tuesday, April 2, 2024

Create Docker image with Java app running with Oracle JDK

 HOWTO


Create HelloWorld app


dave@dave:/git/devops-docker/docker-java$ vi HelloWorld.java
$ cat HelloWorld.java
public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}
dave@dave:/git/devops-docker/docker-java$  javac HelloWorld.java

dave@dave:/git/devops-docker/docker-java$ mkdir META-INF

$ cat META-INF/MANIFEST.MF 
Manifest-Version: 1.0
Created-By: 11.0.22 (Oracle Corporation)
Main-Class: HelloWorld
 

$ find
.
./HelloWorld.java
./HelloWorld.class
./META-INF
./META-INF/MANIFEST.MF
./HelloWorld.jar
./Dockerfile


dave@dave:/git/devops-docker/docker-java$ jar -cvfm HelloWorld.jar META-INF/MANIFEST.MF *.class
added manifest
adding: HelloWorld.class(in = 427) (out= 289)(deflated 32%)


Create Docker file
$ cat Dockerfile
FROM oracle/jdk:11-ol7
COPY *.jar /tmp
WORKDIR /tmp
ENTRYPOINT ["java","-jar","HelloWorld.jar"]

Build and run Docker image
$ docker build -t helloworld .
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

Sending build context to Docker daemon  7.168kB
Step 1/4 : FROM oracle/jdk:11-ol7
 ---> fea3c351284b
Step 2/4 : COPY *.jar /tmp
 ---> b71b147ea17b
Step 3/4 : WORKDIR /tmp
 ---> Running in b9b9ef2965ac
Removing intermediate container b9b9ef2965ac
 ---> 2520b41db41a
Step 4/4 : ENTRYPOINT ["java","-jar","HelloWorld.jar"]
 ---> Running in 5f728643508e
Removing intermediate container 5f728643508e
 ---> 562422b29f37
Successfully built 562422b29f37
Successfully tagged helloworld:latest
dave@dave:/git/devops-docker/docker-java$ docker run --name helloworld helloworld
Hello, World!

Monday, April 1, 2024

WDT - discover domain with 4 managed servers, DS and EAR

 HOWTO


GitHub


Deploy DS and EAR via Weblogic console 




Run discover.sh


dave@dave:/app/weblogic-deploy/bin$ ./discoverDomain.sh -oracle_home /app/weblogic -domain_home /app/weblogic/user_projects/domains/base_domain/ -archive_file /git/weblogic/wdt/DiscoveredABDataSourceEARDomain.zip -model_file /git/weblogic/wdt/DiscoveredABDataSourceEARDomain.yaml -admin_user weblogic -admin_url t3://dave:7001
JDK version is 11.0.22+9-LTS-219
JAVA_HOME = /usr/java/jdk-11
WLST_EXT_CLASSPATH = /app/weblogic-deploy/lib/weblogic-deploy-core.jar
CLASSPATH = /app/weblogic-deploy/lib/weblogic-deploy-core.jar
WLST_PROPERTIES = -Dcom.oracle.cie.script.throwException=true -Djava.util.logging.config.class=oracle.weblogic.deploy.logging.WLSDeployLoggingConfig 
/app/weblogic/oracle_common/common/bin/wlst.sh /app/weblogic-deploy/lib/python/discover.py -oracle_home /app/weblogic -domain_home /app/weblogic/user_projects/domains/base_domain/ -archive_file /git/weblogic/wdt/DiscoveredABDataSourceEARDomain.zip -model_file /git/weblogic/wdt/DiscoveredABDataSourceEARDomain.yaml -admin_user weblogic -admin_url t3://dave:7001

Initializing WebLogic Scripting Tool (WLST) ...

Jython scans all the jar files it can find at first startup. Depending on the system, this process may take a few minutes to complete, and WLST may not return a prompt right away.

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

####<Apr 1, 2024 10:50:35 PM> <INFO> <WebLogicDeployToolingVersion> <logVersionInfo> <WLSDPLY-01750> <The WebLogic Deploy Tooling discoverDomain version is 3.5.4:.43d3afb:Mar 14, 2024 11:55 UTC>
####<Apr 1, 2024 10:50:35 PM> <INFO> <WLSDeployLoggingConfig> <logLoggingDirectory> <WLSDPLY-01755> <The discoverDomain program will write its log to directory /app/weblogic-deploy/logs>
####<Apr 1, 2024 10:50:35 PM> <INFO> <DomainTypedef> <__init__> <WLSDPLY-12328> <Domain type WLS type definition file /app/weblogic-deploy/lib/typedefs/WLS.json version WLS_14 does not contain a postCreateRcuSchemasScript section>
####<Apr 1, 2024 10:50:35 PM> <INFO> <DomainTypedef> <__init__> <WLSDPLY-12321> <Domain type WLS type definition file /app/weblogic-deploy/lib/typedefs/WLS.json version WLS_14 does not contain a postCreateDomainScript section>
Please enter the WebLogic administrator password: 
####<Apr 1, 2024 10:50:40 PM> <INFO> <DomainTypedef> <__init__> <WLSDPLY-12328> <Domain type WLS type definition file /app/weblogic-deploy/lib/typedefs/WLS.json version WLS_14 does not contain a postCreateRcuSchemasScript section>
####<Apr 1, 2024 10:50:40 PM> <INFO> <DomainTypedef> <__init__> <WLSDPLY-12321> <Domain type WLS type definition file /app/weblogic-deploy/lib/typedefs/WLS.json version WLS_14 does not contain a postCreateDomainScript section>
####<Apr 1, 2024 10:50:40 PM> <INFO> <ModelContext> <__copy_from_args> <WLSDPLY-01050> <WebLogic version for aliases is 14.1.1.0.0>
####<Apr 1, 2024 10:50:40 PM> <INFO> <discover> <main> <WLSDPLY-06024> <No variable file provided. Model passwords will contain the token '-- FIX ME --'>

####<Apr 1, 2024 10:50:41 PM> <INFO> <discover> <_get_domain_name> <WLSDPLY-06022> <Discover domain base_domain>
####<Apr 1, 2024 10:50:42 PM> <INFO> <TopologyDiscoverer> <discover> <WLSDPLY-06600> <Discovering domain model topology>
####<Apr 1, 2024 10:50:43 PM> <INFO> <WlstHelper> <is_set> <WLSDPLY-00129> <Error calling isSet() for attribute ResourceManagement at location /: java.lang.AssertionError: java.lang.reflect.InvocationTargetException>
####<Apr 1, 2024 10:50:43 PM> <INFO> <Discoverer> <discover_domain_mbean> <WLSDPLY-06644> <Adding Domain AdminConsole>
####<Apr 1, 2024 10:50:43 PM> <INFO> <Discoverer> <discover_domain_mbean> <WLSDPLY-06644> <Adding Domain CdiContainer>
####<Apr 1, 2024 10:50:44 PM> <INFO> <Discoverer> <discover_domain_mbean> <WLSDPLY-06644> <Adding Domain JMX>
####<Apr 1, 2024 10:50:44 PM> <INFO> <Discoverer> <discover_domain_mbean> <WLSDPLY-06644> <Adding Domain JPA>
####<Apr 1, 2024 10:50:44 PM> <INFO> <Discoverer> <discover_domain_mbean> <WLSDPLY-06644> <Adding Domain JTA>
####<Apr 1, 2024 10:50:45 PM> <INFO> <Discoverer> <discover_domain_mbean> <WLSDPLY-06644> <Adding Domain Log>
####<Apr 1, 2024 10:50:45 PM> <INFO> <Discoverer> <discover_domain_mbean> <WLSDPLY-06644> <Adding Domain RestfulManagementServices>
####<Apr 1, 2024 10:50:45 PM> <INFO> <TopologyDiscoverer> <get_clusters> <WLSDPLY-06601> <Discovering 2 clusters>
####<Apr 1, 2024 10:50:45 PM> <INFO> <TopologyDiscoverer> <get_clusters> <WLSDPLY-06602> <Adding Cluster ClusterA>
####<Apr 1, 2024 10:50:48 PM> <INFO> <TopologyDiscoverer> <get_clusters> <WLSDPLY-06602> <Adding Cluster ClusterB>
####<Apr 1, 2024 10:50:50 PM> <INFO> <TopologyDiscoverer> <get_servers> <WLSDPLY-06603> <Discovering 5 servers>
####<Apr 1, 2024 10:50:50 PM> <INFO> <TopologyDiscoverer> <get_servers> <WLSDPLY-06604> <Adding Server AdminServer>
####<Apr 1, 2024 10:51:03 PM> <INFO> <TopologyDiscoverer> <get_servers> <WLSDPLY-06604> <Adding Server ManagedServerA1>
####<Apr 1, 2024 10:51:15 PM> <INFO> <TopologyDiscoverer> <get_servers> <WLSDPLY-06604> <Adding Server ManagedServerA2>
####<Apr 1, 2024 10:51:27 PM> <INFO> <TopologyDiscoverer> <get_servers> <WLSDPLY-06604> <Adding Server ManagedServerB1>
####<Apr 1, 2024 10:51:40 PM> <INFO> <TopologyDiscoverer> <get_servers> <WLSDPLY-06604> <Adding Server ManagedServerB2>
####<Apr 1, 2024 10:51:52 PM> <INFO> <TopologyDiscoverer> <get_migratable_targets> <WLSDPLY-06607> <Discovering 4 Migratable Targets>
####<Apr 1, 2024 10:51:52 PM> <INFO> <TopologyDiscoverer> <get_migratable_targets> <WLSDPLY-06608> <Adding Migratable Target ManagedServerA1 (migratable)>
####<Apr 1, 2024 10:51:52 PM> <INFO> <TopologyDiscoverer> <get_migratable_targets> <WLSDPLY-06608> <Adding Migratable Target ManagedServerA2 (migratable)>
####<Apr 1, 2024 10:51:53 PM> <INFO> <TopologyDiscoverer> <get_migratable_targets> <WLSDPLY-06608> <Adding Migratable Target ManagedServerB1 (migratable)>
####<Apr 1, 2024 10:51:53 PM> <INFO> <TopologyDiscoverer> <get_migratable_targets> <WLSDPLY-06608> <Adding Migratable Target ManagedServerB2 (migratable)>
####<Apr 1, 2024 10:51:53 PM> <INFO> <TopologyDiscoverer> <get_server_templates> <WLSDPLY-06605> <Discovering 0 server templates>
####<Apr 1, 2024 10:51:53 PM> <INFO> <TopologyDiscoverer> <get_unix_machines> <WLSDPLY-06609> <Discovering 2 Unix machines>
####<Apr 1, 2024 10:51:53 PM> <INFO> <TopologyDiscoverer> <get_machines> <WLSDPLY-06611> <Discovering 2 machines>
####<Apr 1, 2024 10:51:53 PM> <INFO> <TopologyDiscoverer> <get_machines> <WLSDPLY-06612> <Adding Machine machineA>
####<Apr 1, 2024 10:51:53 PM> <INFO> <TopologyDiscoverer> <get_machines> <WLSDPLY-06612> <Adding Machine machineB>
####<Apr 1, 2024 10:51:54 PM> <INFO> <TopologyDiscoverer> <discover_security_configuration> <WLSDPLY-06622> <Adding Security Configuration>
####<Apr 1, 2024 10:51:56 PM> <INFO> <TopologyDiscoverer> <get_embedded_ldap_configuration> <WLSDPLY-06639> <Skipping Embedded LDAP Server Configuration>
####<Apr 1, 2024 10:51:56 PM> <INFO> <TopologyDiscoverer> <_get_log_filters> <WLSDPLY-06628> <Discovering 0 Log Filters>
####<Apr 1, 2024 10:51:56 PM> <INFO> <TopologyDiscoverer> <_get_reliable_delivery_policies> <WLSDPLY-06630> <Discovering 0 Reliable Delivery Policies>
####<Apr 1, 2024 10:51:56 PM> <INFO> <TopologyDiscoverer> <_get_virtual_hosts> <WLSDPLY-06647> <Discovering 0 Virtual Hosts>
####<Apr 1, 2024 10:51:56 PM> <INFO> <TopologyDiscoverer> <_get_xml_entity_caches> <WLSDPLY-06632> <Discovering 0 XML Entity Caches>
####<Apr 1, 2024 10:51:56 PM> <INFO> <TopologyDiscoverer> <_get_xml_registries> <WLSDPLY-06634> <Discovering 0 XML Registries>
####<Apr 1, 2024 10:51:56 PM> <INFO> <TopologyDiscoverer> <_get_ws_securities> <WLSDPLY-06649> <Discovering 0 Web Service Securities>
####<Apr 1, 2024 10:51:56 PM> <INFO> <ResourcesDiscoverer> <discover> <WLSDPLY-06300> <Discovering domain model resources>
####<Apr 1, 2024 10:51:56 PM> <INFO> <GlobalResourcesDiscoverer> <get_self_tuning> <WLSDPLY-06441> <Adding Self Tuning>
####<Apr 1, 2024 10:51:56 PM> <INFO> <GlobalResourcesDiscoverer> <get_startup_classes> <WLSDPLY-06442> <Discovering 0 Startup Classes>
####<Apr 1, 2024 10:51:56 PM> <INFO> <GlobalResourcesDiscoverer> <get_shutdown_classes> <WLSDPLY-06445> <Discovering 0 Shutdown Classes>
####<Apr 1, 2024 10:51:56 PM> <INFO> <GlobalResourcesDiscoverer> <_get_webapp_container> <WLSDPLY-06615> <Cross Domain Security is enabled, do not remove SecurityConfiguration CredentialEncrypted>
####<Apr 1, 2024 10:51:56 PM> <INFO> <GlobalResourcesDiscoverer> <get_singleton_service> <WLSDPLY-06445> <Discovering 0 Shutdown Classes>
####<Apr 1, 2024 10:51:56 PM> <INFO> <GlobalResourcesDiscoverer> <get_jolt_connection_pool> <WLSDPLY-06449> <Discovering 0 Jolt Connection Pools>
####<Apr 1, 2024 10:51:56 PM> <INFO> <GlobalResourcesDiscoverer> <get_wtc_servers> <WLSDPLY-06451> <Discovering 0 WTC Servers>
####<Apr 1, 2024 10:51:56 PM> <INFO> <CommonResourcesDiscoverer> <get_datasources> <WLSDPLY-06340> <Discovering 1 JDBC System Resources>
####<Apr 1, 2024 10:51:56 PM> <INFO> <CommonResourcesDiscoverer> <get_datasources> <WLSDPLY-06341> <Adding JDBC System Resource JDBC-Data-Source-Oracle>
####<Apr 1, 2024 10:51:57 PM> <INFO> <CommonResourcesDiscoverer> <get_foreign_jndi_providers> <WLSDPLY-06342> <Discovering 0 Foreign JNDI Providers>
####<Apr 1, 2024 10:51:57 PM> <INFO> <CommonResourcesDiscoverer> <get_mail_sessions> <WLSDPLY-06344> <Discovering 0 Mail Sessions>
####<Apr 1, 2024 10:51:57 PM> <INFO> <CommonResourcesDiscoverer> <get_file_stores> <WLSDPLY-06346> <Discovering 0 File Stores>
####<Apr 1, 2024 10:51:58 PM> <INFO> <CommonResourcesDiscoverer> <get_jdbc_stores> <WLSDPLY-06350> <Discovering 0 JDBC Stores>
####<Apr 1, 2024 10:51:58 PM> <INFO> <CommonResourcesDiscoverer> <get_path_services> <WLSDPLY-06355> <Discovering 0 Path Services>
####<Apr 1, 2024 10:51:58 PM> <INFO> <JmsResourcesDiscoverer> <get_jms_servers> <WLSDPLY-06470> <Discovering 0 JMS Servers>
####<Apr 1, 2024 10:51:58 PM> <INFO> <JmsResourcesDiscoverer> <get_saf_agents> <WLSDPLY-06472> <Discovering 0 SAF Agents>
####<Apr 1, 2024 10:51:58 PM> <INFO> <JmsResourcesDiscoverer> <get_jms_system_resources> <WLSDPLY-06478> <Discovering 0 JMS System Resources>
####<Apr 1, 2024 10:51:58 PM> <INFO> <JmsResourcesDiscoverer> <get_jms_bridge_destinations> <WLSDPLY-06474> <Discovering 0 JMS Bridge Destinations>
####<Apr 1, 2024 10:51:58 PM> <INFO> <JmsResourcesDiscoverer> <get_jms_bridges> <WLSDPLY-06476> <Discovering 0 JMS Messaging Bridges>
####<Apr 1, 2024 10:51:58 PM> <INFO> <CommonResourcesDiscoverer> <get_wldf_system_resources> <WLSDPLY-06357> <Discovering 0 WLDF System Resources>
####<Apr 1, 2024 10:51:58 PM> <INFO> <CommonResourcesDiscoverer> <_get_named_resources> <WLSDPLY-06364> <Discovering 0 SystemComponent elements>
####<Apr 1, 2024 10:51:58 PM> <INFO> <CoherenceResourcesDiscoverer> <_get_coherence_clusters> <WLSDPLY-06311> <Discovering 0 Coherence Cluster System Resources>
####<Apr 1, 2024 10:51:58 PM> <INFO> <DeploymentsDiscoverer> <discover> <WLSDPLY-06380> <Discovering domain model deployments>
####<Apr 1, 2024 10:51:58 PM> <INFO> <DeploymentsDiscoverer> <get_applications> <WLSDPLY-06391> <Discovering 1 Applications>
####<Apr 1, 2024 10:51:58 PM> <INFO> <DeploymentsDiscoverer> <get_applications> <WLSDPLY-06392> <Adding Application basicWebapp>
####<Apr 1, 2024 10:51:58 PM> <INFO> <DeploymentsDiscoverer> <add_application_to_archive> <WLSDPLY-06394> <Add application basicWebapp binary /git/weblogic/dave-basic-project/dave-basic-webapp-project/target/basicWebapp.war to archive>
####<Apr 1, 2024 10:51:58 PM> <INFO> <MultiTenantDiscoverer> <discover> <WLSDPLY-06700> <Discover Multi-tenant>
####<Apr 1, 2024 10:51:58 PM> <INFO> <MultiTenantTopologyDiscoverer> <discover> <WLSDPLY-06709> <Discover Multi-tenant Topology>
####<Apr 1, 2024 10:51:58 PM> <INFO> <MultiTenantResourcesDiscoverer> <discover> <WLSDPLY-06707> <Discover Multi-tenant Resources>
####<Apr 1, 2024 10:51:58 PM> <INFO> <filter_helper> <apply_filters> <WLSDPLY-20017> <No filter configuration file /app/weblogic-deploy/lib/model_filters.json>
####<Apr 1, 2024 10:51:58 PM> <INFO> <filter_helper> <apply_filters> <WLSDPLY-20016> <No filters of type discover found in filter configuration file /app/weblogic-deploy/lib/model_filters.json>
####<Apr 1, 2024 10:51:58 PM> <INFO> <variable_injector> <inject_variables_keyword_file> <WLSDPLY-19519> <No variables were inserted into the model during variable replacement>
####<Apr 1, 2024 10:51:58 PM> <INFO> <Validator> <__validate_model_file> <WLSDPLY-05002> <Performing validation in TOOL mode for WebLogic Server version 14.1.1.0.0 and WLST ONLINE mode>
####<Apr 1, 2024 10:51:58 PM> <INFO> <Validator> <__validate_model_file> <WLSDPLY-05003> <Performing model validation on the /git/weblogic/wdt/DiscoveredABDataSourceEARDomain.yaml model file>
####<Apr 1, 2024 10:51:58 PM> <INFO> <Validator> <__validate_model_file> <WLSDPLY-05005> <Performing archive validation on the /git/weblogic/wdt/DiscoveredABDataSourceEARDomain.zip archive file>
####<Apr 1, 2024 10:51:58 PM> <INFO> <Validator> <__validate_model_section> <WLSDPLY-05008> <Validating the domainInfo section of the model file>
####<Apr 1, 2024 10:51:58 PM> <INFO> <Validator> <__validate_model_section> <WLSDPLY-05008> <Validating the topology section of the model file>
####<Apr 1, 2024 10:51:58 PM> <INFO> <Validator> <__validate_model_section> <WLSDPLY-05008> <Validating the resources section of the model file>
####<Apr 1, 2024 10:51:58 PM> <INFO> <Validator> <__validate_model_section> <WLSDPLY-05008> <Validating the appDeployments section of the model file>

Issue Log for discoverDomain version 3.5.4 running WebLogic version 14.1.1.0.0 online mode:

Total:   SEVERE :    0  WARNING :    0

discoverDomain.sh completed successfully (exit code = 0)

Created model
$ cat /git/weblogic/wdt/DiscoveredABDataSourceEARDomain.yaml
# This model was created using the WebLogic Deploy Tooling 3.5.4 discoverDomain tool
# running in ONLINE mode against a domain using WebLogic Server 14.1.1.0.0.
# 
domainInfo:
    AdminUserName: --FIX ME--
    AdminPassword: --FIX ME--
topology:
    Name: base_domain
    Cluster:
        ClusterA: {}
        ClusterB: {}
    Server:
        AdminServer:
            Machine: machineA
        ManagedServerA1:
            ListenPort: 7003
            Machine: machineA
            Cluster: ClusterA
            JTAMigratableTarget:
                UserPreferredServer: ManagedServerA1
                Cluster: ClusterA
        ManagedServerA2:
            ListenPort: 7004
            Machine: machineA
            Cluster: ClusterA
            JTAMigratableTarget:
                UserPreferredServer: ManagedServerA2
                Cluster: ClusterA
        ManagedServerB1:
            ListenPort: 7005
            Machine: machineB
            Cluster: ClusterB
            JTAMigratableTarget:
                UserPreferredServer: ManagedServerB1
                Cluster: ClusterB
        ManagedServerB2:
            ListenPort: 7006
            Machine: machineB
            Cluster: ClusterB
            JTAMigratableTarget:
                UserPreferredServer: ManagedServerB2
                Cluster: ClusterB
    MigratableTarget:
        ManagedServerA1 (migratable):
            Notes: This is a system generated default migratable target for a server.
                Do not delete manually.
            UserPreferredServer: ManagedServerA1
            Cluster: ClusterA
        ManagedServerA2 (migratable):
            Notes: This is a system generated default migratable target for a server.
                Do not delete manually.
            UserPreferredServer: ManagedServerA2
            Cluster: ClusterA
        ManagedServerB1 (migratable):
            Notes: This is a system generated default migratable target for a server.
                Do not delete manually.
            UserPreferredServer: ManagedServerB1
            Cluster: ClusterB
        ManagedServerB2 (migratable):
            Notes: This is a system generated default migratable target for a server.
                Do not delete manually.
            UserPreferredServer: ManagedServerB2
            Cluster: ClusterB
    Machine:
        machineA: {}
        machineB: {}
    SecurityConfiguration:
        NodeManagerPasswordEncrypted: --FIX ME--
resources:
    JDBCSystemResource:
        JDBC-Data-Source-Oracle:
            Target: ClusterA,ClusterB
            JdbcResource:
                DatasourceType: GENERIC
                JDBCConnectionPoolParams:
                    TestTableName: SQL ISVALID
                JDBCDataSourceParams:
                    JNDIName: jdbc/DaveOracle
                JDBCDriverParams:
                    DriverName: oracle.jdbc.OracleDriver
                    PasswordEncrypted: --FIX ME--
                    URL: jdbc:oracle:thin:@//localhost:1521/DAVE_ORACLE
                    Properties:
                        user:
                            Value: weblogic
appDeployments:
    Application:
        basicWebapp:
            SourcePath: wlsdeploy/applications/basicWebapp.war
            ModuleType: war
            Target: ClusterA,ClusterB

Created archive
$ unzip -l /git/weblogic/wdt/DiscoveredABDataSourceEARDomain.zip
Archive:  /git/weblogic/wdt/DiscoveredABDataSourceEARDomain.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
    22119  04-01-2024 22:51   wlsdeploy/applications/basicWebapp.war
---------                     -------
    22119                     1 file

Extract domain
$ ./extractDomainResource.sh -oracle_home /app/weblogic -domain_home /app/weblogic/user_projects/domains/base_domain/ -model_file  /git/weblogic/wdt/DiscoveredABDataSourceEARDomain.yaml  -output_dir  /git/weblogic/wdt/resource/k8s/domainABDSEAR -target wko
JDK version is 11.0.22+9-LTS-219
JAVA_HOME = /usr/java/jdk-11
CLASSPATH = /app/weblogic-deploy/lib/weblogic-deploy-core.jar:/app/weblogic/wlserver/server/lib/weblogic.jar
JAVA_PROPERTIES = -Djava.util.logging.config.class=oracle.weblogic.deploy.logging.WLSDeployLoggingConfig -Dpython.cachedir.skip=true -Dpython.console= 
/usr/java/jdk-11/bin/java -cp /app/weblogic-deploy/lib/weblogic-deploy-core.jar:/app/weblogic/wlserver/server/lib/weblogic.jar           -Djava.util.logging.config.class=oracle.weblogic.deploy.logging.WLSDeployLoggingConfig -Dpython.cachedir.skip=true -Dpython.console=            -Dpython.path=/app/weblogic/wlserver/common/wlst/modules/jython-modules.jar/Lib           org.python.util.jython           /app/weblogic-deploy/lib/python/extract_resource.py -oracle_home /app/weblogic -domain_home /app/weblogic/user_projects/domains/base_domain/ -model_file /git/weblogic/wdt/DiscoveredABDataSourceEARDomain.yaml -output_dir /git/weblogic/wdt/resource/k8s/domainABDSEAR -target wko
####<Apr 1, 2024 10:57:26 PM> <INFO> <WebLogicDeployToolingVersion> <logVersionInfo> <WLSDPLY-01750> <The WebLogic Deploy Tooling extractDomainResource version is 3.5.4:.43d3afb:Mar 14, 2024 11:55 UTC>
####<Apr 1, 2024 10:57:26 PM> <INFO> <WLSDeployLoggingConfig> <logLoggingDirectory> <WLSDPLY-01755> <The extractDomainResource program will write its log to directory /app/weblogic-deploy/logs>
####<Apr 1, 2024 10:57:26 PM> <INFO> <DomainTypedef> <__init__> <WLSDPLY-12328> <Domain type WLS type definition file /app/weblogic-deploy/lib/typedefs/WLS.json version WLS_14 does not contain a postCreateRcuSchemasScript section>
####<Apr 1, 2024 10:57:26 PM> <INFO> <DomainTypedef> <__init__> <WLSDPLY-12321> <Domain type WLS type definition file /app/weblogic-deploy/lib/typedefs/WLS.json version WLS_14 does not contain a postCreateDomainScript section>
####<Apr 1, 2024 10:57:26 PM> <INFO> <DomainTypedef> <__init__> <WLSDPLY-12328> <Domain type WLS type definition file /app/weblogic-deploy/lib/typedefs/WLS.json version WLS_14 does not contain a postCreateRcuSchemasScript section>
####<Apr 1, 2024 10:57:26 PM> <INFO> <DomainTypedef> <__init__> <WLSDPLY-12321> <Domain type WLS type definition file /app/weblogic-deploy/lib/typedefs/WLS.json version WLS_14 does not contain a postCreateDomainScript section>
####<Apr 1, 2024 10:57:26 PM> <INFO> <ModelContext> <__copy_from_args> <WLSDPLY-01050> <WebLogic version for aliases is 14.1.1.0.0>
####<Apr 1, 2024 10:57:26 PM> <INFO> <filter_helper> <apply_filters> <WLSDPLY-20016> <No filters of type extract found in filter configuration file /app/weblogic-deploy/lib/targets/wko/target.json>
####<Apr 1, 2024 10:57:26 PM> <INFO> <Validator> <__validate_model_file> <WLSDPLY-05002> <Performing validation in TOOL mode for WebLogic Server version 14.1.1.0.0 and WLST OFFLINE mode>
####<Apr 1, 2024 10:57:26 PM> <INFO> <Validator> <__validate_model_file> <WLSDPLY-05003> <Performing model validation on the /git/weblogic/wdt/DiscoveredABDataSourceEARDomain.yaml model file>
####<Apr 1, 2024 10:57:26 PM> <INFO> <Validator> <__validate_model_section> <WLSDPLY-05008> <Validating the domainInfo section of the model file>
####<Apr 1, 2024 10:57:26 PM> <INFO> <Validator> <__validate_model_section> <WLSDPLY-05008> <Validating the topology section of the model file>
####<Apr 1, 2024 10:57:27 PM> <INFO> <Validator> <__validate_model_section> <WLSDPLY-05008> <Validating the resources section of the model file>
####<Apr 1, 2024 10:57:27 PM> <INFO> <Validator> <__validate_model_section> <WLSDPLY-05008> <Validating the appDeployments section of the model file>
####<Apr 1, 2024 10:57:27 PM> <INFO> <Validator> <__validate_single_path_in_archive> <WLSDPLY-05025> <Attribute SourcePath in model location appDeployments:/Application/basicWebapp references archive entry wlsdeploy/applications/basicWebapp.war but the archive file was not provided>
####<Apr 1, 2024 10:57:27 PM> <INFO> <vz_config_helper> <_create_file> <WLSDPLY-01662> <Creating target configuration file /git/weblogic/wdt/resource/k8s/domainABDSEAR/wko-domain.yaml>
####<Apr 1, 2024 10:57:27 PM> <INFO> <crd_file_updater> <update_from_model> <WLSDPLY-01675> <Updating target output file "/git/weblogic/wdt/resource/k8s/domainABDSEAR/wko-domain.yaml" from the kubernetes section of the model>

Issue Log for extractDomainResource version 3.5.4 running WebLogic version 14.1.1.0.0 offline mode:

Total:   SEVERE :    0  WARNING :    0

extractDomainResource.sh completed successfully (exit code = 0)

Created domain resource
$ cat /git/weblogic/wdt/resource/k8s/domainABDSEAR/wko-domain.yaml
apiVersion: weblogic.oracle/v8
kind: Domain
metadata:
    name: base-domain
    namespace: base-domain
    labels:
        weblogic.domainUID: base-domain
spec:
    domainHome: /app/weblogic/user_projects/domains/base_domain/
    domainHomeSourceType: FromModel
    image: '{{{imageName}}}'
    # Add any credential secrets that are required to pull the image
    imagePullSecrets: []
    webLogicCredentialsSecret:
        name: base-domain-weblogic-credentials
    serverPod:
        env:
          - name: JAVA_OPTIONS
            value: -Dweblogic.StdoutDebugEnabled=false
          - name: USER_MEM_ARGS
            value: '-Djava.security.egd=file:/dev/./urandom -Xms64m -Xmx256m '
    clusters:
      - clusterName: ClusterA
        # replicas: 99  # Set a specific replica count for this cluster
        serverPod:
            affinity:
                podAntiAffinity:
                    preferredDuringSchedulingIgnoredDuringExecution:
                      - weight: 100
                        podAffinityTerm:
                            labelSelector:
                                matchExpressions:
                                  - key: weblogic.clusterName
                                    operator: In
                                    values:
                                      - $(CLUSTER_NAME)
                            topologyKey: kubernetes.io/hostname
      - clusterName: ClusterB
        # replicas: 99  # Set a specific replica count for this cluster
        serverPod:
            affinity:
                podAntiAffinity:
                    preferredDuringSchedulingIgnoredDuringExecution:
                      - weight: 100
                        podAffinityTerm:
                            labelSelector:
                                matchExpressions:
                                  - key: weblogic.clusterName
                                    operator: In
                                    values:
                                      - $(CLUSTER_NAME)
                            topologyKey: kubernetes.io/hostname
    configuration:
        istio:
            enabled: false
        introspectorJobActiveDeadlineSeconds: 900
        model:
            domainType: WLS
            modelHome: '{{{modelHome}}}'
            runtimeEncryptionSecret: base-domain-runtime-encryption-secret