Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding OHS 12.2.1.4 dockerfiles and removing 12.2.1.3 which is no lon… #2796

Merged
merged 20 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OracleHTTPServer/COPYRIGHT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2001, 2019, Oracle Corporation. All rights reserved.
Copyright (c) 2001, 2024, Oracle Corporation. All rights reserved.
mriccell marked this conversation as resolved.
Show resolved Hide resolved

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
16 changes: 8 additions & 8 deletions OracleHTTPServer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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:
Expand All @@ -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.
mriccell marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
#
# 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.
#
# 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
# -----------------------
# 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
#
# $ docker build --force-rm=true --no-cache=true --rm=true -t oracle/$IMAGE_NAME:$VERSION-$INSTALL_TYPE .
#
# 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
# -----------------------------------
Expand All @@ -45,8 +45,8 @@ MAINTAINER Prabhat Kishore <[email protected]>

# 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 \
Expand All @@ -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 && \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# Author: [email protected]
#
# 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.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
#
Expand All @@ -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')
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
#
Expand All @@ -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"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# Author: [email protected]
# 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.
#
Expand All @@ -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
mriccell marked this conversation as resolved.
Show resolved Hide resolved
${DOMAIN_HOME}/bin/stopNodeManager.sh
}

Expand All @@ -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}
mriccell marked this conversation as resolved.
Show resolved Hide resolved
export DOMAIN_HOME
echo "DOMAIN_HOME=${DOMAIN_HOME}"

Expand All @@ -58,13 +58,18 @@ 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

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

Expand Down Expand Up @@ -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
Expand All @@ -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}
}
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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: [email protected]
# 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")
mriccell marked this conversation as resolved.
Show resolved Hide resolved
oracle_home = os.environ.get("ORACLE_HOME", "/u01/oracle/ohssa")
######################################################
try:
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
#
Expand All @@ -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")
mriccell marked this conversation as resolved.
Show resolved Hide resolved
oracle_home = os.environ.get("ORACLE_HOME", "/u01/oracle/ohssa")
######################################################
try:
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
#
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
username=username
password=passwd
6 changes: 3 additions & 3 deletions OracleHTTPServer/dockerfiles/buildDockerImage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand All @@ -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
Expand Down
Loading