From 2cb8661eaedc05425e329d19376f7743b4e2eb87 Mon Sep 17 00:00:00 2001 From: mriccell Date: Mon, 6 May 2024 18:08:45 -0400 Subject: [PATCH 01/19] Adding OHS 12.2.1.4 dockerfiles and removing 12.2.1.3 which is no longer supported --- OracleHTTPServer/COPYRIGHT | 2 +- OracleHTTPServer/README.md | 16 +-- ....1.3.0_ohs_linux64_Disk1_1of1.zip.download | 12 -- .../{12.2.1.3.0 => 12.2.1.4.0}/Dockerfile | 18 +-- .../configureWLSProxyPlugin.sh | 2 +- .../container-scripts/create-sa-ohs-domain.py | 4 +- .../container-scripts/helloWorld.html | 0 .../container-scripts/mod_wl_ohs.conf.sample | 4 +- .../container-scripts/provisionOHS.sh | 32 +++-- .../container-scripts/start-ohs.py | 5 +- .../container-scripts/stop-ohs.py | 4 +- ....1.4.0_ohs_linux64_Disk1_1of1.zip.download | 12 ++ .../{12.2.1.3.0 => 12.2.1.4.0}/install.file | 2 +- .../{12.2.1.3.0 => 12.2.1.4.0}/oraInst.loc | 2 +- .../12.2.1.4.0/properties/domain.properties | 2 + .../dockerfiles/buildDockerImage.sh | 6 +- .../samples/12214-patch/Dockerfile | 47 ++++++++ .../samples/12214-patch/README.md | 55 +++++++++ .../p36393221_122140_Linux-x86-64.download | 8 ++ .../dockerfiles/12.2.1.3/Checksum.developer | 6 - .../dockerfiles/12.2.1.3/Checksum.generic | 6 - .../dockerfiles/12.2.1.3/Dockerfile.developer | 114 ------------------ .../dockerfiles/12.2.1.3/Dockerfile.generic | 111 ----------------- OracleWebLogic/dockerfiles/12.2.1.3/README.md | 100 --------------- .../container-scripts/create-wls-domain.py | 91 -------------- .../createAndStartEmptyDomain.sh | 75 ------------ .../container-scripts/get_healthcheck_url.sh | 11 -- ...fmw_12.2.1.3.0_wls_Disk1_1of1.zip.download | 5 - ....2.1.3.0_wls_quick_Disk1_1of1.zip.download | 5 - .../dockerfiles/12.2.1.3/install.file | 12 -- .../dockerfiles/12.2.1.3/oraInst.loc | 2 - .../12.2.1.3/properties/domain.properties | 2 - 32 files changed, 175 insertions(+), 598 deletions(-) delete mode 100644 OracleHTTPServer/dockerfiles/12.2.1.3.0/fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip.download rename OracleHTTPServer/dockerfiles/{12.2.1.3.0 => 12.2.1.4.0}/Dockerfile (86%) rename OracleHTTPServer/dockerfiles/{12.2.1.3.0 => 12.2.1.4.0}/container-scripts/configureWLSProxyPlugin.sh (96%) rename OracleHTTPServer/dockerfiles/{12.2.1.3.0 => 12.2.1.4.0}/container-scripts/create-sa-ohs-domain.py (93%) rename OracleHTTPServer/dockerfiles/{12.2.1.3.0 => 12.2.1.4.0}/container-scripts/helloWorld.html (100%) rename OracleHTTPServer/dockerfiles/{12.2.1.3.0 => 12.2.1.4.0}/container-scripts/mod_wl_ohs.conf.sample (84%) rename OracleHTTPServer/dockerfiles/{12.2.1.3.0 => 12.2.1.4.0}/container-scripts/provisionOHS.sh (80%) rename OracleHTTPServer/dockerfiles/{12.2.1.3.0 => 12.2.1.4.0}/container-scripts/start-ohs.py (89%) rename OracleHTTPServer/dockerfiles/{12.2.1.3.0 => 12.2.1.4.0}/container-scripts/stop-ohs.py (89%) create mode 100644 OracleHTTPServer/dockerfiles/12.2.1.4.0/fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip.download rename OracleHTTPServer/dockerfiles/{12.2.1.3.0 => 12.2.1.4.0}/install.file (91%) rename OracleHTTPServer/dockerfiles/{12.2.1.3.0 => 12.2.1.4.0}/oraInst.loc (68%) create mode 100644 OracleHTTPServer/dockerfiles/12.2.1.4.0/properties/domain.properties create mode 100644 OracleHTTPServer/samples/12214-patch/Dockerfile create mode 100644 OracleHTTPServer/samples/12214-patch/README.md create mode 100644 OracleHTTPServer/samples/12214-patch/p36393221_122140_Linux-x86-64.download delete mode 100644 OracleWebLogic/dockerfiles/12.2.1.3/Checksum.developer delete mode 100644 OracleWebLogic/dockerfiles/12.2.1.3/Checksum.generic delete mode 100644 OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.developer delete mode 100644 OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.generic delete mode 100644 OracleWebLogic/dockerfiles/12.2.1.3/README.md delete mode 100644 OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/create-wls-domain.py delete mode 100755 OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/createAndStartEmptyDomain.sh delete mode 100755 OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/get_healthcheck_url.sh delete mode 100644 OracleWebLogic/dockerfiles/12.2.1.3/fmw_12.2.1.3.0_wls_Disk1_1of1.zip.download delete mode 100644 OracleWebLogic/dockerfiles/12.2.1.3/fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip.download delete mode 100644 OracleWebLogic/dockerfiles/12.2.1.3/install.file delete mode 100644 OracleWebLogic/dockerfiles/12.2.1.3/oraInst.loc delete mode 100644 OracleWebLogic/dockerfiles/12.2.1.3/properties/domain.properties diff --git a/OracleHTTPServer/COPYRIGHT b/OracleHTTPServer/COPYRIGHT index a4d8bc1c4e..ff432292b8 100644 --- a/OracleHTTPServer/COPYRIGHT +++ b/OracleHTTPServer/COPYRIGHT @@ -1,4 +1,4 @@ -Copyright (c) 2001, 2019, Oracle Corporation. All rights reserved. +Copyright (c) 2001, 2024, Oracle Corporation. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/OracleHTTPServer/README.md b/OracleHTTPServer/README.md index 3bd711ce90..229d86ae58 100644 --- a/OracleHTTPServer/README.md +++ b/OracleHTTPServer/README.md @@ -19,9 +19,9 @@ You can also pull the Oracle Server JRE 8 image from [Oracle Container Registry] ### Building OHS Docker Image IMPORTANT: You have to download the OHS binary and put it in place (see .download files inside dockerfiles/). -Download the required package (see .download file) and drop them in the version folder (12.2.1.3.0). Then go into the **dockerfiles** folder and run the **buildDockerImage.sh** script as root providing the version name with -v option. +Download the required package (see .download file) and drop them in the version folder (12.2.1.4.0). Then go into the **dockerfiles** folder and run the **buildDockerImage.sh** script as root providing the version name with -v option. - $ sh buildDockerImage.sh -v 12.2.1.3.0 + $ sh buildDockerImage.sh -v 12.2.1.4.0 IMPORTANT: The resulting image will have a pre-configured domain. @@ -37,20 +37,20 @@ password=mynodemanagerpassword If you want to start the OHS container without specifying any configuration for mod_weblogic: -1. To start the OHS container with oracle/ohs:12.2.1.3.0 image, run the following command: +1. To start the OHS container with oracle/ohs:12.2.1.4.0 image, run the following command: - docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -it --name ohs -p 7777:7777 oracle/ohs:12.2.1.3.0 + docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -it --name ohs -p 7777:7777 oracle/ohs:12.2.1.4.0 If you want to start the OHS container with some pre-specified mod_weblogic configuration: -1. Depending on your weblogic environment , create a **custom_mod_wl_ohs.conf** file by referring to container-scripts/mod_wl_ohs.conf.sample and section 2.4 @ [OHS 12c Documentation](http://docs.oracle.com/middleware/12213/webtier/develop-plugin/oracle.htm#PLGWL553) +1. Depending on your weblogic environment , create a **custom_mod_wl_ohs.conf** file by referring to container-scripts/mod_wl_ohs.conf.sample and section 2.4 @ [OHS 12c Documentation](http://docs.oracle.com/middleware/12214/webtier/develop-plugin/oracle.htm#PLGWL553) 2. Place the custom_mod_wl_ohs.conf file in a directory in the host say,"/scratch/DockerVolume/OHSVolume" and then mount this directory into the container at the location "/config". By doing so, the contents of host directory /scratch/DockerVolume/OHSVolume(and hence custom_mod_wl_ohs.conf) will become available in the container at the mount point. - This mounting can be done by using the -v option with the 'docker run' command as shown below. The following command will start the OHS container with oracle/ohs:12.2.1.3.0 image and the host directory "/scratch/DockerVolume/OHSVolume" will get mounted at the location "/config" in the container: + This mounting can be done by using the -v option with the 'docker run' command as shown below. The following command will start the OHS container with oracle/ohs:12.2.1.4.0 image and the host directory "/scratch/DockerVolume/OHSVolume" will get mounted at the location "/config" in the container: - $ docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -v /scratch/DockerVolume/OHSVolume:/config -w /config -d --name ohs -p 7777:7777 oracle/ohs:12.2.1.3.0 + $ docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -v /scratch/DockerVolume/OHSVolume:/config -w /config -d --name ohs -p 7777:7777 oracle/ohs:12.2.1.4.0 ### Stopping the OHS instance To stop the OHS instance, execute the following command: @@ -75,4 +75,4 @@ To download and run Oracle JDK regardless of inside or outside a Docker containe All scripts and files hosted in this project and GitHub [docker/OracleHTTPServer](./) repository required to build the Docker images are, unless otherwise noted, released under the Universal Permissive License v1.0. ## Copyright -Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved. diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip.download b/OracleHTTPServer/dockerfiles/12.2.1.3.0/fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip.download deleted file mode 100644 index 8b3aca9702..0000000000 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip.download +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (c) 2016-2019 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. -# -# -# Download the OHS 12.2.1.3.0 software for LINUX.x64 (fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip) -# -# from http://www.oracle.com/technetwork/middleware/webtier/downloads/index-jsp-156711.html -# -# -649e77f7cd6e6621a27f4bfa61275cc9 fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/Dockerfile b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile similarity index 86% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/Dockerfile rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile index 5c05ece2ec..7793f054e6 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/Dockerfile +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile @@ -1,5 +1,5 @@ # -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. # @@ -7,17 +7,17 @@ # # ORACLE HTTP Server DOCKERFILES PROJECT # ----------------------------------------- -# This is the DockerFile for Oracle HTTP Server 12.2.1.3.0 +# This is the DockerFile for Oracle HTTP Server 12.2.1.4.0 # # IMPORTANT # ------------------------------------------- -# The resulting image of this Dockerfile would have Oracle Linux 7 and Oracle HTTP Server 12.2.1.3.0 installed in standalone mode. +# The resulting image of this Dockerfile would have Oracle Linux 7 and Oracle HTTP Server 12.2.1.4.0 installed in standalone mode. # A standalone domain will be configured in this image # # REQUIRED FILES TO BUILD THIS IMAGE # ---------------------------------- -# (1) fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip +# (1) fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip # Download from http://www.oracle.com/technetwork/middleware/webtier/downloads/index-jsp-156711.html # # HOW TO BUILD THIS IMAGE @@ -25,7 +25,7 @@ # Put all downloaded files in the same directory as this Dockerfile # As root user run following command manually: # -# $ sh buildDockerImage.sh -v 12.2.1.3.0 +# $ sh buildDockerImage.sh -v 12.2.1.4.0 # # Alternatively you can also run # @@ -33,7 +33,7 @@ # # For example # -# $ docker build --force-rm=true --no-cache=true --rm=true -t oracle/ohs:12.2.1.3.0 . +# $ docker build --force-rm=true --no-cache=true --rm=true -t oracle/ohs:12.2.1.4.0 . # # Pull serverjre:8 base image # ----------------------------------- @@ -45,8 +45,8 @@ MAINTAINER Prabhat Kishore # Environment variables required for this build (do NOT change) # ---------------------------------------------- -ENV OHS_PKG=fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip \ - OHS_BIN=fmw_12.2.1.3.0_ohs_linux64.bin \ +ENV OHS_PKG=fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip \ + OHS_BIN=fmw_12.2.1.4.0_ohs_linux64.bin \ ORACLE_HOME=/u01/oracle/ohssa \ PATH=$PATH:/usr/java/default/bin:/u01/oracle/ohssa/oracle_common/common/bin \ NM_PORT=5556 \ @@ -64,7 +64,7 @@ ENV OHS_PKG=fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip \ # ------------------------------------------------------- COPY $OHS_PKG install.file oraInst.loc /u01/ -# Install OL7 required packages. Refer FMW 12.2.1.3 System requirements guide for complete list of packages +# Install OL7 required packages. Refer FMW 12.2.1.4 System requirements guide for complete list of packages # Setup filesystem and oracle user #--------------------------------------------------------------------------------------------------------- RUN yum install -y unzip libaio sysstat make psmisc gcc && \ diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/configureWLSProxyPlugin.sh b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/configureWLSProxyPlugin.sh similarity index 96% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/configureWLSProxyPlugin.sh rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/configureWLSProxyPlugin.sh index e28bc85242..804b311f15 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/configureWLSProxyPlugin.sh +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/configureWLSProxyPlugin.sh @@ -1,7 +1,7 @@ #!/bin/bash # Author: hemastuti.baruah@oracle.com # -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 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. # diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/create-sa-ohs-domain.py b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py similarity index 93% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/create-sa-ohs-domain.py rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py index 346437c7c5..82a7dbf30d 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/create-sa-ohs-domain.py +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py @@ -1,6 +1,6 @@ #!/usr/bin/python # -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 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. # @@ -17,7 +17,7 @@ ohs_ssl_port = (os.environ.get("OHS_SSL_PORT", "3333")) ohs_comp_name = os.environ.get("OHS_COMPONENT_NAME", "ohs1") domain_name = os.environ.get("DOMAIN_NAME", "ohsDomain") -domain_path = '/u01/oracle/ohssa/user_projects/domains/' + domain_name +domain_path = os.environ.get("DOMAIN_HOME", "/temp") # Select OHS standalone template # ============================================== setTopologyProfile('Compact') diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/helloWorld.html b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/helloWorld.html similarity index 100% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/helloWorld.html rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/helloWorld.html diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/mod_wl_ohs.conf.sample b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/mod_wl_ohs.conf.sample similarity index 84% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/mod_wl_ohs.conf.sample rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/mod_wl_ohs.conf.sample index 28b04e0334..303fdee59f 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/mod_wl_ohs.conf.sample +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/mod_wl_ohs.conf.sample @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 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. # @@ -8,7 +8,7 @@ # # #Refer to OHS documentation for more details and examples -#Section 2.4 @ http://docs.oracle.com/middleware/12213/webtier/develop-plugin/oracle.htm#PLGWL553 +#Section 2.4 @ https://docs.oracle.com/en/middleware/fusion-middleware/web-tier/12.2.1.4/develop-plugin/oracle.html#GUID-A463B189-DF47-4932-8B96-FD4F5FEC8D56 #************************************************************************* LoadModule weblogic_module "/u01/oracle/ohssa/ohs/modules/mod_wl_ohs.so" diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/provisionOHS.sh b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh similarity index 80% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/provisionOHS.sh rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh index a9779808f4..e86f0126a2 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/provisionOHS.sh +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh @@ -1,6 +1,6 @@ #!/bin/bash # Author: prabhat.kishore@oracle.com -# Copyright (c) 2017-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 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. # @@ -17,7 +17,7 @@ function _term() { echo "Stopping container." echo "SIGTERM received, shutting down the server!" - ${WLST_HOME}/wlst.sh /u01/oracle/container-scripts/stop-ohs.py + ${WLST_HOME}/wlst.sh /u01/oracle/stop-ohs.py ${DOMAIN_HOME}/bin/stopNodeManager.sh } @@ -41,12 +41,12 @@ echo "OHS_COMPONENT_NAME=${OHS_COMPONENT_NAME:?"Please set OHS_COMPONENT_NAME"}" export MW_HOME ORACLE_HOME DOMAIN_NAME OHS_COMPONENT_NAME -#Set WL_HOME, WLST_HOME, DOMAIN_HOME and NODEMGR_HOME +#Set WL_HOME, WLST_HOME, DOMAIN_HOME, NODEMGR_HOME, and LOGS_DIR WL_HOME=${ORACLE_HOME}/wlserver WLST_HOME=${ORACLE_HOME}/oracle_common/common/bin echo "WLST_HOME=${WLST_HOME}" -DOMAIN_HOME=${ORACLE_HOME}/user_projects/domains/${DOMAIN_NAME} +DOMAIN_HOME=${ORACLE_HOME}/ohssa/user_projects/domains/${DOMAIN_NAME} export DOMAIN_HOME echo "DOMAIN_HOME=${DOMAIN_HOME}" @@ -58,6 +58,10 @@ PATH=$PATH:/usr/java/default/bin:/u01/oracle/ohssa/oracle_common/common/bin export PATH echo "PATH=${PATH}" +LOG_DIR=${ORACLE_HOME}/logs +export LOG_DIR +echo "LOG_DIR=${LOG_DIR}" + # Set JAVA_OPTIONS and JAVA_HOME for node manager JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.RootDirectory=${DOMAIN_HOME}" export JAVA_OPTIONS @@ -65,6 +69,7 @@ export JAVA_OPTIONS JAVA_HOME=${ORACLE_HOME}/oracle_common/jdk/jre export JAVA_HOME +mkdir -p $ORACLE_HOME/bootdir PROPERTIES_FILE=/u01/oracle/bootdir/domain.properties export PROPERTIES_FILE @@ -96,23 +101,24 @@ if [ -z "$NM_PASSWORD" ]; then exit fi -wlst.sh -skipWLSModuleScanning -loadProperties $PROPERTIES_FILE /u01/oracle/container-scripts/create-sa-ohs-domain.py +wlst.sh -skipWLSModuleScanning -loadProperties $PROPERTIES_FILE /u01/oracle/create-sa-ohs-domain.py # Set the NM username and password in the properties file -echo "username=$NM_USER" >> /u01/oracle/ohssa/user_projects/domains/ohsDomain/config/nodemanager/nm_password.properties -echo "password=$NM_PASSWORD" >> /u01/oracle/ohssa/user_projects/domains/ohsDomain/config/nodemanager/nm_password.properties -mv /u01/oracle/container-scripts/helloWorld.html ${ORACLE_HOME}/user_projects/domains/ohsDomain/config/fmwconfig/components/OHS/ohs1/htdocs/helloWorld.html +echo "username=$NM_USER" >> ${DOMAIN_HOME}/config/nodemanager/nm_password.properties +echo "password=$NM_PASSWORD" >> ${DOMAIN_HOME}/config/nodemanager/nm_password.properties +mv /u01/oracle/helloWorld.html ${DOMAIN_HOME}/config/fmwconfig/components/OHS/ohs1/htdocs/helloWorld.html fi # Start node manager -${DOMAIN_HOME}/bin/startNodeManager.sh > /u01/oracle/logs/nodemanager$$.log 2>&1 & +mkdir ${LOG_DIR} +${DOMAIN_HOME}/bin/startNodeManager.sh > ${LOG_DIR}/nodemanager$$.log 2>&1 & statusfile=/tmp/notifyfifo.$$ #Check if Node Manager is up and running by inspecting logs mkfifo "${statusfile}" || exit 1 { # run tail in the background so that the shell can kill tail when notified that grep has exited - tail -f /u01/oracle/logs/nodemanager$$.log & + tail -f ${LOG_DIR}/nodemanager$$.log & # remember tail's PID tailpid=$! # wait for notification that grep has exited @@ -123,7 +129,7 @@ mkfifo "${statusfile}" || exit 1 } | { grep -m 1 "Secure socket listener started on port 5556" # notify the first pipeline stage that grep is done - echo "RUNNING"> /u01/oracle/logs/Nodemanage$$.status + echo "RUNNING"> ${LOG_DIR}/Nodemanage$$.status echo "Node manager is running" echo >${statusfile} } @@ -136,9 +142,9 @@ configureWLSProxyPlugin.sh fi #Start OHS component only if Node Manager is up -if [ -f /u01/oracle/logs/Nodemanage$$.status ]; then +if [ -f ${LOG_DIR}/Nodemanage$$.status ]; then echo "Node manager running, hence starting OHS server" -${WLST_HOME}/wlst.sh -loadProperties $PROPERTIES_FILE /u01/oracle/container-scripts/start-ohs.py +${WLST_HOME}/wlst.sh -loadProperties $PROPERTIES_FILE /u01/oracle/start-ohs.py echo "OHS server has been started " fi diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/start-ohs.py b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/start-ohs.py similarity index 89% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/start-ohs.py rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/start-ohs.py index e64d899c81..af9648b3d5 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/start-ohs.py +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/start-ohs.py @@ -1,17 +1,16 @@ -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 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. # # Author: hemastuti.baruah@oracle.com # Starts the ohs1 component server inside the ohsDomain - # import os, sys java_home = os.environ.get("JAVA_HOME", "/usr/java/default") ohs_comp_name = os.environ.get("OHS_COMPONENT_NAME", "ohs1") domain_name = os.environ.get("DOMAIN_NAME", "ohsDomain") -domain_path = '/u01/oracle/ohssa/user_projects/domains/' + domain_name +domain_path = os.environ.get("DOMAIN_HOME", "temp") oracle_home = os.environ.get("ORACLE_HOME", "/u01/oracle/ohssa") ###################################################### try: diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/stop-ohs.py b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/stop-ohs.py similarity index 89% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/stop-ohs.py rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/stop-ohs.py index 56a92e599a..0470987f9c 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/stop-ohs.py +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/stop-ohs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 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. # @@ -9,7 +9,7 @@ java_home = os.environ.get("JAVA_HOME", "/usr/java/default") ohs_comp_name = os.environ.get("OHS_COMPONENT_NAME", "ohs1") domain_name = os.environ.get("DOMAIN_NAME", "ohsDomain") -domain_path = '/u01/oracle/ohssa/user_projects/domains/' + domain_name +domain_path = os.environ.get("DOMAIN_HOME", "temp") oracle_home = os.environ.get("ORACLE_HOME", "/u01/oracle/ohssa") ###################################################### try: diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip.download b/OracleHTTPServer/dockerfiles/12.2.1.4.0/fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip.download new file mode 100644 index 0000000000..f17c6b4a2d --- /dev/null +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip.download @@ -0,0 +1,12 @@ +# +# Copyright (c) 2024 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. +# +# +# Download the OHS 12.2.1.4.0 software for LINUX.x64 (fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip) +# +# from http://www.oracle.com/technetwork/middleware/webtier/downloads/index-jsp-156711.html +# +# +bbf38383b47fe7a080bd931b86870363 fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/install.file b/OracleHTTPServer/dockerfiles/12.2.1.4.0/install.file similarity index 91% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/install.file rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/install.file index 0e7f97c785..2e2ec49b38 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/install.file +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/install.file @@ -1,5 +1,5 @@ # -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 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. # diff --git a/OracleHTTPServer/dockerfiles/12.2.1.3.0/oraInst.loc b/OracleHTTPServer/dockerfiles/12.2.1.4.0/oraInst.loc similarity index 68% rename from OracleHTTPServer/dockerfiles/12.2.1.3.0/oraInst.loc rename to OracleHTTPServer/dockerfiles/12.2.1.4.0/oraInst.loc index 7adad5f08a..4ff3e4476d 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.3.0/oraInst.loc +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/oraInst.loc @@ -1,5 +1,5 @@ # -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2024 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. # diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/properties/domain.properties b/OracleHTTPServer/dockerfiles/12.2.1.4.0/properties/domain.properties new file mode 100644 index 0000000000..d4183f2009 --- /dev/null +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/properties/domain.properties @@ -0,0 +1,2 @@ +username=username +password=passwd diff --git a/OracleHTTPServer/dockerfiles/buildDockerImage.sh b/OracleHTTPServer/dockerfiles/buildDockerImage.sh index 508d11d1c8..b9e9dd3bce 100755 --- a/OracleHTTPServer/dockerfiles/buildDockerImage.sh +++ b/OracleHTTPServer/dockerfiles/buildDockerImage.sh @@ -7,7 +7,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. # -# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2016, 2024 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. @@ -19,7 +19,7 @@ Usage: buildDockerImage.sh -v [version] [-s] Builds a Docker Image for Oracle HTTP Server (standalone) . Parameters: - -v: Release version to build. Required. E.g 12.2.1.3.0 + -v: Release version to build. Required. E.g 12.2.1.4.0 -s: skips the MD5 check of packages LICENSE Universal Permissive License v1.0 @@ -45,7 +45,7 @@ checksumPackages() { #Parameters -VERSION="12.2.1.3.0" +VERSION="12.2.1.4.0" SKIPMD5=0 while getopts "hsdgiv:" optname; do case "$optname" in diff --git a/OracleHTTPServer/samples/12214-patch/Dockerfile b/OracleHTTPServer/samples/12214-patch/Dockerfile new file mode 100644 index 0000000000..545a163332 --- /dev/null +++ b/OracleHTTPServer/samples/12214-patch/Dockerfile @@ -0,0 +1,47 @@ +# LICENSE UPL 1.0 +# +# Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. +# +# ORACLE DOCKERFILES PROJECT +# -------------------------- +# This Dockerfile extends the Oracle HTTP Server install image and applies a patch. + +# REQUIRED FILES TO BUILD THIS IMAGE +# ---------------------------------- +# (1) p36393221_122140_Linux-x86-64.zip +# Download the patch 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/ohs:12214-patch . +# + +# Pull base image +# --------------- +FROM oracle/ohs:12.2.1.4.0 + +# Maintainer +# ---------- +MAINTAINER Prabhat Kishore + +# Environment variables required for this build (do NOT change) +# ------------------------------------------------------------- +ENV PATCH_PKG="p36393221_122140_Linux-x86-64.zip" + +# Copy supplemental package and scripts +# -------------------------------- +COPY $PATCH_PKG /u01/ + +# Installation of Supplemental Quick Installer +# -------------------------------------------- +USER oracle +RUN cd /u01 && $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG && cd - && \ + cd /u01/36393221 && $ORACLE_HOME/OPatch/opatch apply -silent && \ + rm /u01/$PATCH_PKG + +WORKDIR ${ORACLE_HOME} + + +CMD ["/u01/oracle/container-scripts/provisionOHS.sh"] diff --git a/OracleHTTPServer/samples/12214-patch/README.md b/OracleHTTPServer/samples/12214-patch/README.md new file mode 100644 index 0000000000..1207d1ffe5 --- /dev/null +++ b/OracleHTTPServer/samples/12214-patch/README.md @@ -0,0 +1,55 @@ +Applying patch on Oracle HTTP Server +=============== +This Dockerfile extends the Oracle HTTP Server image by applying a patch. This is a sample which shows how to patch an OHS image. +The name of patch file will need to be modified accordingly in the Dockerfile before using it for actual cases. + +## How to Build and Run + +First make sure you have built oracle/ohs:12.2.1.4.0. + +Then download the patch and place it next to this README. + +To build, run: + + $ docker build -t oracle/ohs:12214-patch . + + +### Providing the Node Manager password +The user name and password must be supplied in a domain.properties file located in a HOST directory that you will map at Docker runtime with the -v option to the image directory /u01/oracle/bootdir. The properties file enables the scripts to configure the correct authentication for the Node Manager. + +The format of the domain.properties file is key=value pair: +username=mynodemanagerusername +password=mynodemanagerpassword + +### How to run container + + +To start the OHS container with the patched image, run the following command: + + docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -it --name ohs -p 7777:7777 oracle/ohs:12214-patch + + +### Stopping the OHS instance +To stop the OHS instance, execute the following command: + + docker stop ohs (Assuming the name of conatiner is 'ohs') + + +To look at the Docker Container logs run: + + $ docker logs --details + + +## Support +Oracle HTTP Server on Docker is supported by Oracle. + + +## License +To download and run Oracle HTTP Server 12c Distribution regardless of inside or outside a Docker container, and regardless of the distribution, you must download the binaries from Oracle website and accept the license indicated at that page. + +To download and run Oracle JDK regardless of inside or outside a Docker container, you must download the binary from Oracle website and accept the license indicated at that pge. + +All scripts and files hosted in this project and GitHub [docker/OracleHTTPServer](./) repository required to build the Docker images are, unless otherwise noted, released under the Universal Permissive License v1.0. + +## Copyright +Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. diff --git a/OracleHTTPServer/samples/12214-patch/p36393221_122140_Linux-x86-64.download b/OracleHTTPServer/samples/12214-patch/p36393221_122140_Linux-x86-64.download new file mode 100644 index 0000000000..684078738c --- /dev/null +++ b/OracleHTTPServer/samples/12214-patch/p36393221_122140_Linux-x86-64.download @@ -0,0 +1,8 @@ +# Download this file from the following address: +# +# https://support.oracle.com +# +# 1) Download the ZIP file "Patch" for Oracle HTTP Server 12.2.1.4 +# 2) Put the ZIP file in the same location as this .download file +# +c66c76aa256882ce0e60aaae7ffc5abb p36393221_122140_Linux-x86-64.zip diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/Checksum.developer b/OracleWebLogic/dockerfiles/12.2.1.3/Checksum.developer deleted file mode 100644 index 8b78a35955..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/Checksum.developer +++ /dev/null @@ -1,6 +0,0 @@ -# Download WebLogic Server Quick Installer 12.2.1.3 -# -# - http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html -# -a5d4811b431b2166e3e16c20c36ede09 fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip - diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/Checksum.generic b/OracleWebLogic/dockerfiles/12.2.1.3/Checksum.generic deleted file mode 100644 index 7290c15d43..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/Checksum.generic +++ /dev/null @@ -1,6 +0,0 @@ -# Download WebLogic Server Generic Installer 12.2.1.3 -# -# - http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html -# -ea1b961b8896ac2f4006921965e41ddf fmw_12.2.1.3.0_wls_Disk1_1of1.zip - diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.developer b/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.developer deleted file mode 100644 index 7979feb136..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.developer +++ /dev/null @@ -1,114 +0,0 @@ -#Copyright (c) 2014, 2020, Oracle and/or its affiliates. -# -#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -# -# ORACLE DOCKERFILES PROJECT -# -------------------------- -# This is the Dockerfile for WebLogic 12.2.1.3 Quick Install Distro -# -# REQUIRED FILES TO BUILD THIS IMAGE -# ---------------------------------- -# (1) fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip -# Download the Developer Quick installer from http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html -# -# (2) server-jre-8uXX-linux-x64.tar.gz -# Download from http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html -# -# HOW TO BUILD THIS IMAGE -# ----------------------- -# Put all downloaded files in the same directory as this Dockerfile -# Run: -# $ docker build -f Dockerfile.developer -t oracle/weblogic:12.2.1.3-developer . -# -# IMPORTANT -# --------- -# The resulting image of this Dockerfile contains a WLS Empty Domain. -# -# Extend base JRE image -# You must build the image by using the Dockerfile in GitHub project `../../../OracleJava/java8` -# ---------------------------------------------------------------------------------------------- -FROM oracle/serverjre:8 as builder - -# Labels -# ------ -LABEL "provider"="Oracle" \ - "maintainer"="Monica Riccelli " \ - "issues"="https://github.com/oracle/docker-images/issues" \ - "port.admin.listen"="7001" \ - "port.administration"="9002" - - -# Common environment variables required for this build (do NOT change) -# -------------------------------------------------------------------- -ENV ORACLE_HOME=/u01/oracle \ - USER_MEM_ARGS="-Djava.security.egd=file:/dev/./urandom" \ - PATH=$PATH:${JAVA_HOME}/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin - -# Setup filesystem and oracle user -# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation -# ------------------------------------------------------------ -RUN mkdir /u01 && \ - useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && \ - chown oracle:root -R /u01 && \ - chmod -R 775 /u01 - -# Environment variables required for this build (do NOT change) -# ------------------------------------------------------------- -ENV FMW_PKG=fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip \ - FMW_JAR=fmw_12.2.1.3.0_wls_quick.jar - -# Copy packages -# ------------- -COPY --chown=oracle:root $FMW_PKG install.file oraInst.loc /u01/ - -# Install -# ------------------------------------------------------------ -USER oracle -RUN cd /u01 && ${JAVA_HOME}/bin/jar xf /u01/$FMW_PKG && cd - && \ - ${JAVA_HOME}/bin/java -jar /u01/$FMW_JAR -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc -jreLoc $JAVA_HOME -ignoreSysPrereqs -force -novalidation ORACLE_HOME=$ORACLE_HOME && \ - rm /u01/$FMW_JAR /u01/$FMW_PKG /u01/install.file && \ - rm -rf /u01/oracle/cfgtoollogs - -# Final image stage -FROM oracle/serverjre:8 - -ENV ORACLE_HOME=/u01/oracle \ - USER_MEM_ARGS="-Djava.security.egd=file:/dev/./urandom" \ - SCRIPT_FILE=/u01/oracle/createAndStartEmptyDomain.sh \ - HEALTH_SCRIPT_FILE=/u01/oracle/get_healthcheck_url.sh \ - PATH=$PATH:${JAVA_HOME}/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin - -# Domain and Server environment variables -# ------------------------------------------------------------ -ENV DOMAIN_NAME="${DOMAIN_NAME:-base_domain}" \ - ADMIN_LISTEN_PORT="${ADMIN_LISTEN_PORT:-7001}" \ - ADMIN_NAME="${ADMIN_NAME:-AdminServer}" \ - DEBUG_FLAG=true \ - PRODUCTION_MODE=dev \ - ADMINISTRATION_PORT_ENABLED="${ADMINISTRATION_PORT_ENABLED:-true}" \ - ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}" - -# Setup filesystem and oracle user -# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation -# ------------------------------------------------------------ -RUN mkdir -p /u01 && \ - chmod 775 /u01 && \ - useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && \ - chown oracle:root /u01 - -COPY --from=builder --chown=oracle:root /u01 /u01 - -# Copy scripts -#------------- -COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/ - -RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && \ - chown oracle:root $SCRIPT_FILE /u01/oracle/create-wls-domain.py $HEALTH_SCRIPT_FILE - -USER oracle - -HEALTHCHECK --start-period=10s --timeout=30s --retries=3 CMD curl -k -s --fail `$HEALTH_SCRIPT_FILE` || exit 1 -WORKDIR ${ORACLE_HOME} - -# Define default command to start script. -CMD ["/u01/oracle/createAndStartEmptyDomain.sh"] diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.generic b/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.generic deleted file mode 100644 index 2f8f556c01..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.generic +++ /dev/null @@ -1,111 +0,0 @@ -#Copyright (c) 2014, 2020, Oracle and/or its affiliates. -# -#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -# -# ORACLE DOCKERFILES PROJECT -# -------------------------- -# This is the Dockerfile for Oracle WebLogic Server 12.2.1.3 Generic Distro -# -# REQUIRED FILES TO BUILD THIS IMAGE -# ---------------------------------- -# (1) fmw_12.2.1.3.0_wls_Disk1_1of1.zip -# Download the Generic installer from http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html -# -# (2) server-jre-8uXX-linux-x64.tar.gz -# Download from http://www.oracle.com/technetwork/java/javase/downloads/server-jre8-downloads-2133154.html -# -# HOW TO BUILD THIS IMAGE -# ----------------------- -# Put all downloaded files in the same directory as this Dockerfile -# Run: -# $ docker build -f Dockerfile.generic -t oracle/weblogic:12.2.1.3-generic . -# -# IMPORTANT -# --------- -# The resulting image of this Dockerfile contains a WLS Empty Domain. -# -# Extend base JRE image -# ---------------------------------------------------------------------------------------------- -FROM oracle/serverjre:8 as builder - -# Labels -# ------ -LABEL "provider"="Oracle" \ - "maintainer"="Monica Riccelli " \ - "issues"="https://github.com/oracle/docker-images/issues" \ - "port.admin.listen"="7001" \ - "port.administration"="9002" - -# Common environment variables required for this build (do NOT change) -# -------------------------------------------------------------------- -ENV ORACLE_HOME=/u01/oracle \ - USER_MEM_ARGS="-Djava.security.egd=file:/dev/./urandom" \ - PATH=$PATH:${JAVA_HOME}/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin - -# Setup filesystem and oracle user -# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation -# ------------------------------------------------------------ -RUN mkdir /u01 && \ - useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && \ - chown oracle:root -R /u01 && \ - chmod -R 775 /u01 - -# Environment variables required for this build (do NOT change) -# ------------------------------------------------------------- -ENV FMW_PKG=fmw_12.2.1.3.0_wls_Disk1_1of1.zip \ - FMW_JAR=fmw_12.2.1.3.0_wls.jar - -# Copy packages -# ------------- -COPY --chown=oracle:root $FMW_PKG install.file oraInst.loc /u01/ - -# Install -# ------------------------------------------------------------ -USER oracle - -RUN cd /u01 && ${JAVA_HOME}/bin/jar xf /u01/$FMW_PKG && cd - && \ - ${JAVA_HOME}/bin/java -jar /u01/$FMW_JAR -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc -jreLoc $JAVA_HOME -ignoreSysPrereqs -force -novalidation ORACLE_HOME=$ORACLE_HOME INSTALL_TYPE="WebLogic Server" && \ - rm /u01/$FMW_JAR /u01/$FMW_PKG /u01/install.file && \ - rm -rf /u01/oracle/cfgtoollogs - -# Final image stage -FROM oracle/serverjre:8 - -ENV ORACLE_HOME=/u01/oracle \ - USER_MEM_ARGS="-Djava.security.egd=file:/dev/./urandom" \ - SCRIPT_FILE=/u01/oracle/createAndStartEmptyDomain.sh \ - HEALTH_SCRIPT_FILE=/u01/oracle/get_healthcheck_url.sh \ - PATH=$PATH:${JAVA_HOME}/bin:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin - -# Domain and Server environment variables -# ------------------------------------------------------------ -ENV DOMAIN_NAME="${DOMAIN_NAME:-base_domain}" \ - ADMIN_LISTEN_PORT="${ADMIN_LISTEN_PORT:-7001}" \ - ADMIN_NAME="${ADMIN_NAME:-AdminServer}" \ - ADMINISTRATION_PORT_ENABLED="${ADMINISTRATION_PORT_ENABLED:-true}" \ - ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}" - -# Setup filesystem and oracle user -# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation -# ------------------------------------------------------------ -RUN mkdir -p /u01 && \ - chmod 775 /u01 && \ - useradd -b /u01 -d /u01/oracle -m -s /bin/bash oracle && \ - chown oracle:root /u01 - -COPY --from=builder --chown=oracle:root /u01 /u01 - -# Copy scripts -#------------- -COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/ - -RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && \ - chown oracle:root $SCRIPT_FILE /u01/oracle/create-wls-domain.py $HEALTH_SCRIPT_FILE - -USER oracle - -HEALTHCHECK --start-period=10s --timeout=30s --retries=3 CMD curl -k -s --fail `$HEALTH_SCRIPT_FILE` || exit 1 -WORKDIR ${ORACLE_HOME} - -# Define default command to start script. -CMD ["/u01/oracle/createAndStartEmptyDomain.sh"] diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/README.md b/OracleWebLogic/dockerfiles/12.2.1.3/README.md deleted file mode 100644 index a3634b0bc1..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/README.md +++ /dev/null @@ -1,100 +0,0 @@ -Oracle WebLogic Server on Docker -================================= -These Docker configurations have been used to create the Oracle WebLogic Server (WLS) image. Providing this WLS image facilitates the configuration and environment setup for DevOps users. This project includes the installation and creation of an empty WebLogic Server domain (an Administration Server only). These Oracle WebLogic Server 12.2.1.3 images are based on Oracle Linux and Oracle JRE 8 (Server). - -The certification of Oracle WebLogic Server on Docker does not require the use of any file presented in this repository. Customers and users are welcome to use them as starters, and customize, tweak, or create from scratch, new scripts and Dockerfiles. - -For more information on the certification, please see the [Oracle WebLogic Server on Docker certification whitepaper](http://www.oracle.com/technetwork/middleware/weblogic/overview/weblogic-server-docker-containers-2491959.pdf) and [The WebLogic Server Blog](https://blogs.oracle.com/WebLogicServer/) for updates. - -## How to build and run -This project offers sample Dockerfiles for Oracle WebLogic Server 12cR2 (12.2.1.3). It provides at least one Dockerfile for the 'developer' distribution, a second Dockerfile for the 'generic' distribution. To assist in building the images, you can use the [`buildDockerImage.sh`](dockerfiles/buildDockerImage.sh) script. See below for instructions and usage. - -The `buildDockerImage.sh` script is a utility shell script that performs MD5 checks and is an easy way for beginners to get started. Expert users are welcome to directly call `docker build` with their prefered set of parameters. - -### Building Oracle WebLogic Server Docker install images -**IMPORTANT:** You must download the binary of Oracle WebLogic Server and put it in place (see `.download` files inside `dockerfiles/`). The WebLogic image extends the Oracle JRE Server 8 image. You must build the image by using the Dockerfile in [`../../../OracleJava/java8`](https://github.com/oracle/docker-images/tree/master/OracleJava/java-8). - -**NOTE:** The Dockerfiles install WebLogic with `INSTALL_TYPE=WebLogic Server` which does not include the WebLogic samples in the installation. If you want to include the WebLogic samples you need to change `INSTALL_TYPE=Complete with Examples` in the install.file. - -Before you build, select the version and distribution for which you want to build an image, then download the required packages (see `.download` files) and locate them in the folder of your distribution version of choice. Then, from the `dockerfiles` folder, run the `buildDockerImage.sh` script as root. - - $ sh buildDockerImage.sh - Usage: buildDockerImage.sh -v [version] [-d | -g ] [-s] - Builds a Docker Image for Oracle WebLogic Server. - - Parameters: - -v: version to build. Required. - Choose : 12.2.1.3 - -d: creates image based on 'developer' distribution - -g: creates image based on 'generic' distribution - -c: enables Docker image layer cache during build - -s: skips the MD5 check of packages - - * select one distribution only: -d, or -g - - LICENSE UPL 1.0 - - Copyright (c) 2014-2018 Oracle and/or its affiliates. All rights reserved. - -**IMPORTANT:** The resulting images will have a single server domain (Administration Server only), by default. - - - 1. To build the `12.2.1.3`image, from `dockerfiles`, call: - - `$ sh buildDockerImage.sh -v 12.2.1.3 -d` - - 2. Verify that you now have this image in place with: - - `$ docker images` - -### Running a single server domain from the image -The WebLogic Server install image (built above) allows you to run a container with a single WebLogic Server domain. This makes it extremely simple to deploy applications and any resource the application might need. - -#### Providing the Administration Server user name and password -The user name and password must be supplied in a `domain.properties` file located in a HOST directory that you will map at Docker runtime with the `-v` option to the image directory `/u01/oracle/properties`. The properties file enables the scripts to configure the correct authentication for the WebLogic Administration Server. - -The format of the `domain.properties` file is key=value pair: - - username=myadminusername - password=myadminpassword - -**Note**: Oracle recommends that the `domain.properties` file be deleted or secured after the container and the WebLogic Server are started so that the user name and password are not inadvertently exposed. - -#### Start the container -Start a container from the image created in step 1. -You can override the default values of the following parameters during runtime with the `-e` option: - - * `ADMIN_NAME` (default: `AdminServer`) - * `ADMIN_LISTEN_PORT` (default: `7001`) - * `DOMAIN_NAME` (default: `base_domain`) - * `ADMINISTRATION_PORT_ENABLED` (default: `true`) - * `ADMINISTRATION_PORT` (default: `9002`) - -**NOTE**: For security, the Administration port 9002 is enabled by default, before running the container in WebLogic 12.2.1.3 the patch 27117282 must be applied. Please download the patch and apply it after you have built the 12.2.1.3 image. You can follow the sample https://github.com/oracle/docker-images/tree/master/OracleWebLogic/samples/12213-patch to see how to patch. An alternative is to not enable Administration port when you issue the docker run command, set `ADMINISTRTATION_PORT_ENABLED` to false. If you intend to run these images in production, then you must change the Production Mode to `production`. When you set the `DOMAIN_NAME`, the `DOMAIN_HOME=/u01/oracle/user_projects/domains/$DOMAIN_NAME`. - - $ 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_NAME=docker_domain -e ADMIN_NAME=docker-AdminServer oracle/weblogic:12.2.1.3-developer - -Run the WLS Administration Console: - - $ docker inspect --format '{{.NetworkSettings.IPAddress}}' - -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. - -## Choose your Oracle WebLogic Server distribution - -This project hosts two configurations (depending on the Oracle WebLogic Server version) for building Docker images with WebLogic Server 12c. - - * Quick Install Developer Distribution - - - For more information on the Oracle WebLogic Server 12cR2 Quick Install Developer Distribution, see [WLS Quick Install Distribution for Oracle WebLogic Server 12.2.1.3.0](http://download.oracle.com/otn/nt/middleware/12c/wls/12213/README.txt). - - - * Generic Distribution - - - For more information on the Oracle WebLogic Server 12cR2 Generic Full Distribution, see [WebLogic Server 12.2.1.3 Documentation](http://docs.oracle.com/middleware/12213/wls/index.html). - -## Samples for Oracle WebLogic Server domain creation -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` sample. - -## Copyright -Copyright (c) 2014, 2022, Oracle and/or its affiliates. diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/create-wls-domain.py b/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/create-wls-domain.py deleted file mode 100644 index 3ebe5004ac..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/create-wls-domain.py +++ /dev/null @@ -1,91 +0,0 @@ -#Copyright (c) 2014, 2022, Oracle and/or its affiliates. -# -#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -# -# WebLogic on Docker Default Domain -# -# Domain, as defined in DOMAIN_NAME, will be created in this script. Name defaults to 'base_domain'. -# -# Since : October, 2014 -# Author: monica.riccelli@oracle.com -# ============================================== -domain_name = os.environ.get("DOMAIN_NAME", "base_domain") -admin_name = os.environ.get("ADMIN_NAME", "AdminServer") -admin_listen_port = int(os.environ.get("ADMIN_LISTEN_PORT", "7001")) -domain_path = '/u01/oracle/user_projects/domains/%s' % domain_name -production_mode = os.environ.get("PRODUCTION_MODE", "prod") -administration_port_enabled = os.environ.get("ADMINISTRATION_PORT_ENABLED", "true") -administration_port = int(os.environ.get("ADMINISTRATION_PORT", "9002")) - -print('domain_name : [%s]' % domain_name); -print('admin_listen_port : [%s]' % admin_listen_port); -print('domain_path : [%s]' % domain_path); -print('production_mode : [%s]' % production_mode); -print('admin name : [%s]' % admin_name); -print('administration_port_enabled : [%s]' % administration_port_enabled); -print('administration_port : [%s]' % administration_port); - -# Open default domain template -# ============================ -readTemplate("/u01/oracle/wlserver/common/templates/wls/wls.jar") - -set('Name', domain_name) -setOption('DomainName', domain_name) - -# Set Administration Port -# ======================= -if administration_port_enabled != "false": - set('AdministrationPort', administration_port) - set('AdministrationPortEnabled', 'true') - -# Disable Admin Console -# -------------------- -# cmo.setConsoleEnabled(false) - -# Configure the Administration Server and SSL port. -# ================================================= -cd('/Servers/AdminServer') -set('Name', admin_name) -set('ListenAddress', '') -set('ListenPort', admin_listen_port) -if administration_port_enabled != "false": - create(admin_name, 'SSL') - cd('SSL/' + admin_name) - set('Enabled', 'True') - -# Define the user password for weblogic -# ===================================== -cd(('/Security/%s/User/weblogic') % domain_name) -cmo.setName(username) -cmo.setPassword(password) - -# Write the domain and close the domain template -# ============================================== -setOption('OverwriteDomain', 'true') -setOption('ServerStartMode',production_mode) - -# Create Node Manager -# =================== -#cd('/NMProperties') -#set('ListenAddress','') -#set('ListenPort',5556) -#set('CrashRecoveryEnabled', 'true') -#set('NativeVersionEnabled', 'true') -#set('StartScriptEnabled', 'false') -#set('SecureListener', 'false') -#set('LogLevel', 'FINEST') - -# Set the Node Manager user name and password -# =========================================== -#cd('/SecurityConfiguration/%s' % domain_name) -#set('NodeManagerUsername', username) -#set('NodeManagerPasswordEncrypted', password) - -# Write Domain -# ============ -writeDomain(domain_path) -closeTemplate() - -# Exit WLST -# ========= -exit() diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/createAndStartEmptyDomain.sh b/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/createAndStartEmptyDomain.sh deleted file mode 100755 index d5eb9a79ad..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/createAndStartEmptyDomain.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/bash -# -# Copyright (c) 2014, 2022, Oracle and/or its affiliates. -# -#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. - - -# If AdminServer.log does not exists, container is starting for 1st time -# So it should start NM and also associate with AdminServer -# Otherwise, only start NM (container restarted) -########### SIGTERM handler ############ -function _term() { - echo "Stopping container." - echo "SIGTERM received, shutting down the server!" - ${DOMAIN_HOME}/bin/stopWebLogic.sh -} - -########### SIGKILL handler ############ -function _kill() { - echo "SIGKILL received, shutting down the server!" - kill -9 $childPID -} - -# Set SIGTERM handler -trap _term SIGTERM - -# Set SIGKILL handler -trap _kill SIGKILL - -#Define DOMAIN_HOME -export DOMAIN_HOME=/u01/oracle/user_projects/domains/$DOMAIN_NAME -echo "Domain Home is: " $DOMAIN_HOME - -mkdir -p $ORACLE_HOME/properties -# Create Domain only if 1st execution -if [ ! -e ${DOMAIN_HOME}/servers/${ADMIN_NAME}/logs/${ADMIN_NAME}.log ]; then - echo "Create Domain" - PROPERTIES_FILE=/u01/oracle/properties/domain.properties - if [ ! -e "$PROPERTIES_FILE" ]; then - echo "A properties file with the username and password needs to be supplied." - exit - fi - - # Get Username - USER=`awk '{print $1}' $PROPERTIES_FILE | grep username | cut -d "=" -f2` - if [ -z "$USER" ]; then - echo "The domain username is blank. The Admin username must be set in the properties file." - exit - fi - # Get Password - PASS=`awk '{print $1}' $PROPERTIES_FILE | grep password | cut -d "=" -f2` - if [ -z "$PASS" ]; then - echo "The domain password is blank. The Admin password must be set in the properties file." - exit - fi - - # Create an empty domain - wlst.sh -skipWLSModuleScanning -loadProperties $PROPERTIES_FILE /u01/oracle/create-wls-domain.py - mkdir -p ${DOMAIN_HOME}/servers/${ADMIN_NAME}/security/ - chmod -R g+w ${DOMAIN_HOME} - echo "username=${USER}" >> $DOMAIN_HOME/servers/${ADMIN_NAME}/security/boot.properties - echo "password=${PASS}" >> $DOMAIN_HOME/servers/${ADMIN_NAME}/security/boot.properties - ${DOMAIN_HOME}/bin/setDomainEnv.sh -fi - -# Start Admin Server and tail the logs -${DOMAIN_HOME}/startWebLogic.sh -if [ -e ${DOMAIN_HOME}/servers/${ADMIN_NAME}/logs/${ADMIN_NAME}.log ]; then - echo "${DOMAIN_HOME}/servers/${ADMIN_NAME}/logs/${ADMIN_NAME}.log" -fi -touch ${DOMAIN_HOME}/servers/${ADMIN_NAME}/logs/${ADMIN_NAME}.log -tail -f ${DOMAIN_HOME}/servers/${ADMIN_NAME}/logs/${ADMIN_NAME}.log - -childPID=$! -wait $childPID diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/get_healthcheck_url.sh b/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/get_healthcheck_url.sh deleted file mode 100755 index 4a2feef442..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/container-scripts/get_healthcheck_url.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# -#Copyright (c) 2020, Oracle and/or its affiliates. -# -#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. - -if [ "$ADMINISTRATION_PORT_ENABLED" = "true" ] ; then - echo "https://{localhost:$ADMINISTRATION_PORT}/weblogic/ready" ; -else - echo "http://{localhost:$ADMIN_LISTEN_PORT}/weblogic/ready" ; -fi diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/fmw_12.2.1.3.0_wls_Disk1_1of1.zip.download b/OracleWebLogic/dockerfiles/12.2.1.3/fmw_12.2.1.3.0_wls_Disk1_1of1.zip.download deleted file mode 100644 index 2d74e20ec8..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/fmw_12.2.1.3.0_wls_Disk1_1of1.zip.download +++ /dev/null @@ -1,5 +0,0 @@ -# Download WebLogic Server Generic Installer 12.2.1.3 -# -# - http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html -# -ea1b961b8896ac2f4006921965e41ddf fmw_12.2.1.3.0_wls_Disk1_1of1.zip diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip.download b/OracleWebLogic/dockerfiles/12.2.1.3/fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip.download deleted file mode 100644 index 29195504d4..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip.download +++ /dev/null @@ -1,5 +0,0 @@ -# Download WebLogic Server Quick Installer 12.2.1.3 -# -# - http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html -# -a5d4811b431b2166e3e16c20c36ede09 fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/install.file b/OracleWebLogic/dockerfiles/12.2.1.3/install.file deleted file mode 100644 index 23fdba63a8..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/install.file +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright (c) 2014-2018 Oracle and/or its affiliates. All rights reserved. -[ENGINE] - -#DO NOT CHANGE THIS. -Response File Version=1.0.0.0.0 - -[GENERIC] - -INSTALL_TYPE=WebLogic Server -SOFTWARE ONLY TYPE=true -DECLINE_SECURITY_UPDATES=true -SECURITY_UPDATES_VIA_MYORACLESUPPORT=false diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/oraInst.loc b/OracleWebLogic/dockerfiles/12.2.1.3/oraInst.loc deleted file mode 100644 index 01f1964a55..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/oraInst.loc +++ /dev/null @@ -1,2 +0,0 @@ -inventory_loc=/u01/oracle/.inventory -inst_group=oracle diff --git a/OracleWebLogic/dockerfiles/12.2.1.3/properties/domain.properties b/OracleWebLogic/dockerfiles/12.2.1.3/properties/domain.properties deleted file mode 100644 index e4db42348c..0000000000 --- a/OracleWebLogic/dockerfiles/12.2.1.3/properties/domain.properties +++ /dev/null @@ -1,2 +0,0 @@ -username=myweblogicuser -password=welcome1 From 798cb5182b24ffa0e00993d76f43755da8b3adc7 Mon Sep 17 00:00:00 2001 From: mriccell Date: Mon, 10 Jun 2024 09:40:27 -0400 Subject: [PATCH 02/19] Fix copyright statements, new version of the provisioning script --- OracleHTTPServer/COPYRIGHT | 3 +- OracleHTTPServer/README.md | 2 +- .../container-scripts/provisionOHS.sh | 37 ++++++++++++++++++- 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/OracleHTTPServer/COPYRIGHT b/OracleHTTPServer/COPYRIGHT index ff432292b8..3b1931c0b4 100644 --- a/OracleHTTPServer/COPYRIGHT +++ b/OracleHTTPServer/COPYRIGHT @@ -1,4 +1,5 @@ -Copyright (c) 2001, 2024, Oracle Corporation. All rights reserved. +Copyright (c) 2020, 2024, Oracle and/or its affiliates. +Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/OracleHTTPServer/README.md b/OracleHTTPServer/README.md index 229d86ae58..0224bde97f 100644 --- a/OracleHTTPServer/README.md +++ b/OracleHTTPServer/README.md @@ -75,4 +75,4 @@ To download and run Oracle JDK regardless of inside or outside a Docker containe All scripts and files hosted in this project and GitHub [docker/OracleHTTPServer](./) repository required to build the Docker images are, unless otherwise noted, released under the Universal Permissive License v1.0. ## Copyright -Copyright (c) 2019, 2024 Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh index e86f0126a2..c06d46cd89 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh @@ -1,5 +1,4 @@ #!/bin/bash -# Author: prabhat.kishore@oracle.com # Copyright (c) 2024 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. @@ -105,7 +104,41 @@ wlst.sh -skipWLSModuleScanning -loadProperties $PROPERTIES_FILE /u01/oracle/crea # Set the NM username and password in the properties file echo "username=$NM_USER" >> ${DOMAIN_HOME}/config/nodemanager/nm_password.properties echo "password=$NM_PASSWORD" >> ${DOMAIN_HOME}/config/nodemanager/nm_password.properties -mv /u01/oracle/helloWorld.html ${DOMAIN_HOME}/config/fmwconfig/components/OHS/ohs1/htdocs/helloWorld.html +mv /u01/oracle/helloWorld.html ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/htdocs/helloWorld.html + +echo "Copying Configuration to OHS Instance" +cp -L /u01/oracle/config/moduleconf/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf -name '.*' | xargs rm -rf + +conf=$(ls -l /u01/oracle/config/httpd/*.conf 2>/dev/null | wc -l) +if [ $conf -gt 0 ] +then + echo "Copying root .conf files $OHS_COMPONENT_NAME" + cp -L /u01/oracle/config/httpd/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME +fi + +htdocs=$(ls -l /u01/oracle/config/htdocs/*.html 2>/dev/null | wc -l) +if [ $htdocs -gt 0 ] +then + echo "Copying htdocs to OHS Instance" + cp -L /u01/oracle/config/htdocs/*.html ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/htdocs +fi + +if [ "$DEPLOY_WG" = "true" ] +then + echo "Deploying Webgate" + cd $ORACLE_HOME/webgate/ohs/tools/deployWebGate/ + ./deployWebGateInstance.sh -w ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME -oh $ORACLE_HOME + cd $ORACLE_HOME/webgate/ohs/tools/setup/InstallTools + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib + ./EditHttpConf -w ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME -oh $ORACLE_HOME + echo "Adding OAP API exclusion to webgate.conf" + echo "" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/webgate.conf + echo " require all granted" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/webgate.conf + echo "" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/webgate.conf + cp -rL /u01/oracle/config/webgate ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/webgate -name '.*' | xargs rm -rf +else + echo "Dont Deploy WG" +fi fi From 65279f2527096bc3196309a9de921882c66c4af5 Mon Sep 17 00:00:00 2001 From: mriccell Date: Mon, 10 Jun 2024 09:50:49 -0400 Subject: [PATCH 03/19] replace the word Docker for Containers --- OracleHTTPServer/README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/OracleHTTPServer/README.md b/OracleHTTPServer/README.md index 0224bde97f..282ace3d34 100644 --- a/OracleHTTPServer/README.md +++ b/OracleHTTPServer/README.md @@ -1,7 +1,7 @@ -Oracle HTTP Server on Docker -=============== +Oracle HTTP Server in containers +=================================== This project includes quick start dockerfiles and samples for standalone Oracle HTTP Server based on Oracle Linux and Oracle JDK 8 (Server). -The certification of OHS on Docker does not require the use of any file presented in this repository. +The certification of OHS in containers does not require the use of any file presented in this repository. Customers and users are welcome to use them as starters, and customize/tweak, or create from scratch new scripts and Dockerfiles. ## How to Build and Run @@ -14,9 +14,9 @@ You must first download the Oracle Server JRE binary and drop in folder `../Orac $ cd ../OracleJava/java-8 $ sh build.sh -You can also pull the Oracle Server JRE 8 image from [Oracle Container Registry](https://container-registry.oracle.com) or the [Docker Store](https://store.docker.com/images/oracle-serverjre-8). +You can also pull the Oracle Server JRE 8 image from [Oracle Container Registry](https://container-registry.oracle.com). -### Building OHS Docker Image +### Building OHS Container Image IMPORTANT: You have to download the OHS binary and put it in place (see .download files inside dockerfiles/). Download the required package (see .download file) and drop them in the version folder (12.2.1.4.0). Then go into the **dockerfiles** folder and run the **buildDockerImage.sh** script as root providing the version name with -v option. @@ -26,7 +26,7 @@ Download the required package (see .download file) and drop them in the version IMPORTANT: The resulting image will have a pre-configured domain. ### Providing the Node Manager password -The user name and password must be supplied in a domain.properties file located in a HOST directory that you will map at Docker runtime with the -v option to the image directory /u01/oracle/bootdir. The properties file enables the scripts to configure the correct authentication for the Node Manager. +The user name and password must be supplied in a domain.properties file located in a HOST directory that you will map at runtime with the -v option to the image directory /u01/oracle/bootdir. The properties file enables the scripts to configure the correct authentication for the Node Manager. The format of the domain.properties file is key=value pair: username=mynodemanagerusername @@ -58,21 +58,21 @@ To stop the OHS instance, execute the following command: docker stop ohs (Assuming the name of conatiner is 'ohs') -To look at the Docker Container logs run: +To look at the Container logs run: $ docker logs --details ## Support -Oracle HTTP Server on Docker is supported by Oracle. +Oracle HTTP Server in containers is supported by Oracle. ## License -To download and run Oracle HTTP Server 12c Distribution regardless of inside or outside a Docker container, and regardless of the distribution, you must download the binaries from Oracle website and accept the license indicated at that page. +To download and run Oracle HTTP Server 12c Distribution regardless of inside or outside a container, and regardless of the distribution, you must download the binaries from Oracle website and accept the license indicated at that page. -To download and run Oracle JDK regardless of inside or outside a Docker container, you must download the binary from Oracle website and accept the license indicated at that pge. +To download and run Oracle JDK regardless of inside or outside a container, you must download the binary from Oracle website and accept the license indicated at that pge. -All scripts and files hosted in this project and GitHub [docker/OracleHTTPServer](./) repository required to build the Docker images are, unless otherwise noted, released under the Universal Permissive License v1.0. +All scripts and files hosted in this project and GitHub [docker/OracleHTTPServer](./) repository required to build the images are, unless otherwise noted, released under the Universal Permissive License v1.0. ## Copyright Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. From 503ea0dc3826de539cc4572b3d9841cd1cefaca8 Mon Sep 17 00:00:00 2001 From: mriccell Date: Mon, 10 Jun 2024 09:55:56 -0400 Subject: [PATCH 04/19] delete 12213 samples and replace the references of Docker for containers or images --- .../samples/12213-patch/Dockerfile | 47 ---------------- .../samples/12213-patch/README.md | 55 ------------------- .../p28061540_122130_Linux-x86-64.download | 8 --- .../samples/12214-patch/README.md | 12 ++-- 4 files changed, 6 insertions(+), 116 deletions(-) delete mode 100644 OracleHTTPServer/samples/12213-patch/Dockerfile delete mode 100644 OracleHTTPServer/samples/12213-patch/README.md delete mode 100644 OracleHTTPServer/samples/12213-patch/p28061540_122130_Linux-x86-64.download diff --git a/OracleHTTPServer/samples/12213-patch/Dockerfile b/OracleHTTPServer/samples/12213-patch/Dockerfile deleted file mode 100644 index 47131d7fdb..0000000000 --- a/OracleHTTPServer/samples/12213-patch/Dockerfile +++ /dev/null @@ -1,47 +0,0 @@ -# LICENSE UPL 1.0 -# -# Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. -# -# ORACLE DOCKERFILES PROJECT -# -------------------------- -# This Dockerfile extends the Oracle HTTP Server install image and applies a patch. - -# REQUIRED FILES TO BUILD THIS IMAGE -# ---------------------------------- -# (1) p12345678_122130_Generic.zip -# Download the patch 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/ohs:12213-patch . -# - -# Pull base image -# --------------- -FROM oracle/ohs:12.2.1.3.0 - -# Maintainer -# ---------- -MAINTAINER Prabhat Kishore - -# Environment variables required for this build (do NOT change) -# ------------------------------------------------------------- -ENV PATCH_PKG="p12345678_122130_Linux-x86-64.zip" - -# Copy supplemental package and scripts -# -------------------------------- -COPY $PATCH_PKG /u01/ - -# Installation of Supplemental Quick Installer -# -------------------------------------------- -USER oracle -RUN cd /u01 && $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG && cd - && \ - cd /u01/12345678 && $ORACLE_HOME/OPatch/opatch apply -silent && \ - rm /u01/$PATCH_PKG - -WORKDIR ${ORACLE_HOME} - - -CMD ["/u01/oracle/container-scripts/provisionOHS.sh"] diff --git a/OracleHTTPServer/samples/12213-patch/README.md b/OracleHTTPServer/samples/12213-patch/README.md deleted file mode 100644 index f025e710c5..0000000000 --- a/OracleHTTPServer/samples/12213-patch/README.md +++ /dev/null @@ -1,55 +0,0 @@ -Applying patch on Oracle HTTP Server -=============== -This Dockerfile extends the Oracle HTTP Server image by applying a patch. This is a sample which shows how to patch an OHS image. -The name of patch file will need to be modified accordingly in the Dockerfile before using it for actual cases. - -## How to Build and Run - -First make sure you have built oracle/ohs:12.2.1.3.0. - -Then download the patch and place it next to this README. - -To build, run: - - $ docker build -t oracle/ohs:12213-patch . - - -### Providing the Node Manager password -The user name and password must be supplied in a domain.properties file located in a HOST directory that you will map at Docker runtime with the -v option to the image directory /u01/oracle/bootdir. The properties file enables the scripts to configure the correct authentication for the Node Manager. - -The format of the domain.properties file is key=value pair: -username=mynodemanagerusername -password=mynodemanagerpassword - -### How to run container - - -To start the OHS container with the patched image, run the following command: - - docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -it --name ohs -p 7777:7777 oracle/ohs:12213-patch - - -### Stopping the OHS instance -To stop the OHS instance, execute the following command: - - docker stop ohs (Assuming the name of conatiner is 'ohs') - - -To look at the Docker Container logs run: - - $ docker logs --details - - -## Support -Oracle HTTP Server on Docker is supported by Oracle. - - -## License -To download and run Oracle HTTP Server 12c Distribution regardless of inside or outside a Docker container, and regardless of the distribution, you must download the binaries from Oracle website and accept the license indicated at that page. - -To download and run Oracle JDK regardless of inside or outside a Docker container, you must download the binary from Oracle website and accept the license indicated at that pge. - -All scripts and files hosted in this project and GitHub [docker/OracleHTTPServer](./) repository required to build the Docker images are, unless otherwise noted, released under the Universal Permissive License v1.0. - -## Copyright -Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. diff --git a/OracleHTTPServer/samples/12213-patch/p28061540_122130_Linux-x86-64.download b/OracleHTTPServer/samples/12213-patch/p28061540_122130_Linux-x86-64.download deleted file mode 100644 index df65e71405..0000000000 --- a/OracleHTTPServer/samples/12213-patch/p28061540_122130_Linux-x86-64.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 Oracle HTTP Server 12.2.1.3 -# 2) Put the ZIP file in the same location as this .download file -# -113aa9a64918cacf9c4fa03d85a5aa85 p28061540_122130_Linux-x86-64.zip diff --git a/OracleHTTPServer/samples/12214-patch/README.md b/OracleHTTPServer/samples/12214-patch/README.md index 1207d1ffe5..f39b00e5ef 100644 --- a/OracleHTTPServer/samples/12214-patch/README.md +++ b/OracleHTTPServer/samples/12214-patch/README.md @@ -15,7 +15,7 @@ To build, run: ### Providing the Node Manager password -The user name and password must be supplied in a domain.properties file located in a HOST directory that you will map at Docker runtime with the -v option to the image directory /u01/oracle/bootdir. The properties file enables the scripts to configure the correct authentication for the Node Manager. +The user name and password must be supplied in a domain.properties file located in a HOST directory that you will map at container runtime with the -v option to the image directory /u01/oracle/bootdir. The properties file enables the scripts to configure the correct authentication for the Node Manager. The format of the domain.properties file is key=value pair: username=mynodemanagerusername @@ -35,21 +35,21 @@ To stop the OHS instance, execute the following command: docker stop ohs (Assuming the name of conatiner is 'ohs') -To look at the Docker Container logs run: +To look at the Container logs run: $ docker logs --details ## Support -Oracle HTTP Server on Docker is supported by Oracle. +Oracle HTTP Server is supported in containers by Oracle. ## License -To download and run Oracle HTTP Server 12c Distribution regardless of inside or outside a Docker container, and regardless of the distribution, you must download the binaries from Oracle website and accept the license indicated at that page. +To download and run Oracle HTTP Server 12c Distribution regardless of inside or outside a container, and regardless of the distribution, you must download the binaries from Oracle website and accept the license indicated at that page. -To download and run Oracle JDK regardless of inside or outside a Docker container, you must download the binary from Oracle website and accept the license indicated at that pge. +To download and run Oracle JDK regardless of inside or outside a container, you must download the binary from Oracle website and accept the license indicated at that pge. -All scripts and files hosted in this project and GitHub [docker/OracleHTTPServer](./) repository required to build the Docker images are, unless otherwise noted, released under the Universal Permissive License v1.0. +All scripts and files hosted in this project and GitHub [docker/OracleHTTPServer](./) repository required to build the images are, unless otherwise noted, released under the Universal Permissive License v1.0. ## Copyright Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved. From fffdbe9134e3d9d04b06b862e80ac0443ee1d7a5 Mon Sep 17 00:00:00 2001 From: mriccell Date: Mon, 24 Jun 2024 18:59:54 -0400 Subject: [PATCH 05/19] Correct lint errors --- .../dockerfiles/12.2.1.4.0/Dockerfile | 27 ++++++++----------- .../container-scripts/provisionOHS.sh | 2 +- .../samples/12214-patch/Dockerfile | 4 --- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile index 7793f054e6..80607b4109 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile @@ -39,25 +39,20 @@ # ----------------------------------- FROM oracle/serverjre:8 -# Maintainer -# ------------------------------------ -MAINTAINER Prabhat Kishore - # Environment variables required for this build (do NOT change) # ---------------------------------------------- ENV OHS_PKG=fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip \ - OHS_BIN=fmw_12.2.1.4.0_ohs_linux64.bin \ - ORACLE_HOME=/u01/oracle/ohssa \ - PATH=$PATH:/usr/java/default/bin:/u01/oracle/ohssa/oracle_common/common/bin \ - NM_PORT=5556 \ - OHS_LISTEN_PORT=7777 \ - OHS_SSL_PORT=4443 \ - JAVA_HOME=/usr/java/default \ - MW_HOME=/u01/oracle/ohssa \ - DOMAIN_NAME=ohsDomain \ - OHS_COMPONENT_NAME=ohs1 \ - PATH=$PATH:$ORACLE_HOME/oracle_common/common/bin:$ORACLE_HOME/user_projects/domains/ohsDomain/bin:/u01/oracle/container-scripts \ - WLST_HOME=/u01/oracle/ohssa/oracle_common/common/bin +ENV OHS_BIN=fmw_12.2.1.4.0_ohs_linux64.bin \ +ENV ORACLE_HOME=/u01/oracle/ohssa \ +ENV NM_PORT=5556 \ +ENV OHS_LISTEN_PORT=7777 \ +ENV OHS_SSL_PORT=4443 \ +ENV JAVA_HOME=/usr/java/default \ +ENV MW_HOME=/u01/oracle/ohssa \ +ENV DOMAIN_NAME=ohsDomain \ +ENV OHS_COMPONENT_NAME=ohs1 \ +ENV PATH=$PATH:/usr/java/default/bin:$ORACLE_HOME/oracle_common/common/bin:$ORACLE_HOME/user_projects/domains/ohsDomain/bin:/u01/oracle/container-scripts \ +ENV WLST_HOME=/u01/oracle/ohssa/oracle_common/common/bin # Copy packages to the new drive diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh index c06d46cd89..febec4bd6e 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh @@ -30,7 +30,7 @@ function _kill() { trap _term SIGTERM # Set SIGKILL handler -trap _kill SIGKILL +#trap _kill SIGKILL echo "MW_HOME=${MW_HOME:?"Please set MW_HOME"}" echo "ORACLE_HOME=${ORACLE_HOME:?"Please set ORACLE_HOME"}" diff --git a/OracleHTTPServer/samples/12214-patch/Dockerfile b/OracleHTTPServer/samples/12214-patch/Dockerfile index 545a163332..e010fe59c9 100644 --- a/OracleHTTPServer/samples/12214-patch/Dockerfile +++ b/OracleHTTPServer/samples/12214-patch/Dockerfile @@ -22,10 +22,6 @@ # --------------- FROM oracle/ohs:12.2.1.4.0 -# Maintainer -# ---------- -MAINTAINER Prabhat Kishore - # Environment variables required for this build (do NOT change) # ------------------------------------------------------------- ENV PATCH_PKG="p36393221_122140_Linux-x86-64.zip" From a531532edb2563605b1b2fb32e66eb22a80203de Mon Sep 17 00:00:00 2001 From: mriccell Date: Mon, 8 Jul 2024 12:46:50 +0200 Subject: [PATCH 06/19] Correct Lint Errors --- OracleHTTPServer/README.md | 18 +++++------ .../dockerfiles/12.2.1.4.0/Dockerfile | 23 +++++++------- .../configureWLSProxyPlugin.sh | 2 +- .../container-scripts/provisionOHS.sh | 14 ++++----- .../dockerfiles/buildDockerImage.sh | 31 +++++++++---------- .../samples/12214-patch/Dockerfile | 1 + .../samples/12214-patch/README.md | 12 +++---- 7 files changed, 51 insertions(+), 50 deletions(-) diff --git a/OracleHTTPServer/README.md b/OracleHTTPServer/README.md index 282ace3d34..378a095329 100644 --- a/OracleHTTPServer/README.md +++ b/OracleHTTPServer/README.md @@ -1,5 +1,5 @@ -Oracle HTTP Server in containers -=================================== +# Oracle HTTP Server in containers +# =================================== This project includes quick start dockerfiles and samples for standalone Oracle HTTP Server based on Oracle Linux and Oracle JDK 8 (Server). The certification of OHS in containers does not require the use of any file presented in this repository. Customers and users are welcome to use them as starters, and customize/tweak, or create from scratch new scripts and Dockerfiles. @@ -12,8 +12,8 @@ The **buildDockerImage.sh** script is just a utility shell script that performs ### Building Oracle JDK (Server JRE) base image You must first download the Oracle Server JRE binary and drop in folder `../OracleJava/java-8` and build that image. For more information, visit the [OracleJava](../OracleJava) folder's [README](../OracleJava/README.md) file. - $ cd ../OracleJava/java-8 - $ sh build.sh + "$ cd ../OracleJava/java-8" + "$ sh build.sh" You can also pull the Oracle Server JRE 8 image from [Oracle Container Registry](https://container-registry.oracle.com). ### Building OHS Container Image @@ -21,7 +21,7 @@ IMPORTANT: You have to download the OHS binary and put it in place (see .downloa Download the required package (see .download file) and drop them in the version folder (12.2.1.4.0). Then go into the **dockerfiles** folder and run the **buildDockerImage.sh** script as root providing the version name with -v option. - $ sh buildDockerImage.sh -v 12.2.1.4.0 + "$ sh buildDockerImage.sh -v 12.2.1.4.0" IMPORTANT: The resulting image will have a pre-configured domain. @@ -40,7 +40,7 @@ If you want to start the OHS container without specifying any configuration for 1. To start the OHS container with oracle/ohs:12.2.1.4.0 image, run the following command: - docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -it --name ohs -p 7777:7777 oracle/ohs:12.2.1.4.0 + "$ docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -it --name ohs -p 7777:7777 oracle/ohs:12.2.1.4.0" If you want to start the OHS container with some pre-specified mod_weblogic configuration: @@ -50,17 +50,17 @@ If you want to start the OHS container with some pre-specified mod_weblogic conf By doing so, the contents of host directory /scratch/DockerVolume/OHSVolume(and hence custom_mod_wl_ohs.conf) will become available in the container at the mount point. This mounting can be done by using the -v option with the 'docker run' command as shown below. The following command will start the OHS container with oracle/ohs:12.2.1.4.0 image and the host directory "/scratch/DockerVolume/OHSVolume" will get mounted at the location "/config" in the container: - $ docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -v /scratch/DockerVolume/OHSVolume:/config -w /config -d --name ohs -p 7777:7777 oracle/ohs:12.2.1.4.0 + "$ docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -v /scratch/DockerVolume/OHSVolume:/config -w /config -d --name ohs -p 7777:7777 oracle/ohs:12.2.1.4.0" ### Stopping the OHS instance To stop the OHS instance, execute the following command: - docker stop ohs (Assuming the name of conatiner is 'ohs') + "$ docker stop " To look at the Container logs run: - $ docker logs --details + "$ docker logs --details " ## Support diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile index 80607b4109..cfc62e6200 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile @@ -41,22 +41,23 @@ FROM oracle/serverjre:8 # Environment variables required for this build (do NOT change) # ---------------------------------------------- -ENV OHS_PKG=fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip \ -ENV OHS_BIN=fmw_12.2.1.4.0_ohs_linux64.bin \ -ENV ORACLE_HOME=/u01/oracle/ohssa \ -ENV NM_PORT=5556 \ -ENV OHS_LISTEN_PORT=7777 \ -ENV OHS_SSL_PORT=4443 \ -ENV JAVA_HOME=/usr/java/default \ -ENV MW_HOME=/u01/oracle/ohssa \ -ENV DOMAIN_NAME=ohsDomain \ -ENV OHS_COMPONENT_NAME=ohs1 \ -ENV PATH=$PATH:/usr/java/default/bin:$ORACLE_HOME/oracle_common/common/bin:$ORACLE_HOME/user_projects/domains/ohsDomain/bin:/u01/oracle/container-scripts \ +ENV OHS_PKG=fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip +ENV OHS_BIN=fmw_12.2.1.4.0_ohs_linux64.bin +ENV ORACLE_HOME=/u01/oracle/ohssa +ENV NM_PORT=5556 +ENV OHS_LISTEN_PORT=7777 +ENV OHS_SSL_PORT=4443 +ENV JAVA_HOME=/usr/java/default +ENV MW_HOME=/u01/oracle/ohssa +ENV DOMAIN_NAME=ohsDomain +ENV OHS_COMPONENT_NAME=ohs1 +ENV PATH=$PATH:/usr/java/default/bin:$ORACLE_HOME/oracle_common/common/bin:$ORACLE_HOME/user_projects/domains/ohsDomain/bin:/u01/oracle/container-scripts ENV WLST_HOME=/u01/oracle/ohssa/oracle_common/common/bin # Copy packages to the new drive # ------------------------------------------------------- +WORKDIR /u01 COPY $OHS_PKG install.file oraInst.loc /u01/ # Install OL7 required packages. Refer FMW 12.2.1.4 System requirements guide for complete list of packages diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/configureWLSProxyPlugin.sh b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/configureWLSProxyPlugin.sh index 804b311f15..93f4db74af 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/configureWLSProxyPlugin.sh +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/configureWLSProxyPlugin.sh @@ -41,7 +41,7 @@ echo "MODWLSCONFIGFILE IS ${modwlsconfigfile}" # Check and copy custom_mod_wl_ohs.conf to OHS Instance Home if [[ -n "${modwlsconfigfile/[ ]*\n/}" ]]; then -cd ${INSTANCE_CONFIG_HOME} +cd ${INSTANCE_CONFIG_HOME} || exit mv mod_wl_ohs.conf mod_wl_ohs.conf.ORIGINAL echo "Copying ${modwlsconfigfile} to ${INSTANCE_CONFIG_HOME} " cp ${modwlsconfigfile} ${INSTANCE_CONFIG_HOME}/mod_wl_ohs.conf diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh index febec4bd6e..238f54151e 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh @@ -41,7 +41,7 @@ export MW_HOME ORACLE_HOME DOMAIN_NAME OHS_COMPONENT_NAME #Set WL_HOME, WLST_HOME, DOMAIN_HOME, NODEMGR_HOME, and LOGS_DIR -WL_HOME=${ORACLE_HOME}/wlserver +#WL_HOME=${ORACLE_HOME}/wlserver WLST_HOME=${ORACLE_HOME}/oracle_common/common/bin echo "WLST_HOME=${WLST_HOME}" @@ -73,8 +73,8 @@ PROPERTIES_FILE=/u01/oracle/bootdir/domain.properties export PROPERTIES_FILE #Declare and initializing NMSTATUS -declare -a NMSTATUS -NMSTATUS[0]="NOT RUNNING" +#declare -a NMSTATUS +#NMSTATUS[0]="NOT RUNNING" if [ ! -e "$PROPERTIES_FILE" ]; then echo "A properties file with the username and password needs to be supplied." @@ -107,7 +107,7 @@ echo "password=$NM_PASSWORD" >> ${DOMAIN_HOME}/config/nodemanager/nm_password.pr mv /u01/oracle/helloWorld.html ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/htdocs/helloWorld.html echo "Copying Configuration to OHS Instance" -cp -L /u01/oracle/config/moduleconf/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf -name '.*' | xargs rm -rf +cp -L /u01/oracle/config/moduleconf/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf -print0 -name '.*' | xargs rm -rf conf=$(ls -l /u01/oracle/config/httpd/*.conf 2>/dev/null | wc -l) if [ $conf -gt 0 ] @@ -126,16 +126,16 @@ fi if [ "$DEPLOY_WG" = "true" ] then echo "Deploying Webgate" - cd $ORACLE_HOME/webgate/ohs/tools/deployWebGate/ + cd $ORACLE_HOME/webgate/ohs/tools/deployWebGate/ || exit ./deployWebGateInstance.sh -w ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME -oh $ORACLE_HOME - cd $ORACLE_HOME/webgate/ohs/tools/setup/InstallTools + cd $ORACLE_HOME/webgate/ohs/tools/setup/InstallTools || exit export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib ./EditHttpConf -w ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME -oh $ORACLE_HOME echo "Adding OAP API exclusion to webgate.conf" echo "" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/webgate.conf echo " require all granted" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/webgate.conf echo "" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/webgate.conf - cp -rL /u01/oracle/config/webgate ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/webgate -name '.*' | xargs rm -rf + cp -rL /u01/oracle/config/webgate ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/webgate -print0 -name '.*' | xargs rm -rf else echo "Dont Deploy WG" fi diff --git a/OracleHTTPServer/dockerfiles/buildDockerImage.sh b/OracleHTTPServer/dockerfiles/buildDockerImage.sh index b9e9dd3bce..1974c3fce2 100755 --- a/OracleHTTPServer/dockerfiles/buildDockerImage.sh +++ b/OracleHTTPServer/dockerfiles/buildDockerImage.sh @@ -24,7 +24,7 @@ Parameters: LICENSE Universal Permissive License v1.0 -Copyright (c) 2016-2019: Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2016, 2024 Oracle and/or its affiliates. All rights reserved. EOF @@ -35,11 +35,13 @@ exit 0 # Validate packages checksumPackages() { echo "Checking if required packages are present and valid..." - md5sum -c *.download - if [ "$?" -ne 0 ]; then + # md5sum -c *.download + # if [ "$?" -ne 0 ]; then + MDSUM="md5sum -c *.download" + if ["$MDSUM" -ne 0 ]; then echo "MD5 for required packages to build this image did not match!" echo "Make sure to download missing files in folder dockerfiles. See *.download files for more information" - exit $? + exit $MDSUM fi } @@ -68,7 +70,8 @@ done # OHS Image Name IMAGE_NAME="oracle/ohs:$VERSION" -cd $VERSION +# cd $VERSION +cd $VERSION || exit if [ ! "$SKIPMD5" -eq 1 ]; then checksumPackages @@ -78,19 +81,21 @@ fi # Proxy settings PROXY_SETTINGS="" -if [ "${http_proxy}" != "" ]; then +#Default Proxy settings to no_proxy +PROXY="no_proxy" +if [ "$PROXY" != "http_proxy" ]; then PROXY_SETTINGS="$PROXY_SETTINGS --build-arg http_proxy=${http_proxy}" fi -if [ "${https_proxy}" != "" ]; then +if [ "$PROXY" != "https_proxy" ]; then PROXY_SETTINGS="$PROXY_SETTINGS --build-arg https_proxy=${https_proxy}" fi -if [ "${ftp_proxy}" != "" ]; then +if [ "$PROXY" != "ftp_proxy" ]; then PROXY_SETTINGS="$PROXY_SETTINGS --build-arg ftp_proxy=${ftp_proxy}" fi -if [ "${no_proxy}" != "" ]; then +if [ "$PROXY" != "no_proxy" ]; then PROXY_SETTINGS="$PROXY_SETTINGS --build-arg no_proxy=${no_proxy}" fi @@ -106,7 +111,7 @@ echo "Proxy Settings '$PROXY_SETTINGS'" # BUILD THE IMAGE (replace all environment variables) BUILD_START=$(date '+%s') docker build --force-rm=true --no-cache=true $PROXY_SETTINGS -t $IMAGE_NAME -f Dockerfile . || { - echo "There was an error building the image." + echo "OHS Docker Image was NOT successfully created. Check the output and correct any reported problems with the docker build operation." exit 1 } BUILD_END=$(date '+%s') @@ -114,15 +119,9 @@ BUILD_ELAPSED=`expr $BUILD_END - $BUILD_START` echo "" -if [ $? -eq 0 ]; then cat << EOF OHS Standalone Docker Image for version: $VERSION is ready to be used. --> $IMAGE_NAME Build completed in $BUILD_ELAPSED seconds. - -EOF -else - echo "OHS Docker Image was NOT successfully created. Check the output and correct any reported problems with the docker build operation." -fi diff --git a/OracleHTTPServer/samples/12214-patch/Dockerfile b/OracleHTTPServer/samples/12214-patch/Dockerfile index e010fe59c9..34e5f62325 100644 --- a/OracleHTTPServer/samples/12214-patch/Dockerfile +++ b/OracleHTTPServer/samples/12214-patch/Dockerfile @@ -28,6 +28,7 @@ ENV PATCH_PKG="p36393221_122140_Linux-x86-64.zip" # Copy supplemental package and scripts # -------------------------------- +WORKDIR /u01 COPY $PATCH_PKG /u01/ # Installation of Supplemental Quick Installer diff --git a/OracleHTTPServer/samples/12214-patch/README.md b/OracleHTTPServer/samples/12214-patch/README.md index f39b00e5ef..19d0813c11 100644 --- a/OracleHTTPServer/samples/12214-patch/README.md +++ b/OracleHTTPServer/samples/12214-patch/README.md @@ -1,5 +1,5 @@ -Applying patch on Oracle HTTP Server -=============== +# Applying patch on Oracle HTTP Server +# =============== This Dockerfile extends the Oracle HTTP Server image by applying a patch. This is a sample which shows how to patch an OHS image. The name of patch file will need to be modified accordingly in the Dockerfile before using it for actual cases. @@ -11,7 +11,7 @@ Then download the patch and place it next to this README. To build, run: - $ docker build -t oracle/ohs:12214-patch . + "$ docker build -t oracle/ohs:12214-patch ." ### Providing the Node Manager password @@ -26,18 +26,18 @@ password=mynodemanagerpassword To start the OHS container with the patched image, run the following command: - docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -it --name ohs -p 7777:7777 oracle/ohs:12214-patch + "$ docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -it --name ohs -p 7777:7777 oracle/ohs:12214-patch" ### Stopping the OHS instance To stop the OHS instance, execute the following command: - docker stop ohs (Assuming the name of conatiner is 'ohs') + "$ docker stop " To look at the Container logs run: - $ docker logs --details + "$ docker logs --details " ## Support From da0d3eebd2032f3c7bd07c9fc3bbd8e91dbcce07 Mon Sep 17 00:00:00 2001 From: mriccell Date: Mon, 8 Jul 2024 13:23:25 +0200 Subject: [PATCH 07/19] fix more LINT errors --- OracleHTTPServer/README.md | 18 ++++++------------ .../dockerfiles/12.2.1.4.0/Dockerfile | 2 +- .../dockerfiles/buildDockerImage.sh | 12 ++++-------- .../samples/12214-patch/Dockerfile | 2 +- OracleHTTPServer/samples/12214-patch/README.md | 11 +++++------ 5 files changed, 17 insertions(+), 28 deletions(-) diff --git a/OracleHTTPServer/README.md b/OracleHTTPServer/README.md index 378a095329..31f68e91aa 100644 --- a/OracleHTTPServer/README.md +++ b/OracleHTTPServer/README.md @@ -1,5 +1,5 @@ # Oracle HTTP Server in containers -# =================================== +=================================== This project includes quick start dockerfiles and samples for standalone Oracle HTTP Server based on Oracle Linux and Oracle JDK 8 (Server). The certification of OHS in containers does not require the use of any file presented in this repository. Customers and users are welcome to use them as starters, and customize/tweak, or create from scratch new scripts and Dockerfiles. @@ -14,6 +14,7 @@ You must first download the Oracle Server JRE binary and drop in folder `../Orac "$ cd ../OracleJava/java-8" "$ sh build.sh" + You can also pull the Oracle Server JRE 8 image from [Oracle Container Registry](https://container-registry.oracle.com). ### Building OHS Container Image @@ -21,7 +22,7 @@ IMPORTANT: You have to download the OHS binary and put it in place (see .downloa Download the required package (see .download file) and drop them in the version folder (12.2.1.4.0). Then go into the **dockerfiles** folder and run the **buildDockerImage.sh** script as root providing the version name with -v option. - "$ sh buildDockerImage.sh -v 12.2.1.4.0" + "$ sh buildDockerImage.sh -v 12.2.1.4.0" IMPORTANT: The resulting image will have a pre-configured domain. @@ -33,15 +34,10 @@ username=mynodemanagerusername password=mynodemanagerpassword ### How to run container - - - If you want to start the OHS container without specifying any configuration for mod_weblogic: 1. To start the OHS container with oracle/ohs:12.2.1.4.0 image, run the following command: - - "$ docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -it --name ohs -p 7777:7777 oracle/ohs:12.2.1.4.0" - + "$ docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -it --name ohs -p 7777:7777 oracle/ohs:12.2.1.4.0" If you want to start the OHS container with some pre-specified mod_weblogic configuration: 1. Depending on your weblogic environment , create a **custom_mod_wl_ohs.conf** file by referring to container-scripts/mod_wl_ohs.conf.sample and section 2.4 @ [OHS 12c Documentation](http://docs.oracle.com/middleware/12214/webtier/develop-plugin/oracle.htm#PLGWL553) @@ -50,19 +46,17 @@ If you want to start the OHS container with some pre-specified mod_weblogic conf By doing so, the contents of host directory /scratch/DockerVolume/OHSVolume(and hence custom_mod_wl_ohs.conf) will become available in the container at the mount point. This mounting can be done by using the -v option with the 'docker run' command as shown below. The following command will start the OHS container with oracle/ohs:12.2.1.4.0 image and the host directory "/scratch/DockerVolume/OHSVolume" will get mounted at the location "/config" in the container: - "$ docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -v /scratch/DockerVolume/OHSVolume:/config -w /config -d --name ohs -p 7777:7777 oracle/ohs:12.2.1.4.0" + "$ docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -v /scratch/DockerVolume/OHSVolume:/config -w /config -d --name ohs -p 7777:7777 oracle/ohs:12.2.1.4.0" ### Stopping the OHS instance To stop the OHS instance, execute the following command: - "$ docker stop " - + "$ docker stop " To look at the Container logs run: "$ docker logs --details " - ## Support Oracle HTTP Server in containers is supported by Oracle. diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile index cfc62e6200..c48fab93eb 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile @@ -57,7 +57,6 @@ ENV WLST_HOME=/u01/oracle/ohssa/oracle_common/common/bin # Copy packages to the new drive # ------------------------------------------------------- -WORKDIR /u01 COPY $OHS_PKG install.file oraInst.loc /u01/ # Install OL7 required packages. Refer FMW 12.2.1.4 System requirements guide for complete list of packages @@ -73,6 +72,7 @@ RUN yum install -y unzip libaio sysstat make psmisc gcc && \ # Go to /u01 as user 'oracle' to proceed with OHS installation #-------------------------------------------------------- USER oracle +WORKDIR /u01 RUN cd /u01 && unzip -q /u01/$OHS_PKG && cd - && \ /u01/$OHS_BIN -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc ORACLE_HOME=$ORACLE_HOME && \ rm /u01/$OHS_BIN /u01/oraInst.loc /u01/install.file && \ diff --git a/OracleHTTPServer/dockerfiles/buildDockerImage.sh b/OracleHTTPServer/dockerfiles/buildDockerImage.sh index 1974c3fce2..2eb328c8ac 100755 --- a/OracleHTTPServer/dockerfiles/buildDockerImage.sh +++ b/OracleHTTPServer/dockerfiles/buildDockerImage.sh @@ -38,7 +38,7 @@ checksumPackages() { # md5sum -c *.download # if [ "$?" -ne 0 ]; then MDSUM="md5sum -c *.download" - if ["$MDSUM" -ne 0 ]; then + if [ "$MDSUM" -ne 0 ]; then echo "MD5 for required packages to build this image did not match!" echo "Make sure to download missing files in folder dockerfiles. See *.download files for more information" exit $MDSUM @@ -118,10 +118,6 @@ BUILD_END=$(date '+%s') BUILD_ELAPSED=`expr $BUILD_END - $BUILD_START` echo "" - -cat << EOF - OHS Standalone Docker Image for version: $VERSION is ready to be used. - - --> $IMAGE_NAME - - Build completed in $BUILD_ELAPSED seconds. +echo "OHS Standalone Docker Image for version: $VERSION is ready to be used." +echo " --> $IMAGE_NAME" +echo "Build completed in $BUILD_ELAPSED seconds." diff --git a/OracleHTTPServer/samples/12214-patch/Dockerfile b/OracleHTTPServer/samples/12214-patch/Dockerfile index 34e5f62325..d7870e0bf7 100644 --- a/OracleHTTPServer/samples/12214-patch/Dockerfile +++ b/OracleHTTPServer/samples/12214-patch/Dockerfile @@ -28,12 +28,12 @@ ENV PATCH_PKG="p36393221_122140_Linux-x86-64.zip" # Copy supplemental package and scripts # -------------------------------- -WORKDIR /u01 COPY $PATCH_PKG /u01/ # Installation of Supplemental Quick Installer # -------------------------------------------- USER oracle +WORKDIR /u01 RUN cd /u01 && $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG && cd - && \ cd /u01/36393221 && $ORACLE_HOME/OPatch/opatch apply -silent && \ rm /u01/$PATCH_PKG diff --git a/OracleHTTPServer/samples/12214-patch/README.md b/OracleHTTPServer/samples/12214-patch/README.md index 19d0813c11..b97dfd1856 100644 --- a/OracleHTTPServer/samples/12214-patch/README.md +++ b/OracleHTTPServer/samples/12214-patch/README.md @@ -1,5 +1,5 @@ # Applying patch on Oracle HTTP Server -# =============== +=============== This Dockerfile extends the Oracle HTTP Server image by applying a patch. This is a sample which shows how to patch an OHS image. The name of patch file will need to be modified accordingly in the Dockerfile before using it for actual cases. @@ -10,8 +10,8 @@ First make sure you have built oracle/ohs:12.2.1.4.0. Then download the patch and place it next to this README. To build, run: - - "$ docker build -t oracle/ohs:12214-patch ." + + "$ docker build -t oracle/ohs:12214-patch ." ### Providing the Node Manager password @@ -32,12 +32,11 @@ To start the OHS container with the patched image, run the following command: ### Stopping the OHS instance To stop the OHS instance, execute the following command: - "$ docker stop " - + "$ docker stop " To look at the Container logs run: - "$ docker logs --details " + "$ docker logs --details " ## Support From 5d611a998c15f088b38f859f95a9af946bbc61c2 Mon Sep 17 00:00:00 2001 From: mriccell Date: Mon, 8 Jul 2024 15:10:07 +0200 Subject: [PATCH 08/19] Lint warnings --- OracleHTTPServer/README.md | 1 - OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile | 2 +- OracleHTTPServer/dockerfiles/buildDockerImage.sh | 13 ++++++++----- OracleHTTPServer/samples/12214-patch/Dockerfile | 2 +- OracleHTTPServer/samples/12214-patch/README.md | 7 ------- 5 files changed, 10 insertions(+), 15 deletions(-) diff --git a/OracleHTTPServer/README.md b/OracleHTTPServer/README.md index 31f68e91aa..307b7841c7 100644 --- a/OracleHTTPServer/README.md +++ b/OracleHTTPServer/README.md @@ -60,7 +60,6 @@ To look at the Container logs run: ## Support Oracle HTTP Server in containers is supported by Oracle. - ## License To download and run Oracle HTTP Server 12c Distribution regardless of inside or outside a container, and regardless of the distribution, you must download the binaries from Oracle website and accept the license indicated at that page. diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile index c48fab93eb..c84f2a0a62 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile @@ -73,7 +73,7 @@ RUN yum install -y unzip libaio sysstat make psmisc gcc && \ #-------------------------------------------------------- USER oracle WORKDIR /u01 -RUN cd /u01 && unzip -q /u01/$OHS_PKG && cd - && \ +RUN unzip -q /u01/$OHS_PKG && cd - && \ /u01/$OHS_BIN -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc ORACLE_HOME=$ORACLE_HOME && \ rm /u01/$OHS_BIN /u01/oraInst.loc /u01/install.file && \ mkdir /u01/oracle/container-scripts/ /u01/oracle/logs diff --git a/OracleHTTPServer/dockerfiles/buildDockerImage.sh b/OracleHTTPServer/dockerfiles/buildDockerImage.sh index 2eb328c8ac..090d3042a8 100755 --- a/OracleHTTPServer/dockerfiles/buildDockerImage.sh +++ b/OracleHTTPServer/dockerfiles/buildDockerImage.sh @@ -82,20 +82,23 @@ fi # Proxy settings PROXY_SETTINGS="" #Default Proxy settings to no_proxy -PROXY="no_proxy" -if [ "$PROXY" != "http_proxy" ]; then +http_proxy="" +https_proxy="" +ftp_proxy="" +no_proxy="" +if [ "$http_proxy" != "" ]; then PROXY_SETTINGS="$PROXY_SETTINGS --build-arg http_proxy=${http_proxy}" fi -if [ "$PROXY" != "https_proxy" ]; then +if [ "$https_proxy" != "" ]; then PROXY_SETTINGS="$PROXY_SETTINGS --build-arg https_proxy=${https_proxy}" fi -if [ "$PROXY" != "ftp_proxy" ]; then +if [ "$ftp_proxy" != "" ]; then PROXY_SETTINGS="$PROXY_SETTINGS --build-arg ftp_proxy=${ftp_proxy}" fi -if [ "$PROXY" != "no_proxy" ]; then +if [ "$no_proxy" != "" ]; then PROXY_SETTINGS="$PROXY_SETTINGS --build-arg no_proxy=${no_proxy}" fi diff --git a/OracleHTTPServer/samples/12214-patch/Dockerfile b/OracleHTTPServer/samples/12214-patch/Dockerfile index d7870e0bf7..837ab587af 100644 --- a/OracleHTTPServer/samples/12214-patch/Dockerfile +++ b/OracleHTTPServer/samples/12214-patch/Dockerfile @@ -34,7 +34,7 @@ COPY $PATCH_PKG /u01/ # -------------------------------------------- USER oracle WORKDIR /u01 -RUN cd /u01 && $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG && cd - && \ +RUN $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG && cd - && \ cd /u01/36393221 && $ORACLE_HOME/OPatch/opatch apply -silent && \ rm /u01/$PATCH_PKG diff --git a/OracleHTTPServer/samples/12214-patch/README.md b/OracleHTTPServer/samples/12214-patch/README.md index b97dfd1856..6bef780650 100644 --- a/OracleHTTPServer/samples/12214-patch/README.md +++ b/OracleHTTPServer/samples/12214-patch/README.md @@ -4,7 +4,6 @@ This Dockerfile extends the Oracle HTTP Server image by applying a patch. This i The name of patch file will need to be modified accordingly in the Dockerfile before using it for actual cases. ## How to Build and Run - First make sure you have built oracle/ohs:12.2.1.4.0. Then download the patch and place it next to this README. @@ -13,7 +12,6 @@ To build, run: "$ docker build -t oracle/ohs:12214-patch ." - ### Providing the Node Manager password The user name and password must be supplied in a domain.properties file located in a HOST directory that you will map at container runtime with the -v option to the image directory /u01/oracle/bootdir. The properties file enables the scripts to configure the correct authentication for the Node Manager. @@ -22,13 +20,10 @@ username=mynodemanagerusername password=mynodemanagerpassword ### How to run container - - To start the OHS container with the patched image, run the following command: "$ docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -it --name ohs -p 7777:7777 oracle/ohs:12214-patch" - ### Stopping the OHS instance To stop the OHS instance, execute the following command: @@ -38,11 +33,9 @@ To look at the Container logs run: "$ docker logs --details " - ## Support Oracle HTTP Server is supported in containers by Oracle. - ## License To download and run Oracle HTTP Server 12c Distribution regardless of inside or outside a container, and regardless of the distribution, you must download the binaries from Oracle website and accept the license indicated at that page. From cd0f477b15426cca179d85bbf7552512da848a57 Mon Sep 17 00:00:00 2001 From: mriccell Date: Mon, 8 Jul 2024 15:45:50 +0200 Subject: [PATCH 09/19] correct Lint warnings --- OracleHTTPServer/README.md | 8 ++++---- OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile | 3 ++- OracleHTTPServer/samples/12214-patch/Dockerfile | 2 +- OracleHTTPServer/samples/12214-patch/README.md | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/OracleHTTPServer/README.md b/OracleHTTPServer/README.md index 307b7841c7..168058c5d5 100644 --- a/OracleHTTPServer/README.md +++ b/OracleHTTPServer/README.md @@ -24,7 +24,7 @@ Download the required package (see .download file) and drop them in the version "$ sh buildDockerImage.sh -v 12.2.1.4.0" -IMPORTANT: The resulting image will have a pre-configured domain. +IMPORTANT: The resulting image will have a pre-configured domain. ### Providing the Node Manager password The user name and password must be supplied in a domain.properties file located in a HOST directory that you will map at runtime with the -v option to the image directory /u01/oracle/bootdir. The properties file enables the scripts to configure the correct authentication for the Node Manager. @@ -43,7 +43,7 @@ If you want to start the OHS container with some pre-specified mod_weblogic conf 1. Depending on your weblogic environment , create a **custom_mod_wl_ohs.conf** file by referring to container-scripts/mod_wl_ohs.conf.sample and section 2.4 @ [OHS 12c Documentation](http://docs.oracle.com/middleware/12214/webtier/develop-plugin/oracle.htm#PLGWL553) 2. Place the custom_mod_wl_ohs.conf file in a directory in the host say,"/scratch/DockerVolume/OHSVolume" and then mount this directory into the container at the location "/config". - By doing so, the contents of host directory /scratch/DockerVolume/OHSVolume(and hence custom_mod_wl_ohs.conf) will become available in the container at the mount point. + By doing so, the contents of host directory /scratch/DockerVolume/OHSVolume(and hence custom_mod_wl_ohs.conf) will become available in the container at the mount point. This mounting can be done by using the -v option with the 'docker run' command as shown below. The following command will start the OHS container with oracle/ohs:12.2.1.4.0 image and the host directory "/scratch/DockerVolume/OHSVolume" will get mounted at the location "/config" in the container: "$ docker run -v `HOST PATH where the domain.properties file is`:/u01/oracle/bootdir -v /scratch/DockerVolume/OHSVolume:/config -w /config -d --name ohs -p 7777:7777 oracle/ohs:12.2.1.4.0" @@ -51,7 +51,7 @@ If you want to start the OHS container with some pre-specified mod_weblogic conf ### Stopping the OHS instance To stop the OHS instance, execute the following command: - "$ docker stop " + "$ docker stop " To look at the Container logs run: @@ -63,7 +63,7 @@ Oracle HTTP Server in containers is supported by Oracle. ## License To download and run Oracle HTTP Server 12c Distribution regardless of inside or outside a container, and regardless of the distribution, you must download the binaries from Oracle website and accept the license indicated at that page. -To download and run Oracle JDK regardless of inside or outside a container, you must download the binary from Oracle website and accept the license indicated at that pge. +To download and run Oracle JDK regardless of inside or outside a container, you must download the binary from Oracle website and accept the license indicated at that page. All scripts and files hosted in this project and GitHub [docker/OracleHTTPServer](./) repository required to build the images are, unless otherwise noted, released under the Universal Permissive License v1.0. diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile index c84f2a0a62..93ba71b8b1 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile @@ -73,7 +73,8 @@ RUN yum install -y unzip libaio sysstat make psmisc gcc && \ #-------------------------------------------------------- USER oracle WORKDIR /u01 -RUN unzip -q /u01/$OHS_PKG && cd - && \ +#RUN unzip -q /u01/$OHS_PKG && cd - && \ +RUN unzip -q /u01/$OHS_PKG && \ /u01/$OHS_BIN -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc ORACLE_HOME=$ORACLE_HOME && \ rm /u01/$OHS_BIN /u01/oraInst.loc /u01/install.file && \ mkdir /u01/oracle/container-scripts/ /u01/oracle/logs diff --git a/OracleHTTPServer/samples/12214-patch/Dockerfile b/OracleHTTPServer/samples/12214-patch/Dockerfile index 837ab587af..c214d36849 100644 --- a/OracleHTTPServer/samples/12214-patch/Dockerfile +++ b/OracleHTTPServer/samples/12214-patch/Dockerfile @@ -34,7 +34,7 @@ COPY $PATCH_PKG /u01/ # -------------------------------------------- USER oracle WORKDIR /u01 -RUN $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG && cd - && \ +RUN $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG && \ cd /u01/36393221 && $ORACLE_HOME/OPatch/opatch apply -silent && \ rm /u01/$PATCH_PKG diff --git a/OracleHTTPServer/samples/12214-patch/README.md b/OracleHTTPServer/samples/12214-patch/README.md index 6bef780650..15a843d4f6 100644 --- a/OracleHTTPServer/samples/12214-patch/README.md +++ b/OracleHTTPServer/samples/12214-patch/README.md @@ -1,4 +1,4 @@ -# Applying patch on Oracle HTTP Server +# Applying patch on Oracle HTTP Server =============== This Dockerfile extends the Oracle HTTP Server image by applying a patch. This is a sample which shows how to patch an OHS image. The name of patch file will need to be modified accordingly in the Dockerfile before using it for actual cases. @@ -39,7 +39,7 @@ Oracle HTTP Server is supported in containers by Oracle. ## License To download and run Oracle HTTP Server 12c Distribution regardless of inside or outside a container, and regardless of the distribution, you must download the binaries from Oracle website and accept the license indicated at that page. -To download and run Oracle JDK regardless of inside or outside a container, you must download the binary from Oracle website and accept the license indicated at that pge. +To download and run Oracle JDK regardless of inside or outside a container, you must download the binary from Oracle website and accept the license indicated at that page. All scripts and files hosted in this project and GitHub [docker/OracleHTTPServer](./) repository required to build the images are, unless otherwise noted, released under the Universal Permissive License v1.0. From 65dc136a9e0339ffc1a05137117c633c350dd58a Mon Sep 17 00:00:00 2001 From: mriccell Date: Mon, 8 Jul 2024 15:53:01 +0200 Subject: [PATCH 10/19] fix Lint warning --- OracleHTTPServer/samples/12214-patch/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleHTTPServer/samples/12214-patch/Dockerfile b/OracleHTTPServer/samples/12214-patch/Dockerfile index c214d36849..84bd3748fe 100644 --- a/OracleHTTPServer/samples/12214-patch/Dockerfile +++ b/OracleHTTPServer/samples/12214-patch/Dockerfile @@ -35,7 +35,7 @@ COPY $PATCH_PKG /u01/ USER oracle WORKDIR /u01 RUN $JAVA_HOME/bin/jar xf /u01/$PATCH_PKG && \ - cd /u01/36393221 && $ORACLE_HOME/OPatch/opatch apply -silent && \ + $ORACLE_HOME/OPatch/opatch apply -silent /u01/36393221 && \ rm /u01/$PATCH_PKG WORKDIR ${ORACLE_HOME} From 4b99a52b57e2df0c1f7fa95ea3e93e46213fabce Mon Sep 17 00:00:00 2001 From: mriccell Date: Thu, 18 Jul 2024 17:00:50 +0200 Subject: [PATCH 11/19] Changes to the scripts to address comments --- .../dockerfiles/12.2.1.4.0/Dockerfile | 19 ++++++++++--------- .../configureWLSProxyPlugin.sh | 4 ++-- .../container-scripts/provisionOHS.sh | 15 ++++++++------- .../12.2.1.4.0/container-scripts/start-ohs.py | 2 +- .../12.2.1.4.0/container-scripts/stop-ohs.py | 2 +- 5 files changed, 22 insertions(+), 20 deletions(-) mode change 100644 => 100755 OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/start-ohs.py mode change 100644 => 100755 OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/stop-ohs.py diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile index 93ba71b8b1..0a10e22a24 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile @@ -48,16 +48,15 @@ ENV NM_PORT=5556 ENV OHS_LISTEN_PORT=7777 ENV OHS_SSL_PORT=4443 ENV JAVA_HOME=/usr/java/default -ENV MW_HOME=/u01/oracle/ohssa ENV DOMAIN_NAME=ohsDomain ENV OHS_COMPONENT_NAME=ohs1 -ENV PATH=$PATH:/usr/java/default/bin:$ORACLE_HOME/oracle_common/common/bin:$ORACLE_HOME/user_projects/domains/ohsDomain/bin:/u01/oracle/container-scripts +ENV PATH=${PATH}:/usr/java/default/bin:${ORACLE_HOME}/oracle_common/common/bin:${ORACLE_HOME}/user_projects/domains/ohsDomain/bin:/u01/oracle/container-scripts ENV WLST_HOME=/u01/oracle/ohssa/oracle_common/common/bin # Copy packages to the new drive # ------------------------------------------------------- -COPY $OHS_PKG install.file oraInst.loc /u01/ +COPY ${OHS_PKG} install.file oraInst.loc /u01/ # Install OL7 required packages. Refer FMW 12.2.1.4 System requirements guide for complete list of packages # Setup filesystem and oracle user @@ -73,20 +72,22 @@ RUN yum install -y unzip libaio sysstat make psmisc gcc && \ #-------------------------------------------------------- USER oracle WORKDIR /u01 -#RUN unzip -q /u01/$OHS_PKG && cd - && \ -RUN unzip -q /u01/$OHS_PKG && \ - /u01/$OHS_BIN -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc ORACLE_HOME=$ORACLE_HOME && \ - rm /u01/$OHS_BIN /u01/oraInst.loc /u01/install.file && \ - mkdir /u01/oracle/container-scripts/ /u01/oracle/logs +#RUN unzip -q /u01/${OHS_PKG} && cd - && \ +RUN unzip -q /u01/${OHS_PKG} && \ + /u01/${OHS_BIN} -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc ORACLE_HOME=${ORACLE_HOME} && \ + rm /u01/${OHS_BIN} /u01/oraInst.loc /u01/install.file && \ + mkdir /u01/oracle/container-scripts/ /u01/oracle/logs && \ + chown oracle:oracle -R /u01/oracle/logs # Copy required files to build this image # ------------------------------------------------------ COPY container-scripts/* /u01/oracle/container-scripts/ #Expose all Ports -EXPOSE $OHS_SSL_PORT $OHS_LISTEN_PORT $NM_PORT +EXPOSE ${OHS_SSL_PORT} ${OHS_LISTEN_PORT} ${NM_PORT} # Final setup +USER oracle WORKDIR /u01/oracle/container-scripts # Provision OHS instance diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/configureWLSProxyPlugin.sh b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/configureWLSProxyPlugin.sh index 93f4db74af..f981b3e52e 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/configureWLSProxyPlugin.sh +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/configureWLSProxyPlugin.sh @@ -25,11 +25,11 @@ #DOMAIN_NAME - Env Value set by Dockerfile , default is "ohsDOmain" #OHS_COMPONENT_NAME - Env Value set by Dockerfile , default is "ohs1" #************************************************************************* -echo "MW_HOME=${MW_HOME:?"Please set MW_HOME"}" +echo "ORACLE_HOME=${ORACLE_HOME:?"Please set MW_HOME"}" echo "DOMAIN_NAME=${DOMAIN_NAME:?"Please set DOMAIN_NAME"}" echo "OHS_COMPONENT_NAME=${OHS_COMPONENT_NAME:?"Please set OHS_COMPONENT_NAME"}" -DOMAIN_HOME=${MW_HOME}/user_projects/domains/${DOMAIN_NAME} +DOMAIN_HOME=${ORACLE_HOME}/user_projects/domains/${DOMAIN_NAME} INSTANCE_CONFIG_HOME=$DOMAIN_HOME/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME} export INSTANCE_CONFIG_HOME echo "INSTANCE_CONFIG_DIR=${INSTANCE_CONFIG_HOME}" diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh index 238f54151e..c8c3f23249 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh @@ -32,12 +32,11 @@ trap _term SIGTERM # Set SIGKILL handler #trap _kill SIGKILL -echo "MW_HOME=${MW_HOME:?"Please set MW_HOME"}" echo "ORACLE_HOME=${ORACLE_HOME:?"Please set ORACLE_HOME"}" echo "DOMAIN_NAME=${DOMAIN_NAME:?"Please set DOMAIN_NAME"}" echo "OHS_COMPONENT_NAME=${OHS_COMPONENT_NAME:?"Please set OHS_COMPONENT_NAME"}" -export MW_HOME ORACLE_HOME DOMAIN_NAME OHS_COMPONENT_NAME +export ORACLE_HOME DOMAIN_NAME OHS_COMPONENT_NAME #Set WL_HOME, WLST_HOME, DOMAIN_HOME, NODEMGR_HOME, and LOGS_DIR @@ -45,15 +44,15 @@ export MW_HOME ORACLE_HOME DOMAIN_NAME OHS_COMPONENT_NAME WLST_HOME=${ORACLE_HOME}/oracle_common/common/bin echo "WLST_HOME=${WLST_HOME}" -DOMAIN_HOME=${ORACLE_HOME}/ohssa/user_projects/domains/${DOMAIN_NAME} +DOMAIN_HOME=${ORACLE_HOME}/user_projects/domains/${DOMAIN_NAME} export DOMAIN_HOME echo "DOMAIN_HOME=${DOMAIN_HOME}" NODEMGR_HOME=${DOMAIN_HOME}/nodemanager export NODEMGR_HOME -echo "PATH=${PATH}" -PATH=$PATH:/usr/java/default/bin:/u01/oracle/ohssa/oracle_common/common/bin +#echo "PATH=${PATH}" +PATH=$PATH:/usr/java/default/bin:${ORACLE_HOME}/oracle_common/common/bin export PATH echo "PATH=${PATH}" @@ -99,6 +98,8 @@ if [ -z "$NM_PASSWORD" ]; then echo "The Node Manager password is blank. It must be set in the properties file." exit fi +#echo "NM_USERNAME=" ${NM_USER} +#echo "NM_PASSWORD=" ${NM_PASSWORD} wlst.sh -skipWLSModuleScanning -loadProperties $PROPERTIES_FILE /u01/oracle/create-sa-ohs-domain.py # Set the NM username and password in the properties file @@ -110,14 +111,14 @@ echo "Copying Configuration to OHS Instance" cp -L /u01/oracle/config/moduleconf/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf -print0 -name '.*' | xargs rm -rf conf=$(ls -l /u01/oracle/config/httpd/*.conf 2>/dev/null | wc -l) -if [ $conf -gt 0 ] +if [ $conf -gt 1 ] then echo "Copying root .conf files $OHS_COMPONENT_NAME" cp -L /u01/oracle/config/httpd/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME fi htdocs=$(ls -l /u01/oracle/config/htdocs/*.html 2>/dev/null | wc -l) -if [ $htdocs -gt 0 ] +if [ $htdocs -gt 1 ] then echo "Copying htdocs to OHS Instance" cp -L /u01/oracle/config/htdocs/*.html ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/htdocs diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/start-ohs.py b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/start-ohs.py old mode 100644 new mode 100755 index af9648b3d5..e68a43ceb1 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/start-ohs.py +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/start-ohs.py @@ -11,7 +11,7 @@ ohs_comp_name = os.environ.get("OHS_COMPONENT_NAME", "ohs1") domain_name = os.environ.get("DOMAIN_NAME", "ohsDomain") domain_path = os.environ.get("DOMAIN_HOME", "temp") -oracle_home = os.environ.get("ORACLE_HOME", "/u01/oracle/ohssa") +oracle_home = os.environ.get("ORACLE_HOME", "/u01/oracle") ###################################################### try: JAVA_HOME = java_home diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/stop-ohs.py b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/stop-ohs.py old mode 100644 new mode 100755 index 0470987f9c..d63a7e6a74 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/stop-ohs.py +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/stop-ohs.py @@ -10,7 +10,7 @@ ohs_comp_name = os.environ.get("OHS_COMPONENT_NAME", "ohs1") domain_name = os.environ.get("DOMAIN_NAME", "ohsDomain") domain_path = os.environ.get("DOMAIN_HOME", "temp") -oracle_home = os.environ.get("ORACLE_HOME", "/u01/oracle/ohssa") +oracle_home = os.environ.get("ORACLE_HOME", "/u01/oracle") ###################################################### try: JAVA_HOME = java_home From a1c3c1272815bbaa5fd2b154a8a5e6d0d280b23d Mon Sep 17 00:00:00 2001 From: mriccell Date: Thu, 18 Jul 2024 17:35:54 +0200 Subject: [PATCH 12/19] Changes to scripts --- .../12.2.1.4.0/container-scripts/create-sa-ohs-domain.py | 2 +- .../12.2.1.4.0/container-scripts/mod_wl_ohs.conf.sample | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py old mode 100644 new mode 100755 index 82a7dbf30d..8f6268d1d4 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py @@ -47,7 +47,7 @@ setOption('OverwriteDomain', 'true') #Write Domain, close template and exit # ====================================================================== -#writeDomain(r'/u01/oracle/ohssa/user_projects/domains/ohsDomain') +#writeDomain(r'/u01/oracle/user_projects/domains/ohsDomain') writeDomain(domain_path) dumpStack() closeTemplate() diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/mod_wl_ohs.conf.sample b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/mod_wl_ohs.conf.sample index 303fdee59f..68ba970ea6 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/mod_wl_ohs.conf.sample +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/mod_wl_ohs.conf.sample @@ -10,7 +10,7 @@ #Refer to OHS documentation for more details and examples #Section 2.4 @ https://docs.oracle.com/en/middleware/fusion-middleware/web-tier/12.2.1.4/develop-plugin/oracle.html#GUID-A463B189-DF47-4932-8B96-FD4F5FEC8D56 #************************************************************************* -LoadModule weblogic_module "/u01/oracle/ohssa/ohs/modules/mod_wl_ohs.so" +LoadModule weblogic_module "/u01/oracle/ohs/modules/mod_wl_ohs.so" WebLogicHost WEBLOGIC_HOST From 0a2098b8e65ee72da75fe0ba67b82038c284f65a Mon Sep 17 00:00:00 2001 From: mriccell Date: Mon, 5 Aug 2024 11:48:01 -0400 Subject: [PATCH 13/19] fix ORACLE_HOME and WLST_HOME --- OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile index 0a10e22a24..31388a274e 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile @@ -43,7 +43,7 @@ FROM oracle/serverjre:8 # ---------------------------------------------- ENV OHS_PKG=fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip ENV OHS_BIN=fmw_12.2.1.4.0_ohs_linux64.bin -ENV ORACLE_HOME=/u01/oracle/ohssa +ENV ORACLE_HOME=/u01/oracle ENV NM_PORT=5556 ENV OHS_LISTEN_PORT=7777 ENV OHS_SSL_PORT=4443 @@ -51,7 +51,7 @@ ENV JAVA_HOME=/usr/java/default ENV DOMAIN_NAME=ohsDomain ENV OHS_COMPONENT_NAME=ohs1 ENV PATH=${PATH}:/usr/java/default/bin:${ORACLE_HOME}/oracle_common/common/bin:${ORACLE_HOME}/user_projects/domains/ohsDomain/bin:/u01/oracle/container-scripts -ENV WLST_HOME=/u01/oracle/ohssa/oracle_common/common/bin +ENV WLST_HOME=/u01/oracle/oracle_common/common/bin # Copy packages to the new drive From c64bdc5f77d92c3380d7b071de61447c6ed9e8dc Mon Sep 17 00:00:00 2001 From: mriccell Date: Tue, 6 Aug 2024 09:55:58 -0400 Subject: [PATCH 14/19] change location where container-scripts are copied to --- OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile index 31388a274e..b1b5abff8d 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile @@ -81,7 +81,7 @@ RUN unzip -q /u01/${OHS_PKG} && \ # Copy required files to build this image # ------------------------------------------------------ -COPY container-scripts/* /u01/oracle/container-scripts/ +COPY container-scripts/* /u01/oracle/ #Expose all Ports EXPOSE ${OHS_SSL_PORT} ${OHS_LISTEN_PORT} ${NM_PORT} From a4ef1ba355399f913c5c6981d58d42914f83e89c Mon Sep 17 00:00:00 2001 From: mriccell Date: Tue, 6 Aug 2024 13:41:55 -0400 Subject: [PATCH 15/19] replace container-scripts directories for /u01/oracle --- OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile index b1b5abff8d..425cdea3f8 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile @@ -50,7 +50,7 @@ ENV OHS_SSL_PORT=4443 ENV JAVA_HOME=/usr/java/default ENV DOMAIN_NAME=ohsDomain ENV OHS_COMPONENT_NAME=ohs1 -ENV PATH=${PATH}:/usr/java/default/bin:${ORACLE_HOME}/oracle_common/common/bin:${ORACLE_HOME}/user_projects/domains/ohsDomain/bin:/u01/oracle/container-scripts +ENV PATH=${PATH}:/usr/java/default/bin:${ORACLE_HOME}/oracle_common/common/bin:${ORACLE_HOME}/user_projects/domains/ohsDomain/bin:${ORACLE_HOME} ENV WLST_HOME=/u01/oracle/oracle_common/common/bin @@ -76,7 +76,7 @@ WORKDIR /u01 RUN unzip -q /u01/${OHS_PKG} && \ /u01/${OHS_BIN} -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc ORACLE_HOME=${ORACLE_HOME} && \ rm /u01/${OHS_BIN} /u01/oraInst.loc /u01/install.file && \ - mkdir /u01/oracle/container-scripts/ /u01/oracle/logs && \ + mkdir /u01/oracle/logs && \ chown oracle:oracle -R /u01/oracle/logs # Copy required files to build this image @@ -88,7 +88,7 @@ EXPOSE ${OHS_SSL_PORT} ${OHS_LISTEN_PORT} ${NM_PORT} # Final setup USER oracle -WORKDIR /u01/oracle/container-scripts +WORKDIR ${ORACLE_HOME} # Provision OHS instance -CMD ["/u01/oracle/container-scripts/provisionOHS.sh"] +CMD ["/u01/oracle/provisionOHS.sh"] From 2610400b94565e4e91c965990ac8b1bbd9868f07 Mon Sep 17 00:00:00 2001 From: mriccell Date: Wed, 7 Aug 2024 12:01:23 -0400 Subject: [PATCH 16/19] default domain home --- .../container-scripts/create-sa-ohs-domain.py | 2 +- .../container-scripts/provisionOHS.sh | 22 +++++++++---------- .../12.2.1.4.0/container-scripts/start-ohs.py | 2 +- .../12.2.1.4.0/container-scripts/stop-ohs.py | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py index 8f6268d1d4..c903b2fb88 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py @@ -17,7 +17,7 @@ ohs_ssl_port = (os.environ.get("OHS_SSL_PORT", "3333")) ohs_comp_name = os.environ.get("OHS_COMPONENT_NAME", "ohs1") domain_name = os.environ.get("DOMAIN_NAME", "ohsDomain") -domain_path = os.environ.get("DOMAIN_HOME", "/temp") +domain_path = os.environ.get("DOMAIN_HOME", "/u01/oracle/user_projects/domains/ohsDomain") # Select OHS standalone template # ============================================== setTopologyProfile('Compact') diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh index c8c3f23249..230c0c2328 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh @@ -105,38 +105,38 @@ wlst.sh -skipWLSModuleScanning -loadProperties $PROPERTIES_FILE /u01/oracle/crea # Set the NM username and password in the properties file echo "username=$NM_USER" >> ${DOMAIN_HOME}/config/nodemanager/nm_password.properties echo "password=$NM_PASSWORD" >> ${DOMAIN_HOME}/config/nodemanager/nm_password.properties -mv /u01/oracle/helloWorld.html ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/htdocs/helloWorld.html +mv /u01/oracle/helloWorld.html ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/htdocs/helloWorld.html echo "Copying Configuration to OHS Instance" -cp -L /u01/oracle/config/moduleconf/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf -print0 -name '.*' | xargs rm -rf +cp -L /u01/oracle/config/moduleconf/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/moduleconf && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/moduleconf -print0 -name '.*' | xargs rm -rf conf=$(ls -l /u01/oracle/config/httpd/*.conf 2>/dev/null | wc -l) if [ $conf -gt 1 ] then - echo "Copying root .conf files $OHS_COMPONENT_NAME" - cp -L /u01/oracle/config/httpd/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME + echo "Copying root .conf files ${OHS_COMPONENT_NAME}" + cp -L /u01/oracle/config/httpd/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME} fi htdocs=$(ls -l /u01/oracle/config/htdocs/*.html 2>/dev/null | wc -l) if [ $htdocs -gt 1 ] then echo "Copying htdocs to OHS Instance" - cp -L /u01/oracle/config/htdocs/*.html ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/htdocs + cp -L /u01/oracle/config/htdocs/*.html ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/htdocs fi if [ "$DEPLOY_WG" = "true" ] then echo "Deploying Webgate" cd $ORACLE_HOME/webgate/ohs/tools/deployWebGate/ || exit - ./deployWebGateInstance.sh -w ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME -oh $ORACLE_HOME + ./deployWebGateInstance.sh -w ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME} -oh $ORACLE_HOME cd $ORACLE_HOME/webgate/ohs/tools/setup/InstallTools || exit export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib - ./EditHttpConf -w ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME -oh $ORACLE_HOME + ./EditHttpConf -w ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME} -oh $ORACLE_HOME echo "Adding OAP API exclusion to webgate.conf" - echo "" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/webgate.conf - echo " require all granted" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/webgate.conf - echo "" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/webgate.conf - cp -rL /u01/oracle/config/webgate ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/webgate -print0 -name '.*' | xargs rm -rf + echo "" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate.conf + echo " require all granted" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate.conf + echo "" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate.conf + cp -rL /u01/oracle/config/webgate ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME} && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate -print0 -name '.*' | xargs rm -rf else echo "Dont Deploy WG" fi diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/start-ohs.py b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/start-ohs.py index e68a43ceb1..c326989de4 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/start-ohs.py +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/start-ohs.py @@ -10,7 +10,7 @@ java_home = os.environ.get("JAVA_HOME", "/usr/java/default") ohs_comp_name = os.environ.get("OHS_COMPONENT_NAME", "ohs1") domain_name = os.environ.get("DOMAIN_NAME", "ohsDomain") -domain_path = os.environ.get("DOMAIN_HOME", "temp") +domain_path = os.environ.get("DOMAIN_HOME", "/u01/oracle/user_projects/domains/ohsDomain") oracle_home = os.environ.get("ORACLE_HOME", "/u01/oracle") ###################################################### try: diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/stop-ohs.py b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/stop-ohs.py index d63a7e6a74..80baeae37e 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/stop-ohs.py +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/stop-ohs.py @@ -9,7 +9,7 @@ java_home = os.environ.get("JAVA_HOME", "/usr/java/default") ohs_comp_name = os.environ.get("OHS_COMPONENT_NAME", "ohs1") domain_name = os.environ.get("DOMAIN_NAME", "ohsDomain") -domain_path = os.environ.get("DOMAIN_HOME", "temp") +domain_path = os.environ.get("DOMAIN_HOME", "/u01/oracle/user_projects/domains/ohsDomain") oracle_home = os.environ.get("ORACLE_HOME", "/u01/oracle") ###################################################### try: From ae8833f2d9513989f915935c8f285e16c08db278 Mon Sep 17 00:00:00 2001 From: mriccell Date: Tue, 13 Aug 2024 12:47:52 -0400 Subject: [PATCH 17/19] Add logic to verify that the WebGate configuration is provided --- .../dockerfiles/12.2.1.4.0/Dockerfile | 4 +- .../container-scripts/create-sa-ohs-domain.py | 5 ++ .../container-scripts/provisionOHS.sh | 50 ++++++++++++------- 3 files changed, 38 insertions(+), 21 deletions(-) diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile index 425cdea3f8..62018c714a 100644 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/Dockerfile @@ -50,7 +50,7 @@ ENV OHS_SSL_PORT=4443 ENV JAVA_HOME=/usr/java/default ENV DOMAIN_NAME=ohsDomain ENV OHS_COMPONENT_NAME=ohs1 -ENV PATH=${PATH}:/usr/java/default/bin:${ORACLE_HOME}/oracle_common/common/bin:${ORACLE_HOME}/user_projects/domains/ohsDomain/bin:${ORACLE_HOME} +ENV PATH=${PATH}:${ORACLE_HOME}:/usr/java/default/bin:${ORACLE_HOME}/oracle_common/common/bin:${ORACLE_HOME}/user_projects/domains/ohsDomain/bin ENV WLST_HOME=/u01/oracle/oracle_common/common/bin @@ -76,7 +76,7 @@ WORKDIR /u01 RUN unzip -q /u01/${OHS_PKG} && \ /u01/${OHS_BIN} -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc ORACLE_HOME=${ORACLE_HOME} && \ rm /u01/${OHS_BIN} /u01/oraInst.loc /u01/install.file && \ - mkdir /u01/oracle/logs && \ + mkdir -p /u01/oracle/logs && \ chown oracle:oracle -R /u01/oracle/logs # Copy required files to build this image diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py index c903b2fb88..06626598ff 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py @@ -18,6 +18,11 @@ ohs_comp_name = os.environ.get("OHS_COMPONENT_NAME", "ohs1") domain_name = os.environ.get("DOMAIN_NAME", "ohsDomain") domain_path = os.environ.get("DOMAIN_HOME", "/u01/oracle/user_projects/domains/ohsDomain") + +print('domain_name : [%s]' % domain_name); +print('domain_path : [%s]' % domain_path); +print('ohs_comp_name : [%s]' % ohs_comp_name); + # Select OHS standalone template # ============================================== setTopologyProfile('Compact') diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh index 230c0c2328..0f2163722a 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh @@ -30,7 +30,7 @@ function _kill() { trap _term SIGTERM # Set SIGKILL handler -#trap _kill SIGKILL +trap _kill SIGKILL echo "ORACLE_HOME=${ORACLE_HOME:?"Please set ORACLE_HOME"}" echo "DOMAIN_NAME=${DOMAIN_NAME:?"Please set DOMAIN_NAME"}" @@ -51,8 +51,8 @@ echo "DOMAIN_HOME=${DOMAIN_HOME}" NODEMGR_HOME=${DOMAIN_HOME}/nodemanager export NODEMGR_HOME -#echo "PATH=${PATH}" -PATH=$PATH:/usr/java/default/bin:${ORACLE_HOME}/oracle_common/common/bin + +PATH=$PATH:${ORACLE_HOME}:/usr/java/default/bin:${ORACLE_HOME}/oracle_common/common/bin export PATH echo "PATH=${PATH}" @@ -71,10 +71,6 @@ mkdir -p $ORACLE_HOME/bootdir PROPERTIES_FILE=/u01/oracle/bootdir/domain.properties export PROPERTIES_FILE -#Declare and initializing NMSTATUS -#declare -a NMSTATUS -#NMSTATUS[0]="NOT RUNNING" - if [ ! -e "$PROPERTIES_FILE" ]; then echo "A properties file with the username and password needs to be supplied." exit @@ -98,8 +94,6 @@ if [ -z "$NM_PASSWORD" ]; then echo "The Node Manager password is blank. It must be set in the properties file." exit fi -#echo "NM_USERNAME=" ${NM_USER} -#echo "NM_PASSWORD=" ${NM_PASSWORD} wlst.sh -skipWLSModuleScanning -loadProperties $PROPERTIES_FILE /u01/oracle/create-sa-ohs-domain.py # Set the NM username and password in the properties file @@ -108,25 +102,43 @@ echo "password=$NM_PASSWORD" >> ${DOMAIN_HOME}/config/nodemanager/nm_password.pr mv /u01/oracle/helloWorld.html ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/htdocs/helloWorld.html echo "Copying Configuration to OHS Instance" -cp -L /u01/oracle/config/moduleconf/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/moduleconf && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/moduleconf -print0 -name '.*' | xargs rm -rf +conf=$(ls -l /u01/oracle/config/moduleconf/*.conf 2>/dev/null | wc -l) +if [ $conf -gt 1 ] +then + echo " Copying moduleconf conf files to OHS Instance" + cp -L /u01/oracle/config/moduleconf/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf -name '.*' | xargs rm -rf +fi conf=$(ls -l /u01/oracle/config/httpd/*.conf 2>/dev/null | wc -l) -if [ $conf -gt 1 ] +if [ $conf -gt 0 ] +then + echo " Copying root .conf files $OHS_COMPONENT_NAME" + cp -L /u01/oracle/config/httpd/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME +fi + +conf=$(ls -l /u01/oracle/config/wallet/* 2>/dev/null | wc -l) +if [ $conf -gt 0 ] then - echo "Copying root .conf files ${OHS_COMPONENT_NAME}" - cp -L /u01/oracle/config/httpd/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME} + echo " Copying OHS Wallets to OHS Instance" + mkdir -p ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/keystores > /dev/null 2>&1 + cp -L /u01/oracle/config/wallet/* ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/keystores/ fi htdocs=$(ls -l /u01/oracle/config/htdocs/*.html 2>/dev/null | wc -l) -if [ $htdocs -gt 1 ] +if [ $htdocs -gt 0 ] then echo "Copying htdocs to OHS Instance" - cp -L /u01/oracle/config/htdocs/*.html ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/htdocs + cp -L /u01/oracle/config/htdocs/*.html ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/htdocs fi if [ "$DEPLOY_WG" = "true" ] then echo "Deploying Webgate" + if ! [ -e /u01/oracle/config/webgate/config/ObAccessClient.xml ] + then + echo "Must provide WebGate Configutaion files when DEPLOY_WG is true." + exit 1 + fi cd $ORACLE_HOME/webgate/ohs/tools/deployWebGate/ || exit ./deployWebGateInstance.sh -w ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME} -oh $ORACLE_HOME cd $ORACLE_HOME/webgate/ohs/tools/setup/InstallTools || exit @@ -136,9 +148,9 @@ then echo "" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate.conf echo " require all granted" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate.conf echo "" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate.conf - cp -rL /u01/oracle/config/webgate ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME} && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate -print0 -name '.*' | xargs rm -rf + cp -rL /u01/oracle/config/webgate ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME} && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate -name '.*' | xargs rm -rf else - echo "Dont Deploy WG" + echo "WebGate not deployed" fi fi @@ -172,14 +184,14 @@ rm "${statusfile}" #Check if configureWLSProxyPlugin.sh needs to be invoked if [ -f /config/custom_mod_wl_ohs.conf ]; then -configureWLSProxyPlugin.sh + configureWLSProxyPlugin.sh fi #Start OHS component only if Node Manager is up if [ -f ${LOG_DIR}/Nodemanage$$.status ]; then echo "Node manager running, hence starting OHS server" ${WLST_HOME}/wlst.sh -loadProperties $PROPERTIES_FILE /u01/oracle/start-ohs.py -echo "OHS server has been started " +echo "OHS server has been started" fi #Tail all server logs From adf3ef82b3f75467777acd150af9eb05c08837e2 Mon Sep 17 00:00:00 2001 From: mriccell Date: Tue, 13 Aug 2024 12:59:57 -0400 Subject: [PATCH 18/19] Correcting Lint errors --- .../12.2.1.4.0/container-scripts/provisionOHS.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh index 0f2163722a..6845734c9c 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh @@ -30,7 +30,7 @@ function _kill() { trap _term SIGTERM # Set SIGKILL handler -trap _kill SIGKILL +#trap _kill SIGKILL echo "ORACLE_HOME=${ORACLE_HOME:?"Please set ORACLE_HOME"}" echo "DOMAIN_NAME=${DOMAIN_NAME:?"Please set DOMAIN_NAME"}" @@ -106,13 +106,13 @@ conf=$(ls -l /u01/oracle/config/moduleconf/*.conf 2>/dev/null | wc -l) if [ $conf -gt 1 ] then echo " Copying moduleconf conf files to OHS Instance" - cp -L /u01/oracle/config/moduleconf/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf -name '.*' | xargs rm -rf + cp -L /u01/oracle/config/moduleconf/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf -print0 -name '.*' | xargs rm -rf fi conf=$(ls -l /u01/oracle/config/httpd/*.conf 2>/dev/null | wc -l) if [ $conf -gt 0 ] then - echo " Copying root .conf files $OHS_COMPONENT_NAME" + echo " Copying root conf files OHS Instance" cp -L /u01/oracle/config/httpd/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME fi @@ -148,7 +148,7 @@ then echo "" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate.conf echo " require all granted" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate.conf echo "" >> ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate.conf - cp -rL /u01/oracle/config/webgate ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME} && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate -name '.*' | xargs rm -rf + cp -rL /u01/oracle/config/webgate ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME} && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}/webgate -print0 -name '.*' | xargs rm -rf else echo "WebGate not deployed" fi From 8824038a5ed5b5fab3b6cb3a5911c0e585f068e2 Mon Sep 17 00:00:00 2001 From: mriccell Date: Wed, 14 Aug 2024 09:34:19 -0400 Subject: [PATCH 19/19] Correct gt 1 --- .../dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh index 6845734c9c..72872ac2af 100755 --- a/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh +++ b/OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/provisionOHS.sh @@ -103,7 +103,7 @@ mv /u01/oracle/helloWorld.html ${DOMAIN_HOME}/config/fmwconfig/components/OHS/${ echo "Copying Configuration to OHS Instance" conf=$(ls -l /u01/oracle/config/moduleconf/*.conf 2>/dev/null | wc -l) -if [ $conf -gt 1 ] +if [ $conf -gt 0 ] then echo " Copying moduleconf conf files to OHS Instance" cp -L /u01/oracle/config/moduleconf/*.conf ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf && find ${DOMAIN_HOME}/config/fmwconfig/components/OHS/$OHS_COMPONENT_NAME/moduleconf -print0 -name '.*' | xargs rm -rf