Skip to content

Commit a546383

Browse files
authored
Adding OHS 12.2.1.4 dockerfiles and removing 12.2.1.3 which is no lon… (#2796)
* Adding OHS 12.2.1.4 dockerfiles and removing 12.2.1.3 which is no longer supported * Fix copyright statements, new version of the provisioning script * replace the word Docker for Containers * delete 12213 samples and replace the references of Docker for containers or images * Correct lint errors * Correct Lint Errors * fix more LINT errors * Lint warnings * correct Lint warnings * fix Lint warning * Changes to the scripts to address comments * Changes to scripts * fix ORACLE_HOME and WLST_HOME * change location where container-scripts are copied to * replace container-scripts directories for /u01/oracle * default domain home * Add logic to verify that the WebGate configuration is provided * Correcting Lint errors * Correct gt 1
1 parent a71acdf commit a546383

33 files changed

+254
-757
lines changed

OracleHTTPServer/COPYRIGHT

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
Copyright (c) 2001, 2019, Oracle Corporation. All rights reserved.
1+
Copyright (c) 2020, 2024, Oracle and/or its affiliates.
2+
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
23

34
Permission is hereby granted, free of charge, to any person obtaining
45
a copy of this software and associated documentation files (the

OracleHTTPServer/README.md

Lines changed: 26 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
Oracle HTTP Server on Docker
2-
===============
1+
# Oracle HTTP Server in containers
2+
===================================
33
This project includes quick start dockerfiles and samples for standalone Oracle HTTP Server based on Oracle Linux and Oracle JDK 8 (Server).
4-
The certification of OHS on Docker does not require the use of any file presented in this repository.
4+
The certification of OHS in containers does not require the use of any file presented in this repository.
55
Customers and users are welcome to use them as starters, and customize/tweak, or create from scratch new scripts and Dockerfiles.
66

77
## How to Build and Run
@@ -12,67 +12,60 @@ The **buildDockerImage.sh** script is just a utility shell script that performs
1212
### Building Oracle JDK (Server JRE) base image
1313
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.
1414

15-
$ cd ../OracleJava/java-8
16-
$ sh build.sh
17-
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).
15+
"$ cd ../OracleJava/java-8"
16+
"$ sh build.sh"
1817

19-
### Building OHS Docker Image
18+
You can also pull the Oracle Server JRE 8 image from [Oracle Container Registry](https://container-registry.oracle.com).
19+
20+
### Building OHS Container Image
2021
IMPORTANT: You have to download the OHS binary and put it in place (see .download files inside dockerfiles/).
2122

22-
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.
23+
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.
2324

24-
$ sh buildDockerImage.sh -v 12.2.1.3.0
25+
"$ sh buildDockerImage.sh -v 12.2.1.4.0"
2526

26-
IMPORTANT: The resulting image will have a pre-configured domain.
27+
IMPORTANT: The resulting image will have a pre-configured domain.
2728

2829
### Providing the Node Manager password
29-
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.
30+
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.
3031

3132
The format of the domain.properties file is key=value pair:
3233
username=mynodemanagerusername
3334
password=mynodemanagerpassword
3435

3536
### How to run container
36-
37-
38-
3937
If you want to start the OHS container without specifying any configuration for mod_weblogic:
40-
1. To start the OHS container with oracle/ohs:12.2.1.3.0 image, run the following command:
41-
42-
43-
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
38+
1. To start the OHS container with oracle/ohs:12.2.1.4.0 image, run the following command:
4439

40+
"$ 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"
4541

4642
If you want to start the OHS container with some pre-specified mod_weblogic configuration:
47-
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)
43+
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)
4844

4945
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".
50-
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.
51-
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:
46+
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.
47+
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:
5248

53-
$ 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
49+
"$ 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"
5450

5551
### Stopping the OHS instance
5652
To stop the OHS instance, execute the following command:
5753

58-
docker stop ohs (Assuming the name of conatiner is 'ohs')
59-
54+
"$ docker stop <Container name>"
6055

61-
To look at the Docker Container logs run:
62-
63-
$ docker logs --details <Container-id>
56+
To look at the Container logs run:
6457

58+
"$ docker logs --details <Container-id>"
6559

6660
## Support
67-
Oracle HTTP Server on Docker is supported by Oracle.
68-
61+
Oracle HTTP Server in containers is supported by Oracle.
6962

7063
## License
71-
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.
64+
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.
7265

73-
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.
66+
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.
7467

75-
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.
68+
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.
7669

7770
## Copyright
78-
Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
71+
Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.

OracleHTTPServer/dockerfiles/12.2.1.3.0/fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip.download

Lines changed: 0 additions & 12 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,64 @@
11
#
2-
# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
33

44

55
#
66
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
77
#
88
# ORACLE HTTP Server DOCKERFILES PROJECT
99
# -----------------------------------------
10-
# This is the DockerFile for Oracle HTTP Server 12.2.1.3.0
10+
# This is the DockerFile for Oracle HTTP Server 12.2.1.4.0
1111
#
1212
# IMPORTANT
1313
# -------------------------------------------
14-
# The resulting image of this Dockerfile would have Oracle Linux 7 and Oracle HTTP Server 12.2.1.3.0 installed in standalone mode.
14+
# The resulting image of this Dockerfile would have Oracle Linux 7 and Oracle HTTP Server 12.2.1.4.0 installed in standalone mode.
1515

1616
# A standalone domain will be configured in this image
1717
#
1818
# REQUIRED FILES TO BUILD THIS IMAGE
1919
# ----------------------------------
20-
# (1) fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip
20+
# (1) fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip
2121
# Download from http://www.oracle.com/technetwork/middleware/webtier/downloads/index-jsp-156711.html
2222
#
2323
# HOW TO BUILD THIS IMAGE
2424
# -----------------------
2525
# Put all downloaded files in the same directory as this Dockerfile
2626
# As root user run following command manually:
2727
#
28-
# $ sh buildDockerImage.sh -v 12.2.1.3.0
28+
# $ sh buildDockerImage.sh -v 12.2.1.4.0
2929
#
3030
# Alternatively you can also run
3131
#
3232
# $ docker build --force-rm=true --no-cache=true --rm=true -t oracle/$IMAGE_NAME:$VERSION-$INSTALL_TYPE .
3333
#
3434
# For example
3535
#
36-
# $ docker build --force-rm=true --no-cache=true --rm=true -t oracle/ohs:12.2.1.3.0 .
36+
# $ docker build --force-rm=true --no-cache=true --rm=true -t oracle/ohs:12.2.1.4.0 .
3737
#
3838
# Pull serverjre:8 base image
3939
# -----------------------------------
4040
FROM oracle/serverjre:8
4141

42-
# Maintainer
43-
# ------------------------------------
44-
MAINTAINER Prabhat Kishore <[email protected]>
45-
4642
# Environment variables required for this build (do NOT change)
4743
# ----------------------------------------------
48-
ENV OHS_PKG=fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip \
49-
OHS_BIN=fmw_12.2.1.3.0_ohs_linux64.bin \
50-
ORACLE_HOME=/u01/oracle/ohssa \
51-
PATH=$PATH:/usr/java/default/bin:/u01/oracle/ohssa/oracle_common/common/bin \
52-
NM_PORT=5556 \
53-
OHS_LISTEN_PORT=7777 \
54-
OHS_SSL_PORT=4443 \
55-
JAVA_HOME=/usr/java/default \
56-
MW_HOME=/u01/oracle/ohssa \
57-
DOMAIN_NAME=ohsDomain \
58-
OHS_COMPONENT_NAME=ohs1 \
59-
PATH=$PATH:$ORACLE_HOME/oracle_common/common/bin:$ORACLE_HOME/user_projects/domains/ohsDomain/bin:/u01/oracle/container-scripts \
60-
WLST_HOME=/u01/oracle/ohssa/oracle_common/common/bin
44+
ENV OHS_PKG=fmw_12.2.1.4.0_ohs_linux64_Disk1_1of1.zip
45+
ENV OHS_BIN=fmw_12.2.1.4.0_ohs_linux64.bin
46+
ENV ORACLE_HOME=/u01/oracle
47+
ENV NM_PORT=5556
48+
ENV OHS_LISTEN_PORT=7777
49+
ENV OHS_SSL_PORT=4443
50+
ENV JAVA_HOME=/usr/java/default
51+
ENV DOMAIN_NAME=ohsDomain
52+
ENV OHS_COMPONENT_NAME=ohs1
53+
ENV PATH=${PATH}:${ORACLE_HOME}:/usr/java/default/bin:${ORACLE_HOME}/oracle_common/common/bin:${ORACLE_HOME}/user_projects/domains/ohsDomain/bin
54+
ENV WLST_HOME=/u01/oracle/oracle_common/common/bin
6155

6256

6357
# Copy packages to the new drive
6458
# -------------------------------------------------------
65-
COPY $OHS_PKG install.file oraInst.loc /u01/
59+
COPY ${OHS_PKG} install.file oraInst.loc /u01/
6660

67-
# Install OL7 required packages. Refer FMW 12.2.1.3 System requirements guide for complete list of packages
61+
# Install OL7 required packages. Refer FMW 12.2.1.4 System requirements guide for complete list of packages
6862
# Setup filesystem and oracle user
6963
#---------------------------------------------------------------------------------------------------------
7064
RUN yum install -y unzip libaio sysstat make psmisc gcc && \
@@ -77,20 +71,24 @@ RUN yum install -y unzip libaio sysstat make psmisc gcc && \
7771
# Go to /u01 as user 'oracle' to proceed with OHS installation
7872
#--------------------------------------------------------
7973
USER oracle
80-
RUN cd /u01 && unzip -q /u01/$OHS_PKG && cd - && \
81-
/u01/$OHS_BIN -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc ORACLE_HOME=$ORACLE_HOME && \
82-
rm /u01/$OHS_BIN /u01/oraInst.loc /u01/install.file && \
83-
mkdir /u01/oracle/container-scripts/ /u01/oracle/logs
74+
WORKDIR /u01
75+
#RUN unzip -q /u01/${OHS_PKG} && cd - && \
76+
RUN unzip -q /u01/${OHS_PKG} && \
77+
/u01/${OHS_BIN} -silent -responseFile /u01/install.file -invPtrLoc /u01/oraInst.loc ORACLE_HOME=${ORACLE_HOME} && \
78+
rm /u01/${OHS_BIN} /u01/oraInst.loc /u01/install.file && \
79+
mkdir -p /u01/oracle/logs && \
80+
chown oracle:oracle -R /u01/oracle/logs
8481

8582
# Copy required files to build this image
8683
# ------------------------------------------------------
87-
COPY container-scripts/* /u01/oracle/container-scripts/
84+
COPY container-scripts/* /u01/oracle/
8885

8986
#Expose all Ports
90-
EXPOSE $OHS_SSL_PORT $OHS_LISTEN_PORT $NM_PORT
87+
EXPOSE ${OHS_SSL_PORT} ${OHS_LISTEN_PORT} ${NM_PORT}
9188

9289
# Final setup
93-
WORKDIR /u01/oracle/container-scripts
90+
USER oracle
91+
WORKDIR ${ORACLE_HOME}
9492

9593
# Provision OHS instance
96-
CMD ["/u01/oracle/container-scripts/provisionOHS.sh"]
94+
CMD ["/u01/oracle/provisionOHS.sh"]

OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/configureWLSProxyPlugin.sh renamed to OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/configureWLSProxyPlugin.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
33
#
4-
# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved.
4+
# Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
55
#
66
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
77
#
@@ -25,11 +25,11 @@
2525
#DOMAIN_NAME - Env Value set by Dockerfile , default is "ohsDOmain"
2626
#OHS_COMPONENT_NAME - Env Value set by Dockerfile , default is "ohs1"
2727
#*************************************************************************
28-
echo "MW_HOME=${MW_HOME:?"Please set MW_HOME"}"
28+
echo "ORACLE_HOME=${ORACLE_HOME:?"Please set MW_HOME"}"
2929
echo "DOMAIN_NAME=${DOMAIN_NAME:?"Please set DOMAIN_NAME"}"
3030
echo "OHS_COMPONENT_NAME=${OHS_COMPONENT_NAME:?"Please set OHS_COMPONENT_NAME"}"
3131

32-
DOMAIN_HOME=${MW_HOME}/user_projects/domains/${DOMAIN_NAME}
32+
DOMAIN_HOME=${ORACLE_HOME}/user_projects/domains/${DOMAIN_NAME}
3333
INSTANCE_CONFIG_HOME=$DOMAIN_HOME/config/fmwconfig/components/OHS/${OHS_COMPONENT_NAME}
3434
export INSTANCE_CONFIG_HOME
3535
echo "INSTANCE_CONFIG_DIR=${INSTANCE_CONFIG_HOME}"
@@ -41,7 +41,7 @@ echo "MODWLSCONFIGFILE IS ${modwlsconfigfile}"
4141

4242
# Check and copy custom_mod_wl_ohs.conf to OHS Instance Home
4343
if [[ -n "${modwlsconfigfile/[ ]*\n/}" ]]; then
44-
cd ${INSTANCE_CONFIG_HOME}
44+
cd ${INSTANCE_CONFIG_HOME} || exit
4545
mv mod_wl_ohs.conf mod_wl_ohs.conf.ORIGINAL
4646
echo "Copying ${modwlsconfigfile} to ${INSTANCE_CONFIG_HOME} "
4747
cp ${modwlsconfigfile} ${INSTANCE_CONFIG_HOME}/mod_wl_ohs.conf

OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/create-sa-ohs-domain.py renamed to OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/create-sa-ohs-domain.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/python
22
#
3-
# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved.
3+
# Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
44
#
55
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
66
#
@@ -17,7 +17,12 @@
1717
ohs_ssl_port = (os.environ.get("OHS_SSL_PORT", "3333"))
1818
ohs_comp_name = os.environ.get("OHS_COMPONENT_NAME", "ohs1")
1919
domain_name = os.environ.get("DOMAIN_NAME", "ohsDomain")
20-
domain_path = '/u01/oracle/ohssa/user_projects/domains/' + domain_name
20+
domain_path = os.environ.get("DOMAIN_HOME", "/u01/oracle/user_projects/domains/ohsDomain")
21+
22+
print('domain_name : [%s]' % domain_name);
23+
print('domain_path : [%s]' % domain_path);
24+
print('ohs_comp_name : [%s]' % ohs_comp_name);
25+
2126
# Select OHS standalone template
2227
# ==============================================
2328
setTopologyProfile('Compact')
@@ -47,7 +52,7 @@
4752
setOption('OverwriteDomain', 'true')
4853
#Write Domain, close template and exit
4954
# ======================================================================
50-
#writeDomain(r'/u01/oracle/ohssa/user_projects/domains/ohsDomain')
55+
#writeDomain(r'/u01/oracle/user_projects/domains/ohsDomain')
5156
writeDomain(domain_path)
5257
dumpStack()
5358
closeTemplate()

OracleHTTPServer/dockerfiles/12.2.1.3.0/container-scripts/mod_wl_ohs.conf.sample renamed to OracleHTTPServer/dockerfiles/12.2.1.4.0/container-scripts/mod_wl_ohs.conf.sample

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2016-2019 Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2024 Oracle and/or its affiliates. All rights reserved.
22
#
33
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
44
#
@@ -8,9 +8,9 @@
88
#
99
#
1010
#Refer to OHS documentation for more details and examples
11-
#Section 2.4 @ http://docs.oracle.com/middleware/12213/webtier/develop-plugin/oracle.htm#PLGWL553
11+
#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
1212
#*************************************************************************
13-
LoadModule weblogic_module "/u01/oracle/ohssa/ohs/modules/mod_wl_ohs.so"
13+
LoadModule weblogic_module "/u01/oracle/ohs/modules/mod_wl_ohs.so"
1414

1515
<IfModule mod_weblogic.c>
1616
WebLogicHost WEBLOGIC_HOST

0 commit comments

Comments
 (0)