-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Add 12213 Docker image sample for Apache with WebLogic 12.2.1.3.0 Proxy Plugin #849
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
Add 12213 Docker image sample for Apache with WebLogic 12.2.1.3.0 Proxy Plugin #849
Conversation
Signed-off-by: Dongbo Xiao <dongbo.xiao@oracle.com>
Signed-off-by: Dongbo Xiao <dongbo.xiao@oracle.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have completed my initial review. Please see comments.
# | ||
# REQUIRED FILES TO BUILD THIS IMAGE | ||
# ---------------------------------- | ||
# fmw_12.2.1.3.0_wls_Disk1_1of1.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The requirement is the Webtier installer fmw_12.2.1.3.0_wlsplugins_Disk1_1of1.zip
# REQUIRED FILES TO BUILD THIS IMAGE | ||
# ---------------------------------- | ||
# 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 and save it in this same folder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The URL for webtier download is http://www.oracle.com/technetwork/middleware/webtier/downloads/index-jsp-156711.html
@@ -0,0 +1,43 @@ | |||
Example of Apache Web Server with WebLogic 12.2.1.3.0 Plugin | |||
===== | |||
This sample shows how to run a load balancer for a WebLogic cluster, from inside a container in the same network as the WLS Cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WLS -> WebLogic Server
This sample shows how to run a load balancer for a WebLogic cluster, from inside a container in the same network as the WLS Cluster. | ||
|
||
# How to build image | ||
Download file **Oracle WebLogic Server Proxy Plugins 12.2.1** [fmw_12.2.1.3.0_wlsplugins_Disk1_1of1.zip](http://www.oracle.com/technetwork/middleware/webtier/downloads/index-jsp-156711.html) (see .download file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oracle WebLogic Server Proxy Plugins 12.2.1.3
|
||
$ sh build.sh | ||
|
||
Oracle developers can use build_internal.sh, which set up HTTP/HTTPS proxies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you need to set up HTTP/HTTPS proxies, build the image using script build_internal.sh
## Example | ||
Start an AdminServer from the **12213-domain** sample by calling: | ||
|
||
$ docker run -d --name wlsadmin -h wlsadmin 12213-domain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Start a container from the WebLogic install image. You can override the default values of the following parameters during runtime with the -e option:
ADMIN_NAME (default: AdminServer)
ADMIN_PORT (default: 7001)
ADMIN_USERNAME (default: weblogic)
ADMIN_PASSWORD (default: Auto Generated)
DOMAIN_NAME (default: base_domain)
DOMAIN_HOME (default: /u01/oracle/user_projects/domains/base_domain)
NOTE To set the DOMAIN_NAME, you must set both DOMAIN_NAME and DOMAIN_HOME.
$ docker run -d -e ADMIN_USERNAME=weblogic -e ADMIN_PASSWORD=welcome1 -e DOMAIN_HOME=/u01/oracle/user_projects/domains/abc_domain -e DOMAIN_NAME=abc_domain store/oracle/weblogic:12.2.1.3
|
||
The values of **WEBLOGIC_CLUSTER** must be valid, existing containers running WebLogic servers. | ||
|
||
## Example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First make sure you have the WebLogic Server 12.2.1.3 install image, pull the WebLogic install image from the DockerStore store/oracle/weblogic:12.2.1.3, or build your own image oracle/weblogic:12.2.1.3-developer at [https://github.com/oracle/docker-images/tree/master/OracleWebLogic/dockerfiles/12.2.1.3].
Signed-off-by: Dongbo Xiao <dongbo.xiao@oracle.com>
Signed-off-by: Dongbo Xiao <dongbo.xiao@oracle.com>
We cannot merge this as it is based on I'm not going to close this pull request, but you need to update it to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Dockerfile has no ENTRYPOINT
or CMD
directive, so the image will do nothing when it starts. It'll just exit.
Once you've updated the image to actually use Oracle Linux 7, please also update the Dockerfile so that when you start a container it actually runs httpd
.
# | ||
# Note if needed, pull the latest httpd image and tag it as: httpd:2.4 | ||
# | ||
FROM httpd:2.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has to be changed to FROM oraclelinux:7-slim
. You can then run yum -y install httpd
inside the container to install Apache HTTPd 2.4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This image inherits the base image's CMD directive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course, we'll have a CMD if we change to use oraclelinux:7-slim as the base. I'll make the change. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avi
The image we are trying to create is the WebLogic Server Apache HTTP Server Proxy Plugin, we need to extend the Apache HTTP Server Project since we need the scripts and functionality already included in the image. When we do a yum -y install httpd inside the container to install Apache HTTPd 2.4 we do not have the same directory or code. What is the reason we need to base this on OL slim?
$ sh build_internal.sh | ||
|
||
# How to run container | ||
Run this image by calling: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run the Apache image by calling:
|
||
$ docker run -d -e WEBLOGIC_CLUSTER=host1:port,host2:port,host3:port --net=<some net> -p 80:80 12213-apache | ||
|
||
The values of **WEBLOGIC_CLUSTER** must be valid, existing containers running WebLogic servers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How to configure for sample 2 where you have a group of single domain (Admin server containers)?
First make sure you have the WebLogic Server 12.2.1.3 install image, pull the WebLogic install image from the DockerStore store/oracle/weblogic:12.2.1.3, or build your own image oracle/weblogic:12.2.1.3-developer at [https://github.com/oracle/docker-images/tree/master/OracleWebLogic/dockerfiles/12.2.1.3]. | ||
|
||
|
||
## Example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Admin Server Containers Use Case
|
||
Now you can access the WebLogic Admin Console under **http://localhost/console** (default to port 80) instead of using port 7001. | ||
|
||
If you are using multihost network, remove --link and set "--net=<your net>". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this sentence does not apply to Admin Server containers
|
||
If you are using multihost network, remove --link and set "--net=<your net>". | ||
|
||
## Advanced Use Cases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WebLogic Domain/Cluster Use Case
If you are using multihost network, remove --link and set "--net=<your net>". | ||
|
||
## Advanced Use Cases | ||
The Docker image supplies a simple Oracle WebLogic iServer Proxy Plugin configuraiton for Apache. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo iServer, typo configuraiton
|
||
If you want to start the Apache container with some pre-specified mod_weblogic configuration: | ||
|
||
* Depending on your weblogic environment , create a custom_mod_wl_apache.conf file by referring to custom_mod_wl_apache.conf.sample and Chapter 3 @ Fusion Middleware Using Oracle WebLogic Server Proxy Plug-Ins documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add link to documentation [https://docs.oracle.com/middleware/12213/webtier/develop-plugin/apache.htm#GUID-231FB5FD-8D0A-492A-BBFD-DC12A31BF2DE]
|
||
* Depending on your weblogic environment , create a custom_mod_wl_apache.conf file by referring to custom_mod_wl_apache.conf.sample and Chapter 3 @ Fusion Middleware Using Oracle WebLogic Server Proxy Plug-Ins documentation. | ||
|
||
* Place the custom_mod_wl_apache.conf file in a directory in the host, (for example, "/scratch/DockerVolume/ApacheVolume"), and then mount this directory into the container at the location "/config". By doing so, the contents of host directory /scratch/DockerVolume/ApacheVolume(and hence custom_mod_wl_apache.conf) will become available in the container at the mount point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this directory require special permissions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The process inside container will only read the file, and will not update it.
This mounting can be done by using the -v option with the 'docker run' command as shown below. | ||
|
||
$ docker run -v /scratch/DockerVolume/ApacheVolume:/config -w /config -d -e WEBLOGIC_HOST=<admin-host> -e WEBLOGIC_PORT=7001 -p 80:80 12213-apache | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Start a WebLogic domain/cluster by following the RADME in sample/12213-domain, [https://github.com/oracle/docker-images/tree/master/OracleWebLogic/samples/12213-domain].
@@ -0,0 +1,66 @@ | |||
Example of Apache Web Server with WebLogic 12.2.1.3.0 Plugin | |||
===== | |||
This sample shows how to run a load balancer for a WebLogic cluster, from inside a container in the same network as the WebLogic Server cluster. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sample provides 2 use cases: 1) Load balance requests to a group of single server domain (Admin server containers). 2) Load balance requests to managed servers in a WebLogic cluster, where each managed server is running inside a docker container.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review all your Markdown formatting as well. There are lots of instances where there are missing back ticks around paths and filenames, for example.
Also, make sure there are no spaces before punctuation like commas and periods.
# | ||
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. | ||
# | ||
docker build --build-arg http_proxy=http://www-proxy.us.oracle.com:80 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entire file needs to be removed. You cannot expose internal Oracle hosts publicly.
|
||
If you need to set up HTTP/HTTPS proxies, build the image using script build_internal.sh. | ||
|
||
$ sh build_internal.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file MUST be removed. You cannot expose internal Oracle hosts publicly. You must change the build.sh
to expose any proxies set in the host shell to build.
This is used in all the buildDockerImage.sh
scripts in this repo:
# Proxy settings
PROXY_SETTINGS=""
if [ "${http_proxy}" != "" ]; then
PROXY_SETTINGS="$PROXY_SETTINGS --build-arg http_proxy=${http_proxy}"
fi
if [ "${https_proxy}" != "" ]; then
PROXY_SETTINGS="$PROXY_SETTINGS --build-arg https_proxy=${https_proxy}"
fi
if [ "${ftp_proxy}" != "" ]; then
PROXY_SETTINGS="$PROXY_SETTINGS --build-arg ftp_proxy=${ftp_proxy}"
fi
if [ "${no_proxy}" != "" ]; then
PROXY_SETTINGS="$PROXY_SETTINGS --build-arg no_proxy=${no_proxy}"
fi
if [ "$PROXY_SETTINGS" != "" ]; then
echo "Proxy settings were found and will be used during the build."
fi
|
||
or | ||
|
||
$ sh build.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be renamed to buildDockerImage.sh
for repo consistency.
# | ||
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. | ||
# | ||
docker build -t 12213-apache . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not acceptable as a script. Please review the buildDockerImage.sh
scripts used in the repo to provide more flexibility when building this image.
|
||
* Depending on your weblogic environment , create a custom_mod_wl_apache.conf file by referring to custom_mod_wl_apache.conf.sample and Chapter 3 @ Fusion Middleware Using Oracle WebLogic Server Proxy Plug-Ins documentation. | ||
|
||
* Place the custom_mod_wl_apache.conf file in a directory in the host, (for example, "/scratch/DockerVolume/ApacheVolume"), and then mount this directory into the container at the location "/config". By doing so, the contents of host directory /scratch/DockerVolume/ApacheVolume(and hence custom_mod_wl_apache.conf) will become available in the container at the mount point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should not map the volume. Rather, map the file directly, i.e. -v /scratch/custom_mod_wl_apache.conf:/config/custom_mod_wl_apache.conf
in the docker run
command.
|
||
* Depending on your weblogic environment , create a custom_mod_wl_apache.conf file by referring to custom_mod_wl_apache.conf.sample and Chapter 3 @ Fusion Middleware Using Oracle WebLogic Server Proxy Plug-Ins documentation. | ||
|
||
* Place the custom_mod_wl_apache.conf file in a directory in the host, (for example, "/scratch/DockerVolume/ApacheVolume"), and then mount this directory into the container at the location "/config". By doing so, the contents of host directory /scratch/DockerVolume/ApacheVolume(and hence custom_mod_wl_apache.conf) will become available in the container at the mount point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, you should back ticks around all paths and filenames to format them in a fixed-width font, i.e. custom_mod_wl_apache.conf
and /scratch/DockerVolume/ApacheVolume
.
Avi The image we are trying to create is the WebLogic Server Apache HTTP Server Proxy Plugin, we need to extend the Apache HTTP Server Project since we need the scripts and functionality already included in the image. When we do a yum -y install httpd inside the container to install Apache HTTPd 2.4 we do not have the same directory or code. What is the reason we need to base this on OL slim? |
@mriccell we cannot merge any images that do not extend an Oracle Linux base image. This is golden rule 1 in the contribution guide: https://github.com/oracle/docker-images/blob/master/CONTRIBUTING.md (Yes, we have Windows-based Java images. Those are the only exceptions to rule 1). |
1) use oraclelinux:7-slim as the base 2) repalce build.sh and build_internal.sh with buildDockerImage.sh 3) updated README.md Signed-off-by: Dongbo Xiao <dongbo.xiao@oracle.com>
Signed-off-by: Dongbo Xiao <dongbo.xiao@oracle.com>
Signed-off-by: Dongbo Xiao <dongbo.xiao@oracle.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a few review comments
COPY custom_mod_wl_apache.conf.sample /config/custom_mod_wl_apache.conf | ||
COPY container-scripts/* /u01/oracle/container-scripts/ | ||
|
||
RUN yum install -y unzip && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You do not need to install a unzip just do $JAVA_HOME/bin/jar xf /u01/$FMW_PKG
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if oraclelinux:7-slim contains a JDK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think oraclelinux:7-slim contains a JDK. But need confirmation from Avi.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense then you can do a yum remove after you unzip
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing a yum remove or erase does not make much difference in the image size
|
||
Run an Apache container to access an admin server that is running on <host> and listening to <port>. | ||
|
||
$ docker run -d -e WEBLOGIC_HOST=i<host> WEBLOGIC_PORT=<port> -p 80:80 12213-apache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo i
|
||
$ docker run -d -e WEBLOGIC_CLUSTER=host1:port,host2:port,host3:port --net=<some net> -p 80:80 12213-apache | ||
|
||
Run an Apache image to proxy and load balance to a list of managed servers in a cluster |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is the example for load balancing to individual or clustered managed server different. The sample seems exactly the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is just list of servers. for cluster there is an option to use a cluster URL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the multiple server host:port vs the cluster url. My comment refers to line 25 and line 31 are identical.
|
||
### Admin Server Only Example | ||
|
||
First make sure you have the WebLogic Server 12.2.1.3 sample and build your own image 12213-domain at [https://github.com/oracle/docker-images/tree/master/OracleWebLogic/samples/12213-domain]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Admin Server only containers they either must pull the image from the Docker Store 'docker pull store/oracle/weblogic:12.2.1.3' or they can build it them selves from https://github.com/oracle/docker-images/tree/master/OracleWebLogic/dockerfiles/12.2.1.3. The 12213-domain sample is meant to run a domain with a cluster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are showing apache part for admin server only. It is okay to use a domain with clusters although we only use admin server in the example. We are going to add cluster examples in the near future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two WebLogic topologies we support in Docker, the single Admin server/domain per container which you get from running a container from the WebLogic install image, and the WebLogic domain/cluster with one admin server and multiple clustered managed servers. Your example for the single Admin server should use the WebLogic install image to run an admin server container, the WLST that is used in that image creates a domain with a single admin server. The 12213-domain WLST scripts that get invoked when you run the Admin server container create a WLS domain with an admin server, cluster with multiple managed servers.
|
||
To start a containerized Admin Server, run: | ||
|
||
$ docker run -d --name wlsadmin -h wlsadmin -p 7001:7001 12213-domain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ docker run -d -e ADMIN_USERNAME=weblogic -e ADMIN_PASSWORD=welcome1 -e DOMAIN_HOME=/u01/oracle/user_projects/domains/abc_domain -e DOMAIN_NAME=abc_domain oracle/weblogic:12.2.1.3-developer
|
||
Note: you can also mount the file directly as follows. | ||
|
||
$ docker run -v /scratch/apache-config/custom_mod_wl_apache.conf:/config/custom_mod_wl_apache.conf -w /config -d -e WEBLOGIC_HOST=<admin-host> -e WEBLOGIC_PORT=7001 -p 80:80 12213-apache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace /scratch/apache-config/ for host directory a user when they run this command will not have a .scratch directory
|
||
This mounting can be done by using the -v option with the `docker run` command as shown below. | ||
|
||
$ docker run -v /scratch/apache-config:/config -w /config -d -e WEBLOGIC_HOST=<admin-host> -e WEBLOGIC_PORT=7001 -p 80:80 12213-apache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace /scratch/apache-config/ for host-directory, a user when they run this command will not have a .scratch directory
|
||
* Create a `custom_mod_wl_apache.conf` file by referring to `custom_mod_wl_apache.conf.sample` and Chapter 3 @ Fusion Middleware Using Oracle WebLogic Server Proxy Plug-Ins documentation. [https://docs.oracle.com/middleware/12213/webtier/develop-plugin/apache.htm#GUID-231FB5FD-8D0A-492A-BBFD-DC12A31BF2DE] | ||
|
||
* Place the `custom_mod_wl_apache.conf` file in a directory on the host machine (for example,`/scratch/apache-config`) and then mount this directory into the container at the location `/config`. By doing so, the contents of host directory `/scratch/apache-config` (and hence `custom_mod_wl_apache.conf`) will become available in the container at the mount point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace /scratch/apache-config for host-directory a user when they run this command will not have a scratch directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just an example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but it is confusing to the user when they do a copy paste. If you indicate that they should replace the string in the command for host-directory on the host where they are running it is clear. Please see how we do it in 12213-domain README.md sample.
Builds a Docker Image for Oracle HTTP Server (standalone) . | ||
|
||
Parameters: | ||
-v: Release version to build. Required. E.g 12.2.1.2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E.g 12.2.1.3.0
#!/bin/bash | ||
# | ||
# Since: May, 2018 | ||
# Author: prabhat.kishore@oracle.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are the author
Signed-off-by: Dongbo Xiao <dongbo.xiao@oracle.com>
|
||
$ docker run -d -e WEBLOGIC_CLUSTER=host1:port,host2:port,host3:port --net=<some net> -p 80:80 12213-apache | ||
|
||
Run an Apache image to proxy and load balance to a list of managed servers in a cluster |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand the multiple server host:port vs the cluster url. My comment refers to line 25 and line 31 are identical.
|
||
### Admin Server Only Example | ||
|
||
First make sure you have the WebLogic Server 12.2.1.3 sample and build your own image 12213-domain at [https://github.com/oracle/docker-images/tree/master/OracleWebLogic/samples/12213-domain]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two WebLogic topologies we support in Docker, the single Admin server/domain per container which you get from running a container from the WebLogic install image, and the WebLogic domain/cluster with one admin server and multiple clustered managed servers. Your example for the single Admin server should use the WebLogic install image to run an admin server container, the WLST that is used in that image creates a domain with a single admin server. The 12213-domain WLST scripts that get invoked when you run the Admin server container create a WLS domain with an admin server, cluster with multiple managed servers.
|
||
* Create a `custom_mod_wl_apache.conf` file by referring to `custom_mod_wl_apache.conf.sample` and Chapter 3 @ Fusion Middleware Using Oracle WebLogic Server Proxy Plug-Ins documentation. [https://docs.oracle.com/middleware/12213/webtier/develop-plugin/apache.htm#GUID-231FB5FD-8D0A-492A-BBFD-DC12A31BF2DE] | ||
|
||
* Place the `custom_mod_wl_apache.conf` file in a directory on the host machine (for example,`/scratch/apache-config`) and then mount this directory into the container at the location `/config`. By doing so, the contents of host directory `/scratch/apache-config` (and hence `custom_mod_wl_apache.conf`) will become available in the container at the mount point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but it is confusing to the user when they do a copy paste. If you indicate that they should replace the string in the command for host-directory on the host where they are running it is clear. Please see how we do it in 12213-domain README.md sample.
…2213-domain sample domain. Signed-off-by: Dongbo Xiao <dongbo.xiao@oracle.com>
Signed-off-by: Dongbo Xiao <dongbo.xiao@oracle.com>
Signed-off-by: Dongbo Xiao <dongbo.xiao@oracle.com>
Signed-off-by: Dongbo Xiao <dongbo.xiao@oracle.com>
Signed-off-by: Dongbo Xiao <dongbo.xiao@oracle.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy with this PR
COPY custom_mod_wl_apache.conf.sample /config/custom_mod_wl_apache.conf | ||
COPY container-scripts/* /u01/oracle/container-scripts/ | ||
|
||
RUN yum install -y unzip && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense then you can do a yum remove after you unzip
COPY custom_mod_wl_apache.conf.sample /config/custom_mod_wl_apache.conf | ||
COPY container-scripts/* /u01/oracle/container-scripts/ | ||
|
||
RUN yum install -y unzip && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing a yum remove or erase does not make much difference in the image size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Download the Generic installer from… (should probably be lower case “g” generic).
Typo: #Note that adding unzip does not noticably (should be noticeably) increase the size of the image
Signed-off-by: Dongbo Xiao <dongbo.xiao@oracle.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mriccell there is a question in this review for you. :) But there are still some best practice changes I think should be made to future proof the image.
|
||
# Use unzip because the base image does not contain a JDK | ||
# Note that adding unzip does not noticably increase the size of the image | ||
RUN yum install -y unzip && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please combine these two into a single yum command, i.e. yum install -y unzip httpd
|
||
## How to Build Apache With Plugin Docker Image | ||
|
||
This project offers a Dockerfile for Apache Web Server with Oraacle WebLogic Server Proxy Plugin in standalone mode. To assist in building the images, you can use `buildDockerImage.sh` script. See below for instructions and usage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "Oraacle"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -0,0 +1,95 @@ | |||
Apache Web Server with Oracle WebLogic Server Proxy Plugin on Docker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mriccell doesn't it make more sense to call this the "WebLogic Server Proxy Plugin for Apache" image, i.e. make the WebLogic plugin the primary focus, not Apache?
You're the PM, so whatever you say goes, but it just seems weird to me to have all this Apache stuff when really it's about the WebLogic plugin bits. :)
unzip /tmp/$PLUGINS_PKG -d /tmp && \ | ||
unzip /tmp/$PLUGIN_PKG -d $PLUGIN_HOME && \ | ||
cat /tmp/httpd.conf > /etc/httpd/conf/httpd.conf && \ | ||
cat /tmp/weblogic.conf >> /etc/httpd/conf/httpd.conf && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't do this. Just create the weblogic.conf
file in directly in /etc/httpd/conf.d/
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
unzip /tmp/$FMW_PKG -d /tmp && \ | ||
unzip /tmp/$PLUGINS_PKG -d /tmp && \ | ||
unzip /tmp/$PLUGIN_PKG -d $PLUGIN_HOME && \ | ||
cat /tmp/httpd.conf > /etc/httpd/conf/httpd.conf && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you replacing the default configuration file for Apache? Can you point me towards the changes you make to the file so we can use awk
or sed
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed - use sed.
|
||
exec httpd -DFOREGROUND | ||
|
||
tail -f /var/log/httpd/access_log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you doing this if you're running httpd
in FOREGROUND
mode? This shouldn't be necessary (and is not used in the upstream httpd
image either).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -0,0 +1,362 @@ | |||
# | |||
# This is the main Apache HTTP server configuration file. It contains the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned above, it's bad practice to replace an entire file. Rather, you should just change individual settings as needed.
Signed-off-by: Dongbo Xiao <dongbo.xiao@oracle.com>
Signed-off-by: Dongbo Xiao <dongbo.xiao@oracle.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove httpd.conf
from the git repo as it's no longer used. Once that's done, I will approve this PR and merge it.
Merged. Thanks for your prompt response to our reviews! |
Thanks for the valuable comments from all of you! |
This includes a Docker Image that
See README for steps to test the image.