Skip to content

Commit

Permalink
Add Healthcheck to WLS images and add 14.1.1.0 JRE 8 installers (orac…
Browse files Browse the repository at this point in the history
…le#1625)

* Add HEALTHCHECK to Admin and Managed server containers
  • Loading branch information
mriccell authored May 27, 2020
1 parent 25b12b9 commit b72e964
Show file tree
Hide file tree
Showing 38 changed files with 672 additions and 160 deletions.
19 changes: 13 additions & 6 deletions OracleFMWInfrastructure/dockerfiles/12.2.1.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Copyright (c) 2014-2018 Oracle and/or its affiliates. All rights reserved.
#Copyright (c) 2014, 2020, Oracle and/or its affiliates.
#
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
#
# ORACLE DOCKERFILES PROJECT
# --------------------------
Expand All @@ -21,10 +21,14 @@
# ----------------------------------------------------------------------------------------------
FROM oracle/serverjre:8 as builder

# Maintainer
# ----------
MAINTAINER Monica Riccelli <monica.riccelli@oracle.com>

# Labels
# ------
LABEL "provider"="Oracle" \
"maintainer"="Monica Riccelli <monica.riccelli@oracle.com>" \
"issues"="https://github.com/oracle/docker-images/issues" \
"port.admin.listen"="7001" \
"port.administration"="9002" \
"port.managed.server"="8001"

# Common environment variables required for this build
# ----------------------------------------------------
Expand Down Expand Up @@ -60,6 +64,7 @@ FROM oracle/serverjre:8
ENV ORACLE_HOME=/u01/oracle \
VOLUME_DIR=/u01/oracle/user_projects \
SCRIPT_FILE=/u01/oracle/container-scripts/* \
HEALTH_SCRIPT_FILE=/u01/oracle/container-scripts/get_healthcheck_url.sh \
DOMAIN_NAME="${DOMAIN_NAME:-infra_domain}" \
ADMIN_LISTEN_PORT="${ADMIN_LISTEN_PORT:-7001}" \
ADMIN_NAME="${ADMIN_NAME:-AdminServer}" \
Expand All @@ -68,6 +73,7 @@ ENV ORACLE_HOME=/u01/oracle \
ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}" \
MANAGEDSERVER_PORT="${MANAGEDSERVER_PORT:-8001}" \
MANAGED_NAME="${MANAGED_NAME:-infraServer1}" \
MANAGED_SERVER_CONTAINER="${MANAGED_SERVER_CONTAINER:-false}" \
RCUPREFIX="${RCUPREFIX:-INFRA01}" \
PRODUCTION_MODE="${PRODUCTION_MODE:-prod}" \
CONNECTION_STRING=${CONNECTION_STRING:-InfraDB:1521/InfraPDB1.us.oracle.com} \
Expand All @@ -91,5 +97,6 @@ COPY --from=builder --chown=oracle:oracle /u01 /u01
RUN chmod +xr $SCRIPT_FILE

USER oracle
HEALTHCHECK --start-period=4m --interval=1m CMD curl -k -s --fail `$HEALTH_SCRIPT_FILE` || exit 1
WORKDIR ${ORACLE_HOME}
CMD ["/u01/oracle/container-scripts/createOrStartInfraDomain.sh"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/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 [ "$MANAGED_SERVER_CONTAINER" = "true" ] ; then
echo "http://{localhost:$MANAGEDSERVER_PORT}/weblogic/ready" ;
elif [ "$ADMINISTRATION_PORT_ENABLED" = "true" ] ; then
echo "https://{localhost:$ADMINISTRATION_PORT}/weblogic/ready" ;
else
echo "http://{localhost:$ADMIN_LISTEN_PORT}/weblogic/ready" ;
fi

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ADMINISTRATION_PORT_ENABLED=true
ADMINISTRATION_PORT=9002
MANAGEDSERVER_PORT=8001
MANAGED_NAME=infraServer1
RCUPREFIX=INFRA31
RCUPREFIX=INFRA10
PRODUCTION_MODE=dev
CONNECTION_STRING=InfraDB:1521/InfraPDB1.us.oracle.com
DOMAIN_HOST_VOLUME=/home/username/domain_home
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#! /bin/bash
#
#Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
#Copyright (c) 2020, Oracle and/or its affiliates.
#
#Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
#
# Pass in the managed server name to run and the mapped port

Expand Down Expand Up @@ -31,6 +31,7 @@ managed_name() {

admin_host
managed_name
ENV_ARG="${ENV_ARG} -e MANAGED_NAME=$managedname -e MANAGED_SERVER_CONTAINER=true"

echo "docker run -d -p 9802:8002 --network=InfraNET -v ${scriptDir}/properties:/u01/oracle/properties ${ENV_ARG} --volumes-from ${adminhost} --name ${managedname} oracle/fmw-infrastructure:12.2.1.3 startManagedServer.sh"

Expand Down
17 changes: 12 additions & 5 deletions OracleFMWInfrastructure/dockerfiles/12.2.1.4/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Copyright (c) 2014-2019 Oracle and/or its affiliates. All rights reserved.
#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.
#
Expand All @@ -21,10 +21,14 @@
# ----------------------------------------------------------------------------------------------
FROM oracle/serverjre:8 as builder

# Maintainer
# ----------
MAINTAINER Monica Riccelli <monica.riccelli@oracle.com>

# Labels
# ------
LABEL "provider"="Oracle" \
"maintainer"="Monica Riccelli <monica.riccelli@oracle.com>" \
"issues"="https://github.com/oracle/docker-images/issues" \
"port.admin.listen"="7001" \
"port.administration"="9002" \
"port.managed.server"="8001"

# Common environment variables required for this build
# ----------------------------------------------------
Expand Down Expand Up @@ -61,6 +65,7 @@ FROM oracle/serverjre:8
ENV ORACLE_HOME=/u01/oracle \
VOLUME_DIR=/u01/oracle/user_projects \
SCRIPT_FILE=/u01/oracle/container-scripts/* \
HEALTH_SCRIPT_FILE=/u01/oracle/container-scripts/get_healthcheck_url.sh \
DOMAIN_NAME="${DOMAIN_NAME:-infra_domain}" \
ADMIN_LISTEN_PORT="${ADMIN_LISTEN_PORT:-7001}" \
ADMIN_NAME="${ADMIN_NAME:-AdminServer}" \
Expand All @@ -69,6 +74,7 @@ ENV ORACLE_HOME=/u01/oracle \
ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}" \
MANAGEDSERVER_PORT="${MANAGEDSERVER_PORT:-8001}" \
MANAGED_NAME="${MANAGED_NAME:-infraServer1}" \
MANAGED_SERVER_CONTAINER="${MANAGED_SERVER_CONTAINER:-false}" \
RCUPREFIX="${RCUPREFIX:-INFRA01}" \
PRODUCTION_MODE="${PRODUCTION_MODE:-prod}" \
CONNECTION_STRING=${CONNECTION_STRING:-InfraDB:1521/InfraPDB1.us.oracle.com} \
Expand All @@ -92,5 +98,6 @@ COPY --from=builder --chown=oracle:oracle /u01 /u01
RUN chmod +xr $SCRIPT_FILE

USER oracle
HEALTHCHECK --start-period=4m --interval=1m CMD curl -k -s --fail `$HEALTH_SCRIPT_FILE` || exit 1
WORKDIR ${ORACLE_HOME}
CMD ["/u01/oracle/container-scripts/createOrStartInfraDomain.sh"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/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 [ "$MANAGED_SERVER_CONTAINER" = "true" ] ; then
echo "http://{localhost:$MANAGEDSERVER_PORT}/weblogic/ready" ;
elif [ "$ADMINISTRATION_PORT_ENABLED" = "true" ] ; then
echo "https://{localhost:$ADMINISTRATION_PORT}/weblogic/ready" ;
else
echo "http://{localhost:$ADMIN_LISTEN_PORT}/weblogic/ready" ;
fi

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ADMINISTRATION_PORT_ENABLED=true
ADMINISTRATION_PORT=9002
MANAGEDSERVER_PORT=8001
MANAGED_NAME=infraServer1
RCUPREFIX=INFRA31
RCUPREFIX=INFRA10
PRODUCTION_MODE=dev
CONNECTION_STRING=InfraDB:1521/InfraPDB1.us.oracle.com
DOMAIN_HOST_VOLUME=/home/username/domain_home
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ admin_host() {
admin_host
domain_host_volume

echo " docker run -d -p 9001:7001 -p 9002:9002 --name ${adminhost} --network=InfraNET -v ${scriptDir}/properties:/u01/oracle/properties -v ${domainhostvol}:/u01/oracle/user_projects/domains ${ENV_ARG} oracle/fmw-infrastructure:12.2.1.3"
echo " docker run -d -p 9001:7001 -p 9002:9002 --name ${adminhost} --network=InfraNET -v ${scriptDir}/properties:/u01/oracle/properties -v ${domainhostvol}:/u01/oracle/user_projects/domains ${ENV_ARG} oracle/fmw-infrastructure:12.2.1.4"

docker run -d -p 9001:7001 -p 9002:9002 --name ${adminhost} --network=InfraNET -v ${scriptDir}/properties:/u01/oracle/properties -v ${domainhostvol}:/u01/oracle/user_projects/domains ${ENV_ARG} oracle/fmw-infrastructure:12.2.1.3
docker run -d -p 9001:7001 -p 9002:9002 --name ${adminhost} --network=InfraNET -v ${scriptDir}/properties:/u01/oracle/properties -v ${domainhostvol}:/u01/oracle/user_projects/domains ${ENV_ARG} oracle/fmw-infrastructure:12.2.1.4

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/bash
#
#Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
#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.
#
Expand Down Expand Up @@ -31,6 +31,7 @@ managed_name() {

admin_host
managed_name
ENV_ARG="${ENV_ARG} -e MANAGED_NAME=$managedname -e MANAGED_SERVER_CONTAINER=true"

echo "docker run -d -p 9802:8002 --network=InfraNET -v ${scriptDir}/properties:/u01/oracle/properties ${ENV_ARG} --volumes-from ${adminhost} --name ${managedname} oracle/fmw-infrastructure:12.2.1.3 startManagedServer.sh"

Expand Down
4 changes: 2 additions & 2 deletions OracleFMWInfrastructure/dockerfiles/buildDockerImage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Author: monica.riccelli@oracle.com
# Description: script to build a Docker image for FMW Infrastructure
#
#Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
#Copyright (c) 2019, 2020, Oracle and/or its affiliates.
#
#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.

Expand All @@ -23,7 +23,7 @@ Parameters:
LICENSE UPL 1.0
Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2019, 2020, Oracle and/or its affiliates.
EOF
exit 0
Expand Down
23 changes: 15 additions & 8 deletions OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.developer
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Copyright (c) 2014-2019 Oracle and/or its affiliates. All rights reserved.
#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.
#
Expand Down Expand Up @@ -29,9 +29,14 @@
# ----------------------------------------------------------------------------------------------
FROM oracle/serverjre:8 as builder

# Maintainer
# ----------
MAINTAINER Monica Riccelli <monica.riccelli@oracle.com>
# Labels
# ------
LABEL "provider"="Oracle" \
"maintainer"="Monica Riccelli <monica.riccelli@oracle.com>" \
"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)
# --------------------------------------------------------------------
Expand Down Expand Up @@ -70,6 +75,7 @@ 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
Expand All @@ -80,7 +86,7 @@ ENV DOMAIN_NAME="${DOMAIN_NAME:-base_domain}" \
DEBUG_FLAG=true \
PRODUCTION_MODE=dev \
ADMINISTRATION_PORT_ENABLED="${ADMINISTRATION_PORT_ENABLED:-true}" \
ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}"
ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}"

# Setup filesystem and oracle user
# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation
Expand All @@ -94,13 +100,14 @@ COPY --from=builder --chown=oracle:oracle /u01 /u01

# Copy scripts
#-------------
COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py /u01/oracle/
COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/

RUN chmod +xr $SCRIPT_FILE && \
chown oracle:oracle $SCRIPT_FILE /u01/oracle/create-wls-domain.py
RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && \
chown oracle:oracle $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.
Expand Down
21 changes: 13 additions & 8 deletions OracleWebLogic/dockerfiles/12.2.1.3/Dockerfile.generic
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Copyright (c) 2014-2019 Oracle and/or its affiliates. All rights reserved.
#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.
#
Expand All @@ -25,13 +25,16 @@
# 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

# Maintainer
# ----------
MAINTAINER Monica Riccelli <monica.riccelli@oracle.com>
# Labels
# ------
LABEL "provider"="Oracle" \
"maintainer"="Monica Riccelli <monica.riccelli@oracle.com>" \
"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)
# --------------------------------------------------------------------
Expand Down Expand Up @@ -71,6 +74,7 @@ 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
Expand All @@ -93,13 +97,14 @@ COPY --from=builder --chown=oracle:oracle /u01 /u01

# Copy scripts
#-------------
COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py /u01/oracle/
COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/

RUN chmod +xr $SCRIPT_FILE && \
chown oracle:oracle $SCRIPT_FILE /u01/oracle/create-wls-domain.py
RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && \
chown oracle:oracle $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.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/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
6 changes: 6 additions & 0 deletions OracleWebLogic/dockerfiles/12.2.1.4/Checksum.generic
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Download WebLogic Server Generic Installer 12.2.1.4
#
# - http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html
#
4198256da12e06841611d9c1a1ab85eb fmw_12.2.1.4.0_wls_Disk1_1of1.zip

22 changes: 14 additions & 8 deletions OracleWebLogic/dockerfiles/12.2.1.4/Dockerfile.developer
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Copyright (c) 2014-2019 Oracle and/or its affiliates. All rights reserved.
#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.
#
Expand Down Expand Up @@ -29,9 +29,13 @@
# ----------------------------------------------------------------------------------------------
FROM oracle/serverjre:8 as builder

# Maintainer
# ----------
MAINTAINER Monica Riccelli <monica.riccelli@oracle.com>
# Labels
# ------
LABEL "provider"="Oracle" \
"maintainer"="Monica Riccelli <monica.riccelli@oracle.com>" \
"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)
# --------------------------------------------------------------------
Expand Down Expand Up @@ -70,6 +74,7 @@ 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
Expand All @@ -80,7 +85,7 @@ ENV DOMAIN_NAME="${DOMAIN_NAME:-base_domain}" \
DEBUG_FLAG=true \
PRODUCTION_MODE=dev \
ADMINISTRATION_PORT_ENABLED="${ADMINISTRATION_PORT_ENABLED:-true}" \
ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}"
ADMINISTRATION_PORT="${ADMINISTRATION_PORT:-9002}"

# Setup filesystem and oracle user
# Adjust file permissions, go to /u01 as user 'oracle' to proceed with WLS installation
Expand All @@ -94,13 +99,14 @@ COPY --from=builder --chown=oracle:oracle /u01 /u01

# Copy scripts
#-------------
COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py /u01/oracle/
COPY container-scripts/createAndStartEmptyDomain.sh container-scripts/create-wls-domain.py container-scripts/get_healthcheck_url.sh /u01/oracle/

RUN chmod +xr $SCRIPT_FILE && \
chown oracle:oracle $SCRIPT_FILE /u01/oracle/create-wls-domain.py
RUN chmod +xr $SCRIPT_FILE $HEALTH_SCRIPT_FILE && \
chown oracle:oracle $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.
Expand Down
Loading

0 comments on commit b72e964

Please sign in to comment.