From 60c502f64fe78552b230ff31af041e6d239c47a0 Mon Sep 17 00:00:00 2001 From: Rosemary Marano Date: Tue, 18 Dec 2018 14:36:35 -0500 Subject: [PATCH 01/10] review and edit READMEs --- .../12213-domain-home-in-image-wdt/README.md | 52 +++++++++---------- .../12213-domain-home-in-image/README.md | 32 ++++++------ 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/OracleWebLogic/samples/12213-domain-home-in-image-wdt/README.md b/OracleWebLogic/samples/12213-domain-home-in-image-wdt/README.md index 87b430afd6..a8802e7180 100644 --- a/OracleWebLogic/samples/12213-domain-home-in-image-wdt/README.md +++ b/OracleWebLogic/samples/12213-domain-home-in-image-wdt/README.md @@ -8,29 +8,29 @@ The Dockerfile uses the `createDomain` script from the Oracle WebLogic Deploy To ### WDT Model File and Archive -This sample includes a basic WDT model, `simple-topology.yaml`, that describes the intended configuration of the domain within the Docker image. WDT models can be created and modified using a text editor, following the format and rule described in the README file for the WDT project in GitHub. +This sample includes a basic WDT model, `simple-topology.yaml`, that describes the intended configuration of the domain within the Docker image. WDT models can be created and modified using a text editor, following the format and rules described in the README file for the WDT project in GitHub. -Another option is to use the WDT `discoverDomain` tool to create a model. This process is also described in the WDT project's README file. A user can use the tool to analyze an existing domain, and create a model based on its configuration. The user may choose to customize the model before using it to create a new Docker image. +Another option is to use the WDT `discoverDomain` tool to create a model. This process is also described in the WDT project README file. A user can use the tool to analyze an existing domain, and create a model based on its configuration. The user may choose to customize the model before using it to create a new Docker image. -The sample model is accompanied by a properties file whose values can be changed to customize a domain. The model's variable tokens are replaced with values from 'simple-topology.properties' when building the docker image. The properties files can be created and modified using a text editor. Select variables in the properties file are used by the Dockerfile during the build to persist ENV variables and expose ports in the image. - -Care should be taken to secure the credentials that are present in the model. The ADMIN credential attributes in the sample model have a file token referencing a special property file. Each special property file must only contain a single property and can be created and modified using a text editor. The sample includes the files adminuser.properties and the adminpass.properties in the properties/docker_build directory. +The sample model is accompanied by a properties file whose values can be changed to customize a domain. The model's variable tokens are replaced with values from 'simple-topology.properties' when building the Docker image. The properties files can be created and modified using a text editor. Select variables in the properties file are used by the Dockerfile during the build to persist ENV variables and expose ports in the image. + +Care should be taken to secure the credentials that are present in the model. The ADMIN credential attributes in the sample model have a file token referencing a special property file. Each special property file must only contain a single property and can be created and modified using a text editor. The sample includes the files `adminuser.properties` and the `adminpass.properties` in the `properties/docker_build` directory. See the README file for more information on using property and file tokens in the WDT model. -The ADMIN credentials are necessary to start the Admin or Managed Server in a docker container. The sample provides security.properties in the properties/docker-run directory. This file contains the admin credentials and additional properties used to customize the Weblogic Server start. +The ADMIN credentials are necessary to start the Administration or Managed Server in a Docker container. The sample provides `security.properties` in the `properties/docker-run` directory. This file contains the admin credentials and additional properties used to customize the WebLogic Server start. -Note: Oracle recommends that the adminpass.properties, adminuser.properties and security.properties files be deleted or secured after the image is built and the WebLogic Server are started so that the user name and password are not inadvertently exposed. +**Note**: Oracle recommends that the `adminpass.properties`, `adminuser.properties`, and `security.properties` files be deleted or secured after the image is built and the WebLogic Server is started so that the user name and password are not inadvertently exposed. Domain creation may require the deployment of applications and libraries. This is accomplished by creating a ZIP archive with a specific structure, then referencing those items in the model. This sample creates and deploys a simple ZIP archive containing a small application WAR. That archive is built in the sample directory prior to creating the Docker image. When the WDT `discoverDomain` tool is used on an existing domain, a ZIP archive is created containing any necessary applications and libraries. The corresponding configuration for those applications and libraries is added to the model. -### How to Build and Run +## How to Build and Run **NOTE:** The image is based on a WebLogic Server image in the docker-images project: `oracle/weblogic:12.2.1.3-developer`. Build that image to your local repository before building this sample. -The WebLogic Deploy Tool installer is required to build this image. Add `weblogic-deploy.zip` to the sample directory. The docker sample requires a minimum release of weblogic-deploy-tooling-0.14. This release uses the new command argument -domain_home on the createDomain step. This argument allows a Domain Home path with a domain folder name that can be different from the Domain name in the model file. +The WebLogic Deploy Tool installer is required to build this image. Add `weblogic-deploy.zip` to the sample directory. The Docker sample requires a minimum release of weblogic-deploy-tooling-0.14. This release uses the new command argument `-domain_home` on the `createDomain` step. This argument allows a domain home path with a domain folder name that can be different from the domain name in the model file. $ wget https://github.com/oracle/weblogic-deploy-tooling/releases/download/weblogic-deploy-tooling-0.14/weblogic-deploy.zip @@ -38,10 +38,9 @@ This sample deploys a simple, one-page web application contained in a ZIP archiv $ ./build-archive.sh -The sample requires the Admin Host, Admin Port and Admin Name. It also requires the Managed Server port and the domain Debug - Port. The ports will be EXPOSED through Docker. The other arguments are persisted in the image to be used when running a - container. If an attribute is not provided as a --build-arg on the build command, the following defaults are set. +The sample requires the Admin Host, Admin Port and Admin Name. It also requires the Managed Server port and the domain debug port. The ports will be EXPOSED through Docker. The other arguments are persisted in the image to be used when running a container. If an attribute is not provided as a `--build-arg` on the `build` command, the following defaults are set. +``` CUSTOM_ADMIN_NAME = admin-server The value is persisted to the image as ADMIN_NAME @@ -59,8 +58,9 @@ CUSTOM_DEBUG_PORT = 8453 CUSTOM_DOMAIN_NAME = base_domain The value is persisted to the image as DOMAIN_NAME +``` -To build this sample taking the defaults, run: +To build this sample keeping the defaults, run: $ docker build \ --build-arg WDT_MODEL=simple-topology.yaml \ @@ -69,16 +69,16 @@ To build this sample taking the defaults, run: --force-rm=true \ -t 12213-domain-wdt . -This will use the model, variable and archive files in the sample directory. +This will use the model, variable, and archive files in the sample directory. -This sample provides a script which will read the model variable file and parse the domain, admin and managed server information - into a string of --build-arg statements. This build arg string is exported as environment variable BUILD_ARG. - The sample script specifically parses the sample variable file. Use it as an example to parse a custom variable file. - This will insure that the values docker exposes and persists in the image are the same values configured in the domain. +This sample provides a script which will read the model variable file and parse the domain, Administration and Managed Server information + into a string of `--build-arg` statements. This build `arg` string is exported as the environment variable `BUILD_ARG`. + The sample script specifically parses the sample variable file. Use it as an example to parse a custom variable file. + This will insure that the values Docker exposes and persists in the image are the same values configured in the domain. To parse the sample variable file and build the sample, run: - $ container-scripts/setEnv.sh properties/docker-build/domain.properties + $ container-scripts/setEnv.sh properties/docker-build/domain.properties $ docker build \ $BUILD_ARG \ @@ -88,14 +88,14 @@ To parse the sample variable file and build the sample, run: --force-rm=true \ -t 12213-domain-wdt . -This sample provides a Derby Data Source that is targeted to the Managed Server cluster. The Derby database is created - in the Admin Server container when the container is run. To turn off the database create, set DERBY_FLAG="false" in the - runtime security.properties used on the docker run statement. +This sample provides a Derby data source that is targeted to the Managed Server cluster. The Derby database is created + in the Administration Server container when the container is run. To turn off the database create, set `DERBY_FLAG="false"` in the + runtime `security.properties` used in the `docker run` statement. -The Admin Server and each Managed Server are run in containers from this build image. In the sample, the securities.properties file - is provided on the docker run command. In addition to the credentials and DERBY_FLAG, the file contains the JAVA_OPTS for the - running Admin or Managed server. Mount the properties/docker-run directory to the container so that file can be accessed by the - server start script. It is the responsibility of the user to manage this volume, and the security.properties, in the container. +The Administration Server and each Managed Server are run in containers from this build image. In the sample, the `securities.properties` file + is provided in the `docker run` command. In addition to the credentials and DERBY_FLAG, the file contains the JAVA_OPTS for the + running Administration or Managed Server. Mount the `properties/docker-run` directory to the container so that file can be accessed by the + server start script. It is the responsibility of the user to manage this volume, and the `security.properties`, in the container. To start the containerized Administration Server, run: diff --git a/OracleWebLogic/samples/12213-domain-home-in-image/README.md b/OracleWebLogic/samples/12213-domain-home-in-image/README.md index d184ec3989..9366c679d3 100644 --- a/OracleWebLogic/samples/12213-domain-home-in-image/README.md +++ b/OracleWebLogic/samples/12213-domain-home-in-image/README.md @@ -2,29 +2,29 @@ Example Image with a WebLogic Server Domain ============================================= This Dockerfile extends the Oracle WebLogic image by creating a sample WebLogic Server 12.2.1.3 domain and cluster into a Docker image. -A domain is created inside the image and utility scripts are copied into the image, enabling users to start an Administration Server and a Managed Servers each running in separate containers. As part of the domain configuration there is a data source that connects to a Derby database started in the Admin Server container. The data source in the Managed servers connect to the Derby database in the Admin server container. +A domain is created inside the image and utility scripts are copied into the image, enabling users to start an Administration Server and a Managed Server, each running in separate containers. As part of the domain configuration, there is a data source that connects to a Derby database started in the Admin Server container. The data source in the Managed servers connect to the Derby database in the Administration Server container. -**Note:** In this sample the WebLogic servers are configured with a blank listen address, when running JTA transactions you must use a DNS server to configure the listen addresses to use DNS names. +**Note:** In this sample, the WebLogic Servers are configured with a blank listen address; when running JTA transactions, you must use a DNS server to configure the listen addresses to use DNS names. -### Providing the Administration Server user name and password +## Providing the Administration Server user name and password -**During Docker Build:** The user name, password must be supplied in domain_security.properties file. The property file is located in the directory `docker-images/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker_build` in the HOST. This property file gets copied into the image directory `/u01/oracle/properties`. +**During Docker Build:** The user name and password must be supplied in the `domain_security.properties` file. The property file is located in the directory `docker-images/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker_build` in the HOST. This property file gets copied into the image directory `/u01/oracle/properties`. -**During Docker Run:** The user name and password must be supplied in a security.properties file. The property file is located in a `docker-images/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker_run` in the HOST. In the Docker run command line add the -v option maps the property file into the image directory /u01/oracle/properties. +**During Docker Run:** The user name and password must be supplied in a `security.properties` file. The property file is located in a `docker-images/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker_run` directory in the HOST. On the Docker run command line, the `-v` option maps the property file into the image directory `/u01/oracle/properties`. -The security property files enables the scripts to configure the correct authentication for the WebLogic Administration Server and Managed Servers. The format of the security.properties and domain_security.properties files are key=value pairs, for example: +The security property files enable the scripts to configure the correct authentication for the WebLogic Administration Server and Managed Servers. The format of the `security.properties` and `domain_security.properties` files are key=value pairs, for example: username=myadminusername password=myadminpassword -**Note:** Oracle recommends that the domain_security.properties and security.properties files be deleted or secured after the container and the WebLogic Server are started so that the user name and password are not inadvertently exposed. +**Note:** Oracle recommends that the `domain_security.properties` and `security.properties` files be deleted or secured after the container and the WebLogic Server are started so that the user name and password are not inadvertently exposed. -### How to Build and Run -At build time the domain.properties file is used to pass in the Docker arguments and configuration parameters for the Weblogic domain. +## How to Build and Run +At build time, the `domain.properties` file is used to pass in the Docker arguments and configuration parameters for the WebLogic domain. -**During Docker Build:** The domain configuration parameters must be supplied in the domain.properties file. This file is located in the directory `docker-images/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker_build` in the HOST. This property file gets copied into the image directory `/u01/oracle/properties`. +**During Docker Build:** The domain configuration parameters must be supplied in the `domain.properties` file. This file is located in the directory `properties/docker_build` in the HOST. This property file gets copied into the image directory `/u01/oracle/properties`. -The domain property file enables you to customize the parameter to configure the WebLogic domain. The format of the domain.properties are key=value pairs, for example: +The domain property file enables you to customize the parameters to configure the WebLogic domain. The format of the `domain.properties` are key=value pairs, for example: ADMIN_NAME=admin-server ADMIN_HOST=wlsadmin @@ -35,9 +35,9 @@ The domain property file enables you to customize the parameter to configure the PRODUCTION_MODE_ENABLED=true CLUSTER_TYPE=DYNAMIC -**NOTE:** Before invoking the build make sure you have built `oracle/weblogic:12.2.1.3-developer`. +**NOTE:** Before invoking the build make sure you have built `oracle/weblogic:12.2.1.3-developer`. -Under the directory `docker-images/OracleWebLogic/samples/12213-domain-home-in-image/container_scripts` find the script setEnv.sh. This script extracts the following Docker arguments and passes them as a --build-arg to the Dockerfile. +Under the directory `docker-images/OracleWebLogic/samples/12213-domain-home-in-image/container_scripts` find the script `setEnv.sh`. This script extracts the following Docker arguments and passes them as a `--build-arg` to the Dockerfile. * Domain Name: `DOMAIN_NAME` (default: `base_domain`) * Admin Port: `ADMIN_PORT` (default: `7001`) @@ -47,15 +47,15 @@ Under the directory `docker-images/OracleWebLogic/samples/12213-domain-home-in-i * Admin Server Name: `ADMIN_NAME` (default: `admin-server`) * Admin Server Host: `ADMIN_HOST` (default: `wlsadmin`) -**NOTE:** The DOMAIN_HOME will be persisted in the image directory `/u01/oracle/user-projects/domains/$DOMAIN_NAME`. +**NOTE:** The `DOMAIN_HOME` will be persisted in the image directory `/u01/oracle/user-projects/domains/$DOMAIN_NAME`. To build this sample, run: - $ . container-scripts/setEnv.sh ./properties/docker_build/domain.properties + $ . container-scripts/setEnv.sh ./properties/docker_build/domain.properties $ docker build $BUILD_ARG --force-rm=true -t 12213-domain-home-in-image . -**During Docker Run:** of the admin and managed servers, the user name and password need to be passed in as well as some optional parameters. The property file is located in a `docker-images/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker_run` in the HOST. In the Docker run command line add the -v option which maps the property file into the image directory /u01/oracle/properties. +**During Docker Run:** of the Administration and Managed Servers, the user name and password need to be passed in as well as some optional parameters. The property file is located in a `docker-images/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker_run` in the HOST. On the Docker run command line, add the `-v` option which maps the property file into the image directory `/u01/oracle/properties`. To start the containerized Administration Server, run: From 8ee87d79b9de05bc97caaba357aede0c77fe520f Mon Sep 17 00:00:00 2001 From: Monica Riccelli Date: Thu, 20 Dec 2018 18:50:09 -0500 Subject: [PATCH 02/10] Create two different patched images one ontop of WebLogic 12.2.1.3 and one on top of 12.2.1.3 October PSU --- .../Dockerfile.patching-ontop-12213 | 55 +++++++++++++++++ .../Dockerfile.patching-ontop-12213-psu | 60 +++++++++++++++++++ .../samples/12213-patch-wls-for-k8s/README.md | 22 +++++-- .../samples/12213-patch-wls-for-k8s/build.sh | 7 +++ .../p28076014_122130_Generic.download | 2 +- .../p28076014_12213181016_Generic.download | 8 +++ 6 files changed, 147 insertions(+), 7 deletions(-) create mode 100644 OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 create mode 100644 OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213-psu create mode 100644 OracleWebLogic/samples/12213-patch-wls-for-k8s/build.sh create mode 100644 OracleWebLogic/samples/12213-patch-wls-for-k8s/p28076014_12213181016_Generic.download diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 b/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 new file mode 100644 index 0000000000..217f5582e1 --- /dev/null +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 @@ -0,0 +1,55 @@ +# LICENSE UPL 1.0 +# +# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +# +# ORACLE DOCKERFILES PROJECT +# -------------------------- +# This Dockerfile extends the Oracle WebLogic install image, and applies necesary patch for the WebLogic Kubernetes Operator 2.0. The patch 28076014 is applied on top of WebLogic 12.2.1.3. + +# REQUIRED FILES TO BUILD THIS IMAGE +# ---------------------------------- +# (1) p27117282_122130_Generic.zip (This patch is needed only if the WebLogic binary image is created manually from this Github project) +# (2) p28076014_122130_Generic.zip (On top of WebLogic Server 12.2.1.3) +# Download the patches from http://support.oracle.com +# +# HOW TO BUILD THIS IMAGE +# ----------------------- +# Put all downloaded files in the same directory as this Dockerfile +# Run: +# $ sudo docker build -t oracle/weblogic:12213-update-k8s . +# + +# Pull base image +# --------------- +FROM oracle/weblogic:12.2.1.3-developer + +# Maintainer +# ---------- +MAINTAINER Monica Riccelli + +# Environment variables required for this build (do NOT change) +# ------------------------------------------------------------- +ENV PATCH_PKG1="p27117282_122130_Generic.zip" +ENV PATCH_PKG2="p28076014_122130_Generic.zip" + +# Copy supplemental package and scripts +# -------------------------------- +COPY $PATCH_PKG1 $PATCH_PKG2 /u01/ + +# Installation of Supplemental Quick Installer +# -------------------------------------------- +USER root +RUN yum -y install psmisc +USER oracle +RUN cd /u01 && $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG1 && \ + cd /u01/28298734 && $ORACLE_HOME/OPatch/opatch apply -silent && \ + cd /u01 && $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG2 && \ + cd /u01/28076014 && $ORACLE_HOME/OPatch/opatch apply -silent && \ + $ORACLE_HOME/OPatch/opatch util cleanup -silent && \ + rm /u01/$PATCH_PKG1 && rm /u01/$PATCH_PKG2 && \ + rm -rf /u01/28076014 && rm -rf /u01/27117282 && \ + rm -rf /u01/oracle/cfgtoollogs/opatch/* + +WORKDIR ${ORACLE_HOME} + +CMD ["/u01/oracle/createAndStartEmptyDomain.sh"] diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213-psu b/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213-psu new file mode 100644 index 0000000000..7fb91d3ee8 --- /dev/null +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213-psu @@ -0,0 +1,60 @@ +# LICENSE UPL 1.0 +# +# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +# +# ORACLE DOCKERFILES PROJECT +# -------------------------- +# This Dockerfile extends the Oracle WebLogic install image, upgrades OPatch, and applies necesary patch for the WebLogic Kubernetes Operator 2.0. The patch 28076014 is applied on top of the Oct 2018 PSU and requires an upgrade of OPatch to 13.9.4.0. + +# REQUIRED FILES TO BUILD THIS IMAGE +# ---------------------------------- +# (1) p28186730_139400_Generic.zip (Opatch update) +# (2) p28298734_122130_Generic.zip (WLS PATCH SET UPDATE 12.2.1.3.181016 ) +# (3) p28076014_12213181016_Generic.zip (On top of WLS PATCH SET UPDATE 12.2.1.3.181016) +# Download the patches from http://support.oracle.com +# +# HOW TO BUILD THIS IMAGE +# ----------------------- +# Put all downloaded files in the same directory as this Dockerfile +# Run: +# $ sudo docker build -t oracle/weblogic:12213-update-k8s . +# + +# Pull base image +# --------------- +FROM oracle/weblogic:12.2.1.3-developer + +# Maintainer +# ---------- +MAINTAINER Monica Riccelli + +# Environment variables required for this build (do NOT change) +# ------------------------------------------------------------- +ENV PATCH_PKG0="p28186730_139400_Generic.zip" +ENV PATCH_PKG1="p28298734_122130_Generic.zip" +ENV PATCH_PKG2="p28076014_12213181016_Generic.zip" + +# Copy supplemental package and scripts +# -------------------------------- +COPY $PATCH_PKG0 $PATCH_PKG1 $PATCH_PKG2 /u01/ + +# Installation of Supplemental Quick Installer +# -------------------------------------------- +USER root +RUN yum -y install psmisc +USER oracle +RUN cd /u01 && $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG0 && \ + java -jar /u01/6880880/opatch_generic.jar -silent oracle_home=/u01/oracle -ignoreSysPrereqs && \ + echo "opatch updated" && sleep 5 && \ + cd /u01 && $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG1 && \ + cd /u01/28298734 && $ORACLE_HOME/OPatch/opatch apply -silent && \ + cd /u01 && $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG2 && \ + cd /u01/28076014 && $ORACLE_HOME/OPatch/opatch apply -silent && \ + $ORACLE_HOME/OPatch/opatch util cleanup -silent && \ + rm /u01/$PATCH_PKG0 && rm /u01/$PATCH_PKG1 && rm /u01/$PATCH_PKG2 && \ + rm -rf /u01/6880880 && rm -rf /u01/28076014 && rm -rf /u01/28298734 && \ + rm -rf /u01/oracle/cfgtoollogs/opatch/* + +WORKDIR ${ORACLE_HOME} + +CMD ["/u01/oracle/createAndStartEmptyDomain.sh"] diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md b/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md index 0efb5c39cf..b7bfd1def1 100644 --- a/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md @@ -1,21 +1,31 @@ Example of Image with WLS Domain ================================ -This Dockerfile extends the Oracle WebLogic install image by updating OPatch and applying a patch. Before applying the WebLogic 12.2.1.3 October PSU PATCH 12.2.1.3.181016WLSPSU, Opatch needs to be updated with PATCH 28186730: OPATCH 13.9.4.0.0 FOR FMW/WLS 12.2.1.3. +There are two Dockerfiles which extend the Oracle WebLogic install image and apply ia necesary patch for the WebLogic Kubernetes Operator 2.0. + + 1)Dockerfile.patching-ontop-12213: applies two patches `p28076014` (on top of WLS 12.2.1.3) and `p27117282` (this patch is needed only if the WebLogic binary image is created manually from this Github project). + 2)Dockerfile.patching-ontop-12213-psu: applies patch `p28298734` (WLS PATCH SET UPDATE 12.2.1.3.181016), patch `p28076014` (on top of WLS 12.2.1.3 October PSU), and `p28186730` (Opatch update). + Before applying the WebLogic 12.2.1.3 October PSU PATCH 12.2.1.3.181016WLSPSU, Opatch needs to be updated with PATCH 28186730: OPATCH 13.9.4.0.0 FOR FMW/WLS 12.2.1.3. **Notes:** Historically, OPatch was updated by unzipping and replacing the `ORACLE_HOME/OPatch` directory. For versions greater than or equal to 13.6, now it uses the OUI installation tooling. This ensures that the installer both executes the file updates and logs the components and file changes to the OUI meta-data. A pure unzip install means the OUI tooling is not aware of these changes, which has on occasion, led to upgrade-related issues. -We are applying patch `p28076014_12213_Generic.zip` which is required for the WebLogic Kubernetes Operator to work. +We are applying patch `p28076014` which is required for the WebLogic Kubernetes Operator to work. ## How to build First make sure you have built **oracle/weblogic:12.2.1.3-developer**. + If you want to patch on top of WebLogic Server 12.2.1.3 download: + file [p28076014_122130_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. + file [p27117282_122130_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. - Then download file [p28186730_139400_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. - Then download file [p28298734_122130_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. - Then download file [p28076014_122130_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. + If you want to patch on top of WebLogic Server 12.2.1.3 October PSU download: + file [p28186730_139400_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. + file [p28298734_122130_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. + file [p28076014_12213181016_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. To build, run: - $ docker build -t oracle/weblogic:12213-patch-wls-for-k8s . + $ docker build -t oracle/weblogic:12213-patch-wls-for-k8s -f Dockerfile.patching-ontop-12213 . + or + $ docker build -t oracle/weblogic:12213-patch-wls-for-k8s -f Dockerfile.patching-ontop-12213-psu . ## Verify that the patch has been applied correctly Run a container from the image: diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/build.sh b/OracleWebLogic/samples/12213-patch-wls-for-k8s/build.sh new file mode 100644 index 0000000000..83bc86e71a --- /dev/null +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/build.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# +#Copyright (c) 2014-2018 Oracle and/or its affiliates. All rights reserved. +# +#Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. +# +docker build -t oracle/weblogic:12213-patch-wls-for-k8s -f $DOCFILE . diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/p28076014_122130_Generic.download b/OracleWebLogic/samples/12213-patch-wls-for-k8s/p28076014_122130_Generic.download index 7196e8255f..5f798fc41f 100644 --- a/OracleWebLogic/samples/12213-patch-wls-for-k8s/p28076014_122130_Generic.download +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/p28076014_122130_Generic.download @@ -2,7 +2,7 @@ # # https://support.oracle.com # -# 1) Download the ZIP file "Patch" for WebLogic 12.2.1.3 +# 1) Download the ZIP file "Patch" for WebLogic 12.2.1.3 # 2) Put the ZIP file in the same location as this .download file # b57a9b37a0828575e2931a3da88f821e p28076014_122130_Generic.zip diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/p28076014_12213181016_Generic.download b/OracleWebLogic/samples/12213-patch-wls-for-k8s/p28076014_12213181016_Generic.download new file mode 100644 index 0000000000..dc558785c8 --- /dev/null +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/p28076014_12213181016_Generic.download @@ -0,0 +1,8 @@ +# Download this file from the following address: +# +# https://support.oracle.com +# +# 1) Download the ZIP file "Patch" for WebLogic 12.2.1.3 +# 2) Put the ZIP file in the same location as this .download file +# +fdbaea99a68c79910098b66db6017485 p28076014_12213181016_Generic.zip From 629923c706b15943b84b5ccafa8fdcca5b254929 Mon Sep 17 00:00:00 2001 From: Monica Riccelli Date: Thu, 20 Dec 2018 20:01:18 -0500 Subject: [PATCH 03/10] Create two different patched images one ontop of WebLogic 12.2.1.3 and one on top of 12.2.1.3 October PSU --- .../12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 | 4 +--- OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md | 3 ++- OracleWebLogic/samples/12213-patch-wls-for-k8s/build.sh | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) mode change 100644 => 100755 OracleWebLogic/samples/12213-patch-wls-for-k8s/build.sh diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 b/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 index 217f5582e1..c5f8c1fb32 100644 --- a/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 @@ -38,11 +38,9 @@ COPY $PATCH_PKG1 $PATCH_PKG2 /u01/ # Installation of Supplemental Quick Installer # -------------------------------------------- -USER root -RUN yum -y install psmisc USER oracle RUN cd /u01 && $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG1 && \ - cd /u01/28298734 && $ORACLE_HOME/OPatch/opatch apply -silent && \ + cd /u01/27117282 && $ORACLE_HOME/OPatch/opatch apply -silent && \ cd /u01 && $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG2 && \ cd /u01/28076014 && $ORACLE_HOME/OPatch/opatch apply -silent && \ $ORACLE_HOME/OPatch/opatch util cleanup -silent && \ diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md b/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md index b7bfd1def1..ade2ac6a85 100644 --- a/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md @@ -37,7 +37,8 @@ cd OPatch and run: ./opatch version ./opatch lspatches -You will see the OPatch version being 13.9.4.0.0 and the one-off patches 27117282 and 28076014 applied. + 1) You will see one-off patches 28076014, and 27117282. + 2) You will see one-off patches 28076014, 28298734 WLS PATCH SET UPDATE 12.2.1.3.181016, and the OPatch version being 13.9.4.0.0. ## Run a single server domain The WebLogic Server install image (patched in this sample) allows you to run a container with a single WebLogic Server domain. This makes it extremely simple to deploy applications and any resources the applications might need. The steps below describe how to run the single server domain container. diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/build.sh b/OracleWebLogic/samples/12213-patch-wls-for-k8s/build.sh old mode 100644 new mode 100755 index 83bc86e71a..c9669bcef0 --- a/OracleWebLogic/samples/12213-patch-wls-for-k8s/build.sh +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/build.sh @@ -4,4 +4,4 @@ # #Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. # -docker build -t oracle/weblogic:12213-patch-wls-for-k8s -f $DOCFILE . +docker build -t oracle/weblogic:12213-patch-wls-for-k8s -f Dockerfile.$1 . From ee73a94c5377cdbacd3042068aa134c58e76677b Mon Sep 17 00:00:00 2001 From: Monica Riccelli Date: Thu, 20 Dec 2018 20:50:55 -0500 Subject: [PATCH 04/10] formatting of Dockerfiles --- .../Dockerfile.patching-ontop-12213 | 7 +++++-- .../Dockerfile.patching-ontop-12213-psu | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 b/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 index c5f8c1fb32..77c0858f8e 100644 --- a/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 @@ -4,11 +4,14 @@ # # ORACLE DOCKERFILES PROJECT # -------------------------- -# This Dockerfile extends the Oracle WebLogic install image, and applies necesary patch for the WebLogic Kubernetes Operator 2.0. The patch 28076014 is applied on top of WebLogic 12.2.1.3. +# This Dockerfile extends the Oracle WebLogic install image, and applies necesary +# patch for the WebLogic Kubernetes Operator 2.0. The patch 28076014 is applied on top +# of WebLogic 12.2.1.3. # REQUIRED FILES TO BUILD THIS IMAGE # ---------------------------------- -# (1) p27117282_122130_Generic.zip (This patch is needed only if the WebLogic binary image is created manually from this Github project) +# (1) p27117282_122130_Generic.zip (This patch is needed only if the WebLogic binary image +# is created manually from this Github project) # (2) p28076014_122130_Generic.zip (On top of WebLogic Server 12.2.1.3) # Download the patches from http://support.oracle.com # diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213-psu b/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213-psu index 7fb91d3ee8..8423f93892 100644 --- a/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213-psu +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213-psu @@ -4,7 +4,9 @@ # # ORACLE DOCKERFILES PROJECT # -------------------------- -# This Dockerfile extends the Oracle WebLogic install image, upgrades OPatch, and applies necesary patch for the WebLogic Kubernetes Operator 2.0. The patch 28076014 is applied on top of the Oct 2018 PSU and requires an upgrade of OPatch to 13.9.4.0. +# This Dockerfile extends the Oracle WebLogic install image, upgrades OPatch, and applies necesary patch for +# the WebLogic Kubernetes Operator 2.0. The patch 28076014 is applied on top of the Oct 2018 PSU and requires i +# an upgrade of OPatch to 13.9.4.0. # REQUIRED FILES TO BUILD THIS IMAGE # ---------------------------------- From a2c938f3b3cbf2dd3b0b3710a9c806c7ab4e9494 Mon Sep 17 00:00:00 2001 From: Monica Riccelli Date: Thu, 20 Dec 2018 20:55:41 -0500 Subject: [PATCH 05/10] formatting of README --- .../samples/12213-patch-wls-for-k8s/README.md | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md b/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md index ade2ac6a85..ac316d7495 100644 --- a/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md @@ -2,9 +2,9 @@ Example of Image with WLS Domain ================================ There are two Dockerfiles which extend the Oracle WebLogic install image and apply ia necesary patch for the WebLogic Kubernetes Operator 2.0. - 1)Dockerfile.patching-ontop-12213: applies two patches `p28076014` (on top of WLS 12.2.1.3) and `p27117282` (this patch is needed only if the WebLogic binary image is created manually from this Github project). - 2)Dockerfile.patching-ontop-12213-psu: applies patch `p28298734` (WLS PATCH SET UPDATE 12.2.1.3.181016), patch `p28076014` (on top of WLS 12.2.1.3 October PSU), and `p28186730` (Opatch update). - Before applying the WebLogic 12.2.1.3 October PSU PATCH 12.2.1.3.181016WLSPSU, Opatch needs to be updated with PATCH 28186730: OPATCH 13.9.4.0.0 FOR FMW/WLS 12.2.1.3. +1)Dockerfile.patching-ontop-12213: applies two patches `p28076014` (on top of WLS 12.2.1.3) and `p27117282` (this patch is needed only if the WebLogic binary image is created manually from this Github project). + +2)Dockerfile.patching-ontop-12213-psu: applies patch `p28298734` (WLS PATCH SET UPDATE 12.2.1.3.181016), patch `p28076014` (on top of WLS 12.2.1.3 October PSU), and `p28186730` (Opatch update). Before applying the WebLogic 12.2.1.3 October PSU PATCH 12.2.1.3.181016WLSPSU, Opatch needs to be updated with PATCH 28186730: OPATCH 13.9.4.0.0 FOR FMW/WLS 12.2.1.3. **Notes:** Historically, OPatch was updated by unzipping and replacing the `ORACLE_HOME/OPatch` directory. For versions greater than or equal to 13.6, now it uses the OUI installation tooling. This ensures that the installer both executes the file updates and logs the components and file changes to the OUI meta-data. A pure unzip install means the OUI tooling is not aware of these changes, which has on occasion, led to upgrade-related issues. @@ -12,14 +12,14 @@ We are applying patch `p28076014` which is required for the WebLogic Kubernetes ## How to build First make sure you have built **oracle/weblogic:12.2.1.3-developer**. - If you want to patch on top of WebLogic Server 12.2.1.3 download: - file [p28076014_122130_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. - file [p27117282_122130_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. - - If you want to patch on top of WebLogic Server 12.2.1.3 October PSU download: - file [p28186730_139400_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. - file [p28298734_122130_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. - file [p28076014_12213181016_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. +If you want to patch on top of WebLogic Server 12.2.1.3 download: + file [p28076014_122130_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. + file [p27117282_122130_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. + +If you want to patch on top of WebLogic Server 12.2.1.3 October PSU download: + file [p28186730_139400_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. + file [p28298734_122130_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. + file [p28076014_12213181016_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. To build, run: From 719bdce459fae29430100bf14e8936d5aa6d9fe4 Mon Sep 17 00:00:00 2001 From: Monica Riccelli Date: Thu, 20 Dec 2018 23:30:47 -0500 Subject: [PATCH 06/10] Remove files that are no longer pertinent --- .../12213-patch-wls-for-k8s/Dockerfile | 60 ------------------- .../p28076014_12213_Generic.download | 8 --- 2 files changed, 68 deletions(-) delete mode 100644 OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile delete mode 100644 OracleWebLogic/samples/12213-patch-wls-for-k8s/p28076014_12213_Generic.download diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile b/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile deleted file mode 100644 index 91689f5ed7..0000000000 --- a/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile +++ /dev/null @@ -1,60 +0,0 @@ -# LICENSE UPL 1.0 -# -# Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. -# -# ORACLE DOCKERFILES PROJECT -# -------------------------- -# This Dockerfile extends the Oracle WebLogic install image, upgrades OPatch, and applies a patch. - -# REQUIRED FILES TO BUILD THIS IMAGE -# ---------------------------------- -# (1) p28186730_139400_Generic.zip -# (2) p28298734_122130_Generic.zip -# (3) p28076014_122130_Generic.zip -# Download the patches from http://support.oracle.com -# -# HOW TO BUILD THIS IMAGE -# ----------------------- -# Put all downloaded files in the same directory as this Dockerfile -# Run: -# $ sudo docker build -t oracle/weblogic:12213-update-k8s . -# - -# Pull base image -# --------------- -FROM oracle/weblogic:12.2.1.3-developer - -# Maintainer -# ---------- -MAINTAINER Monica Riccelli - -# Environment variables required for this build (do NOT change) -# ------------------------------------------------------------- -ENV PATCH_PKG0="p28186730_139400_Generic.zip" -ENV PATCH_PKG1="p28298734_122130_Generic.zip" -ENV PATCH_PKG2="p28076014_122130_Generic.zip" - -# Copy supplemental package and scripts -# -------------------------------- -COPY $PATCH_PKG0 $PATCH_PKG1 $PATCH_PKG2 /u01/ - -# Installation of Supplemental Quick Installer -# -------------------------------------------- -USER root -RUN yum -y install psmisc -USER oracle -RUN cd /u01 && $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG0 && \ - java -jar /u01/6880880/opatch_generic.jar -silent oracle_home=/u01/oracle -ignoreSysPrereqs && \ - echo "opatch updated" && sleep 5 && \ - cd /u01 && $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG1 && \ - cd /u01/28298734 && $ORACLE_HOME/OPatch/opatch apply -silent && \ - cd /u01 && $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG2 && \ - cd /u01/28076014 && $ORACLE_HOME/OPatch/opatch apply -silent && \ - $ORACLE_HOME/OPatch/opatch util cleanup -silent && \ - rm /u01/$PATCH_PKG0 && rm /u01/$PATCH_PKG1 && rm /u01/$PATCH_PKG2 && \ - rm -rf /u01/6880880 && rm -rf /u01/28076014 && rm -rf /u01/28298734 && \ - rm -rf /u01/oracle/cfgtoollogs/opatch/* - -WORKDIR ${ORACLE_HOME} - -CMD ["/u01/oracle/createAndStartEmptyDomain.sh"] diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/p28076014_12213_Generic.download b/OracleWebLogic/samples/12213-patch-wls-for-k8s/p28076014_12213_Generic.download deleted file mode 100644 index 7196e8255f..0000000000 --- a/OracleWebLogic/samples/12213-patch-wls-for-k8s/p28076014_12213_Generic.download +++ /dev/null @@ -1,8 +0,0 @@ -# Download this file from the following address: -# -# https://support.oracle.com -# -# 1) Download the ZIP file "Patch" for WebLogic 12.2.1.3 -# 2) Put the ZIP file in the same location as this .download file -# -b57a9b37a0828575e2931a3da88f821e p28076014_122130_Generic.zip From 2a814d306e7a908d919e901f39f5a60bb1ec1213 Mon Sep 17 00:00:00 2001 From: Monica Riccelli Date: Fri, 21 Dec 2018 09:42:33 -0500 Subject: [PATCH 07/10] add comments and correct typos --- .../12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 | 4 ++-- .../Dockerfile.patching-ontop-12213-psu | 2 +- OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md | 2 +- OracleWebLogic/samples/12213-patch-wls-for-k8s/build.sh | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 b/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 index 77c0858f8e..bb8b606845 100644 --- a/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 @@ -18,8 +18,8 @@ # HOW TO BUILD THIS IMAGE # ----------------------- # Put all downloaded files in the same directory as this Dockerfile -# Run: -# $ sudo docker build -t oracle/weblogic:12213-update-k8s . +# +# $ sudo docker build -t oracle/weblogic:12213-update-k8s -f Dockerfile.patching-ontop-12213 . # # Pull base image diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213-psu b/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213-psu index 8423f93892..4fde853053 100644 --- a/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213-psu +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213-psu @@ -19,7 +19,7 @@ # ----------------------- # Put all downloaded files in the same directory as this Dockerfile # Run: -# $ sudo docker build -t oracle/weblogic:12213-update-k8s . +# $ sudo docker build -t oracle/weblogic:12213-update-k8s Dockerfile.patching-ontop-12213-psu . # # Pull base image diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md b/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md index ac316d7495..1b67d2e63e 100644 --- a/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md @@ -1,6 +1,6 @@ Example of Image with WLS Domain ================================ -There are two Dockerfiles which extend the Oracle WebLogic install image and apply ia necesary patch for the WebLogic Kubernetes Operator 2.0. +There are two Dockerfiles which extend the Oracle WebLogic binary image and apply a necessary patch for the WebLogic Kubernetes Operator 2.0. 1)Dockerfile.patching-ontop-12213: applies two patches `p28076014` (on top of WLS 12.2.1.3) and `p27117282` (this patch is needed only if the WebLogic binary image is created manually from this Github project). diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/build.sh b/OracleWebLogic/samples/12213-patch-wls-for-k8s/build.sh index c9669bcef0..859c2c35dc 100755 --- a/OracleWebLogic/samples/12213-patch-wls-for-k8s/build.sh +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/build.sh @@ -4,4 +4,6 @@ # #Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. # +# Build the image using Dockerfile.patching-ontop-12213 to apply patch 28076014 based on WebLogic 12.2.1.3, or build +# the image using Dockerfile.patching-ontop-12213-psu to apply patch 28076014 ontop of WebLogic 12.2.1.3 October PSU. docker build -t oracle/weblogic:12213-patch-wls-for-k8s -f Dockerfile.$1 . From c15dbaefc29a0d084c6591070a29a3c7cd691803 Mon Sep 17 00:00:00 2001 From: Monica Riccelli Date: Fri, 21 Dec 2018 10:27:25 -0500 Subject: [PATCH 08/10] Fix text in Dockerfile --- .../12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 b/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 index bb8b606845..5b4bf2354a 100644 --- a/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/Dockerfile.patching-ontop-12213 @@ -18,7 +18,7 @@ # HOW TO BUILD THIS IMAGE # ----------------------- # Put all downloaded files in the same directory as this Dockerfile -# +# Run: # $ sudo docker build -t oracle/weblogic:12213-update-k8s -f Dockerfile.patching-ontop-12213 . # From 6c6431f6c85e91a8804086e605995da9bd743f7e Mon Sep 17 00:00:00 2001 From: Rosemary Marano Date: Thu, 3 Jan 2019 16:39:29 -0500 Subject: [PATCH 09/10] edit and format README --- .../samples/12213-patch-wls-for-k8s/README.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md b/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md index 1b67d2e63e..861528419c 100644 --- a/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md +++ b/OracleWebLogic/samples/12213-patch-wls-for-k8s/README.md @@ -1,22 +1,24 @@ Example of Image with WLS Domain ================================ -There are two Dockerfiles which extend the Oracle WebLogic binary image and apply a necessary patch for the WebLogic Kubernetes Operator 2.0. +There are two Dockerfiles which extend the Oracle WebLogic binary image and apply a necessary patch for the WebLogic Kubernetes Operator 2.0. -1)Dockerfile.patching-ontop-12213: applies two patches `p28076014` (on top of WLS 12.2.1.3) and `p27117282` (this patch is needed only if the WebLogic binary image is created manually from this Github project). +1.) `Dockerfile.patching-ontop-12213`: applies two patches `p28076014` (on top of WLS 12.2.1.3) and `p27117282` (this patch is needed only if the WebLogic binary image is created manually from this GitHub project). -2)Dockerfile.patching-ontop-12213-psu: applies patch `p28298734` (WLS PATCH SET UPDATE 12.2.1.3.181016), patch `p28076014` (on top of WLS 12.2.1.3 October PSU), and `p28186730` (Opatch update). Before applying the WebLogic 12.2.1.3 October PSU PATCH 12.2.1.3.181016WLSPSU, Opatch needs to be updated with PATCH 28186730: OPATCH 13.9.4.0.0 FOR FMW/WLS 12.2.1.3. +2.) `Dockerfile.patching-ontop-12213-psu`: applies patch `p28298734` (WLS PATCH SET UPDATE 12.2.1.3.181016), patch `p28076014` (on top of WLS 12.2.1.3 October PSU), and `p28186730` (Opatch update). Before applying the WebLogic 12.2.1.3 October PSU PATCH 12.2.1.3.181016WLSPSU, Opatch needs to be updated with PATCH 28186730: OPATCH 13.9.4.0.0 FOR FMW/WLS 12.2.1.3. -**Notes:** Historically, OPatch was updated by unzipping and replacing the `ORACLE_HOME/OPatch` directory. For versions greater than or equal to 13.6, now it uses the OUI installation tooling. This ensures that the installer both executes the file updates and logs the components and file changes to the OUI meta-data. A pure unzip install means the OUI tooling is not aware of these changes, which has on occasion, led to upgrade-related issues. +**Note**: Historically, OPatch was updated by unzipping and replacing the `ORACLE_HOME/OPatch` directory. For versions greater than or equal to 13.6, now it uses the OUI installation tooling. This ensures that the installer both executes the file updates and logs the components and file changes to the OUI meta-data. A pure unzip install means the OUI tooling is not aware of these changes, which has on occasion, led to upgrade-related issues. We are applying patch `p28076014` which is required for the WebLogic Kubernetes Operator to work. ## How to build First make sure you have built **oracle/weblogic:12.2.1.3-developer**. If you want to patch on top of WebLogic Server 12.2.1.3 download: + file [p28076014_122130_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. file [p27117282_122130_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. If you want to patch on top of WebLogic Server 12.2.1.3 October PSU download: + file [p28186730_139400_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. file [p28298734_122130_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. file [p28076014_12213181016_Generic.zip](http://support.oracle.com) and place it in the same directory as this README. @@ -24,7 +26,7 @@ If you want to patch on top of WebLogic Server 12.2.1.3 October PSU download: To build, run: $ docker build -t oracle/weblogic:12213-patch-wls-for-k8s -f Dockerfile.patching-ontop-12213 . - or + or $ docker build -t oracle/weblogic:12213-patch-wls-for-k8s -f Dockerfile.patching-ontop-12213-psu . ## Verify that the patch has been applied correctly @@ -64,7 +66,7 @@ You can override the default values of the following parameters during runtime w * `ADMINISTRATION_PORT_ENABLED` (default: `true`) * `ADMINISTRATION_PORT` (default: `9002`) -**NOTE**: For security, the Administration port 9002 is enabled by default. If you would like to disable the Administration port, set `ADMINISTRTATION_PORT_ENABLED` to false. If you intend to run these images in production, then you must change the Production Mode to `production`. To set the `DOMAIN_NAME`, you must set both `DOMAIN_NAME` and `DOMAIN_HOME`. +**NOTE**: For security, the Administration port 9002 is enabled by default. If you would like to disable the Administration port, set `ADMINISTRTATION_PORT_ENABLED` to `false`. If you intend to run these images in production, then you must change the Production Mode to `production`. To set the `DOMAIN_NAME`, you must set both `DOMAIN_NAME` and `DOMAIN_HOME`. ``` $docker run -d -p 7001:7001 -p 9002:9002 -v HOST PATH where the domain.properties file is :/u01/oracle/properties -e ADMINISTRATION_PORT_ENABLED=true -e DOMAIN_HOME=/u01/oracle/user_projects/domains/abc_domain -e DOMAIN_NAME=abc_domain oracle/weblogic:12213-opatch-update @@ -77,7 +79,7 @@ Run the WLS Administration Console: In your browser, enter `https://xxx.xx.x.x:9002/console`. Your browser will request that you accept the Security Exception. To avoid the Security Exception, you must update the WebLogic Server SSL configuration with a custom identity certificate. ## Samples for WebLogic multi-server domains and cluster -To give users an idea of how to create a WebLogic domain and cluster from a custom Dockerfile which extends the WebLogic Server install image, we provide a few samples for 12c versions of the developer distribution. For an example, look at the 12213-domain-home-in-image sample. +To give users an idea of how to create a WebLogic domain and cluster from a custom Dockerfile which extends the WebLogic Server install image, we provide a few samples for 12c versions of the developer distribution. For an example, look at the `12213-domain-home-in-image` sample. # Copyright Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. From 1db6a0af43ef8a9f0097e7e1d734d638155df615 Mon Sep 17 00:00:00 2001 From: Monica Riccelli Date: Thu, 3 Jan 2019 18:05:44 -0500 Subject: [PATCH 10/10] Remove configuration of DERBY DB from sample --- .../12213-domain-home-in-image/README.md | 2 +- .../container-scripts/create-wls-domain.py | 82 +++++++++---------- .../container-scripts/startAdminServer.sh | 9 -- .../container-scripts/startManagedServer.sh | 8 -- .../properties/docker-build/domain.properties | 12 --- .../properties/docker-run/security.properties | 1 - 6 files changed, 42 insertions(+), 72 deletions(-) diff --git a/OracleWebLogic/samples/12213-domain-home-in-image/README.md b/OracleWebLogic/samples/12213-domain-home-in-image/README.md index 15ad104359..da42eddc3a 100644 --- a/OracleWebLogic/samples/12213-domain-home-in-image/README.md +++ b/OracleWebLogic/samples/12213-domain-home-in-image/README.md @@ -2,7 +2,7 @@ Example Image with a WebLogic Server Domain ============================================= This Dockerfile extends the Oracle WebLogic image by creating a sample WebLogic Server 12.2.1.3 domain and cluster into a Docker image. -A domain is created inside the image and utility scripts are copied into the image, enabling users to start an Administration Server and a Managed Server, each running in separate containers. As part of the domain configuration, there is a data source that connects to a Derby database started in the Admin Server container. The data source in the Managed servers connect to the Derby database in the Administration Server container. +A domain is created inside the image and utility scripts are copied into the image, enabling users to start an Administration Server and a Managed Server, each running in separate containers. **Note:** In this sample, the WebLogic Servers are configured with a blank listen address; when running JTA transactions, you must use a DNS server to configure the listen addresses to use DNS names. diff --git a/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/create-wls-domain.py b/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/create-wls-domain.py index 016c5f40dd..999add154e 100644 --- a/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/create-wls-domain.py +++ b/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/create-wls-domain.py @@ -54,7 +54,7 @@ def getEnvVar(var): print('cluster_type : [%s]' % cluster_type); print('managed_server_name_base : [%s]' % managed_server_name_base); print('production_mode_enabled : [%s]' % production_mode_enabled); -print('dsname : [%s]' % dsname); +#print('dsname : [%s]' % dsname); print('t3_channel_port : [%s]' % t3_channel_port); print('t3_public_address : [%s]' % t3_public_address); @@ -159,46 +159,46 @@ def getEnvVar(var): # Create a Data Source # ====================== -cd('/') -print('Configuring a Data Source: %s' % dsname); -create(dsname, 'JDBCSystemResource') -cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname) -cmo.setName(dsname) - -cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname) -create('myJdbcDataSourceParams','JDBCDataSourceParams') -cd('JDBCDataSourceParams/NO_NAME_0') -set('JNDIName', java.lang.String(dsjndiname)) -set('GlobalTransactionsProtocol', java.lang.String('None')) - -cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname) -create('myJdbcDriverParams','JDBCDriverParams') -cd('JDBCDriverParams/NO_NAME_0') -set('DriverName', dsdriver) -set('URL', dsurl) -set('PasswordEncrypted', dspassword) -set('UseXADataSourceInterface', 'false') - -print 'create JDBCDriverParams Properties' -create('myProperties','Properties') -cd('Properties/NO_NAME_0') -create('user','Property') -cd('Property/user') -set('Value', dsusername) - -cd('../../') -create('databaseName','Property') -cd('Property/databaseName') -set('Value', dsdbname) - -print 'create JDBCConnectionPoolParams' -cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname) -create('myJdbcConnectionPoolParams','JDBCConnectionPoolParams') -cd('JDBCConnectionPoolParams/NO_NAME_0') -set('TestTableName','SQL SELECT 1 FROM DUAL') -set('InitialCapacity',int(dsinitalcapacity)) - -print('Done setting attributes for Data Source: %s' % dsname); +#cd('/') +#print('Configuring a Data Source: %s' % dsname); +#create(dsname, 'JDBCSystemResource') +#cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname) +#cmo.setName(dsname) + +#cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname) +#create('myJdbcDataSourceParams','JDBCDataSourceParams') +#cd('JDBCDataSourceParams/NO_NAME_0') +#set('JNDIName', java.lang.String(dsjndiname)) +#set('GlobalTransactionsProtocol', java.lang.String('None')) + +#cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname) +#create('myJdbcDriverParams','JDBCDriverParams') +#cd('JDBCDriverParams/NO_NAME_0') +#set('DriverName', dsdriver) +#set('URL', dsurl) +#set('PasswordEncrypted', dspassword) +#set('UseXADataSourceInterface', 'false') + +#print 'create JDBCDriverParams Properties' +#create('myProperties','Properties') +#cd('Properties/NO_NAME_0') +#create('user','Property') +#cd('Property/user') +#set('Value', dsusername) + +#cd('../../') +#create('databaseName','Property') +#cd('Property/databaseName') +#set('Value', dsdbname) + +#print 'create JDBCConnectionPoolParams' +#cd('/JDBCSystemResource/' + dsname + '/JdbcResource/' + dsname) +#create('myJdbcConnectionPoolParams','JDBCConnectionPoolParams') +#cd('JDBCConnectionPoolParams/NO_NAME_0') +#set('TestTableName','SQL SELECT 1 FROM DUAL') +#set('InitialCapacity',int(dsinitalcapacity)) + +#print('Done setting attributes for Data Source: %s' % dsname); # Assign # ====== diff --git a/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/startAdminServer.sh b/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/startAdminServer.sh index 63021f27c8..3960f76007 100755 --- a/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/startAdminServer.sh +++ b/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/startAdminServer.sh @@ -94,15 +94,6 @@ if [ -z "${JAVA_OPTIONS}" ]; then fi export JAVA_OPTIONS=${JAVA_OPTIONS} -#Define start of Derby Database -#echo "Java Options: ${JAVA_OPTIONS}" -#DERBY_FLAG=`awk '{print $1}' ${SEC_PROPERTIES_FILE} | grep ^DERBY_FLAG= | cut -d "=" -f2` -#if [ -z "${DERBY_FLAG}" ]; then -# DERBY_FLAG="true" -#fi -#export DERBY_FLAG=${DERBY_FLAG} -#echo "Start Derby: ${DERBY_FLAG}" - # Create domain mkdir -p ${AS_SECURITY} echo "username=${USER}" >> ${AS_SECURITY}/boot.properties diff --git a/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/startManagedServer.sh b/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/startManagedServer.sh index 3ffef7b6fa..c6335cffe5 100755 --- a/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/startManagedServer.sh +++ b/OracleWebLogic/samples/12213-domain-home-in-image/container-scripts/startManagedServer.sh @@ -46,14 +46,6 @@ fi export JAVA_OPTIONS=${JAVA_OPTIONS} echo "Java Options: ${JAVA_OPTIONS}" -#Set env to Start Derby DB -#DERBY_FLAG=`awk '{print $1}' ${SEC_PROPERTIES_FILE} | grep ^DERBY_FLAG= | cut -d "=" -f2` -#if [ -z "${DERBY_FLAG}" ]; then -# DERBY_FLAG="true" -#fi -#export DERBY_FLAG=${DERBY_FLAG} -#echo "Start Derby: ${DERBY_FLAG}" - # Create Managed Server mkdir -p ${MS_SECURITY} echo "username=${USER}" >> ${MS_SECURITY}/boot.properties diff --git a/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker-build/domain.properties b/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker-build/domain.properties index 0f22622de9..aefe841c4f 100644 --- a/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker-build/domain.properties +++ b/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker-build/domain.properties @@ -9,23 +9,11 @@ CLUSTER_NAME=cluster-1 DEBUG_PORT=8453 DB_PORT=1527 DEBUG_FLAG=true -DERBY_FLAG=true PRODUCTION_MODE_ENABLED=true CLUSTER_TYPE=DYNAMIC JAVA_OPTIONS=-Dweblogic.StdoutDebugEnabled=false T3_CHANNEL_PORT=30012 T3_PUBLIC_ADDRESS=kubernetes -#Derby Data Source parameters -dsname=DockerDS -dsdbname=DerbyDB;create=true -dsjndiname=/DockerDS -dsdriver=org.apache.derby.jdbc.ClientXADataSource -dsurl=jdbc:derby://localhost:1527/DerbyDB;ServerName=localhost;databaseName=DerbyDB;create=true -dsusername=dbuser -dspassword=dbpassword -dstestquery=SQL SELECT 1 FROM SYS.SYSTABLES -dsinitalcapacity=0 -dsmaxcapacity=15 #Oracle database settings #dsname=DockerDS2 #dsdbname=default;create=true diff --git a/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker-run/security.properties b/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker-run/security.properties index fd16d73bda..bd5269b9e9 100644 --- a/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker-run/security.properties +++ b/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker-run/security.properties @@ -1,5 +1,4 @@ username=myuser password=mypassword1 JAVA_OPTIONS=-Dweblogic.StdoutDebugEnabled=false -DERBY_FLAG=true