From 9650906a57fa8872ac4b76f043ccab6af2db4bd6 Mon Sep 17 00:00:00 2001 From: Richard Killen Date: Tue, 19 Jun 2018 17:29:22 -0400 Subject: [PATCH 01/17] Issue #130 - Add a docker sample that creates a domain from a WDT model --- .../src/main/samples/docker-domain/Dockerfile | 85 ++++++++++++++++++ core/src/main/samples/docker-domain/build.sh | 10 +++ .../container-scripts/domain.properties | 2 + .../container-scripts/startWLSDomain.sh | 21 +++++ .../docker-domain/simple-topology.yaml | 90 +++++++++++++++++++ 5 files changed, 208 insertions(+) create mode 100644 core/src/main/samples/docker-domain/Dockerfile create mode 100755 core/src/main/samples/docker-domain/build.sh create mode 100644 core/src/main/samples/docker-domain/container-scripts/domain.properties create mode 100755 core/src/main/samples/docker-domain/container-scripts/startWLSDomain.sh create mode 100644 core/src/main/samples/docker-domain/simple-topology.yaml diff --git a/core/src/main/samples/docker-domain/Dockerfile b/core/src/main/samples/docker-domain/Dockerfile new file mode 100644 index 0000000000..63390dc6f3 --- /dev/null +++ b/core/src/main/samples/docker-domain/Dockerfile @@ -0,0 +1,85 @@ +#Copyright (c) 2014-2018 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 DOCKERFILES PROJECT +# -------------------------- +# This Dockerfile extends the Oracle WebLogic image by creating a sample domain. +# +# Util scripts are copied into the image enabling users to plug NodeManager +# automatically into the AdminServer running on another container. +# +# HOW TO BUILD THIS IMAGE +# ----------------------- +# Put all downloaded files in the same directory as this Dockerfile +# Run: +# $ sudo docker build \ +# --build-arg WDT_MODEL=simple-topology.yaml \ +# -t 12213-domain-wdt . +# +# Pull base image +# --------------- +FROM store/oracle/weblogic:12.2.1.3 + +# Maintainer +# ---------- +MAINTAINER Monica Riccelli + +ARG WDT_MODEL +ARG WDT_ARCHIVE + +# WLS Configuration +# --------------------------- +ENV ADMIN_HOST="wlsadmin" \ + NM_PORT="5556" \ + MS_PORT="8001" \ + DEBUG_PORT="8453" \ + ORACLE_HOME=/u01/oracle \ + SCRIPT_FILE=/u01/oracle/createAndStartWLSDomain.sh \ + CONFIG_JVM_ARGS="-Dweblogic.security.SSL.ignoreHostnameVerification=true" \ + PATH=$PATH:/u01/oracle/oracle_common/common/bin:/u01/oracle/wlserver/common/bin:/u01/oracle/user_projects/domains/${DOMAIN_NAME:-base_domain}/bin:/u01/oracle + +# Domain and Server environment variables +# ------------------------------------------------------------ +ENV DOMAIN_NAME="${DOMAIN_NAME:-base_domain}" \ + PRE_DOMAIN_HOME=/u01/oracle/user_projects \ + ADMIN_PORT="${ADMIN_PORT:-7001}" \ + WDT_MODEL="$WDT_MODEL" \ + WDT_ARCHIVE="$WDT_ARCHIVE" + +# Add files required to build this image +COPY container-scripts/* /u01/oracle/ +COPY weblogic-deploy.zip /u01 +COPY ${WDT_MODEL} ${ARCHIVE_FILE} /u01/ + +#Create directory where domain will be written to +USER root +RUN chmod +xw /u01/oracle/*.sh && \ + chmod +xw /u01/oracle/*.py && \ + mkdir -p $PRE_DOMAIN_HOME && \ + mkdir -p $PRE_DOMAIN_HOME/domains && \ + chmod a+xr $PRE_DOMAIN_HOME && \ + chown -R oracle:oracle $PRE_DOMAIN_HOME && \ + cd /u01 && \ + $JAVA_HOME/bin/jar xf /u01/weblogic-deploy.zip && \ + chmod +xw /u01/weblogic-deploy/bin/*.sh && \ + chmod -R +xw /u01/weblogic-deploy/lib/python && \ + if [ -n "$WDT_MODEL" ]; then MODEL_OPT="-model_file /u01/$WDT_MODEL"; fi && \ + if [ -n "$WDT_ARCHIVE" ]; then MODEL_OPT="-archive_file /u01/$WDT_ARCHIVE"; fi && \ + /u01/weblogic-deploy/bin/createDomain.sh \ + -oracle_home /u01/oracle \ + -java_home ${JAVA_HOME} \ + -domain_parent /u01/oracle/user_projects/domains \ + -domain_type WLS \ + $MODEL_OPT \ + $ARCHIVE_OPT + +VOLUME $PRE_DOMAIN_HOME +# Expose Node Manager default port, and also default for admin and managed server +EXPOSE $NM_PORT $ADMIN_PORT $MS_PORT $DEBUG_PORT + +USER oracle +WORKDIR $ORACLE_HOME + +# Define default command to start bash. +CMD ["/u01/oracle/startWLSDomain.sh"] diff --git a/core/src/main/samples/docker-domain/build.sh b/core/src/main/samples/docker-domain/build.sh new file mode 100755 index 0000000000..f457c9d219 --- /dev/null +++ b/core/src/main/samples/docker-domain/build.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# +#Copyright (c) 2014-2018 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. +# +docker build \ + --build-arg WDT_MODEL=simple-topology.yaml \ + -t 12213-domain-wdt . + diff --git a/core/src/main/samples/docker-domain/container-scripts/domain.properties b/core/src/main/samples/docker-domain/container-scripts/domain.properties new file mode 100644 index 0000000000..c7b86823a2 --- /dev/null +++ b/core/src/main/samples/docker-domain/container-scripts/domain.properties @@ -0,0 +1,2 @@ +ADMIN_PORT=7001 +ADMIN_HOST=wlsadmin diff --git a/core/src/main/samples/docker-domain/container-scripts/startWLSDomain.sh b/core/src/main/samples/docker-domain/container-scripts/startWLSDomain.sh new file mode 100755 index 0000000000..660f04a101 --- /dev/null +++ b/core/src/main/samples/docker-domain/container-scripts/startWLSDomain.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +#Copyright (c) 2014-2018 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. +# +# Start the Domain. + +# determine the domain name. there is only one domain directory. +export DOMAIN_NAME=`ls /u01/oracle/user_projects/domains | head -1` + +#Define DOMAIN_HOME +export DOMAIN_HOME=/u01/oracle/user_projects/domains/$DOMAIN_NAME + +# Start Admin Server and tail the logs +${DOMAIN_HOME}/startWebLogic.sh +touch ${DOMAIN_HOME}/servers/AdminServer/logs/AdminServer.log +tail -f ${DOMAIN_HOME}/servers/AdminServer/logs/AdminServer.log & + +childPID=$! +wait $childPID diff --git a/core/src/main/samples/docker-domain/simple-topology.yaml b/core/src/main/samples/docker-domain/simple-topology.yaml new file mode 100644 index 0000000000..50dd415698 --- /dev/null +++ b/core/src/main/samples/docker-domain/simple-topology.yaml @@ -0,0 +1,90 @@ +domainInfo: + AdminUserName: weblogic + AdminPassword: welcome1 + ServerStartMode: dev +topology: + Name: my_domain + AdminServerName: AdminServer + Cluster: + mycluster: + ClientCertProxyEnabled: true + Server: + AdminServer: + Machine: machine1 + ListenPort: 7001 + SSL: + Enabled: true + ListenPort: 7002 + m1: + Machine: machine1 + ListenPort: 9003 + Cluster: mycluster + ServerStart: + ClassPath: '@@PWD@@/src/test/resources/nosuch.jar' + Arguments: '-Dosgi=true' + SSL: + Enabled: true + ListenPort: 9004 + m2: + Machine: machine1 + ListenPort: 9005 + Cluster: mycluster + ServerStart: + ClassPath: '@@PWD@@/src/test/resources/nosuch.jar' + Arguments: '-Dosgi=true' + SSL: + Enabled : true + ListenPort: 9006 + ServerTemplate: + template1: + Machine: machine1 + ListenPort: 9008 + SSL: + Enabled: true + ListenPort: 9009 + Machine: + machine1: + Notes: The only machine + NodeManager: + NMType: SSL + ListenPort: 5556 + Notes: The only node manager + SecurityConfiguration: + NodeManagerUsername: weblogic + NodeManagerPasswordEncrypted: welcome1 + JMX: + InvocationTimeoutSeconds: 40 + Notes: JMX notes + ManagedServerNotificationsEnabled: true + JTA: + MaxTransactions: 4 + Notes: JTA notes +resources: + JDBCStore: + JDBCStore99: + Notes: JDBC store notes + Target: m1 + DataSource: Generic1 + JDBCSystemResource: + Generic1: + Target: mycluster + JdbcResource: + JDBCDataSourceParams: + JNDIName: [ jdbc/generic1, jdbc/special1 ] + GlobalTransactionsProtocol: TwoPhaseCommit + JDBCDriverParams: + DriverName: oracle.jdbc.xa.client.OracleXADataSource + URL: 'jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=slc05til.us.oracle.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl.us.oracle.com)))' + PasswordEncrypted: welcome1 + Properties: + user: + Value: jshum + oracle.net.CONNECT_TIMEOUT: + Value: 5000 + oracle.jdbc.ReadTimeout: + Value: 30000 + JDBCConnectionPoolParams: + InitialCapacity: 3 + MaxCapacity: 15 + TestTableName: SQL ISVALID + TestConnectionsOnReserve: true From a67a8ef9f4b42351a3cc50d42c2f95bcfa27c475 Mon Sep 17 00:00:00 2001 From: Richard Killen Date: Tue, 19 Jun 2018 18:13:13 -0400 Subject: [PATCH 02/17] corrected domain directory owner --- core/src/main/samples/docker-domain/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/samples/docker-domain/Dockerfile b/core/src/main/samples/docker-domain/Dockerfile index 63390dc6f3..697e08bef7 100644 --- a/core/src/main/samples/docker-domain/Dockerfile +++ b/core/src/main/samples/docker-domain/Dockerfile @@ -72,7 +72,8 @@ RUN chmod +xw /u01/oracle/*.sh && \ -domain_parent /u01/oracle/user_projects/domains \ -domain_type WLS \ $MODEL_OPT \ - $ARCHIVE_OPT + $ARCHIVE_OPT && \ + chown -R oracle:oracle $PRE_DOMAIN_HOME VOLUME $PRE_DOMAIN_HOME # Expose Node Manager default port, and also default for admin and managed server From ef54a92ce7b24943ec4b978fe88a25919877a2a0 Mon Sep 17 00:00:00 2001 From: rkillen Date: Tue, 19 Jun 2018 17:16:23 -0500 Subject: [PATCH 03/17] Issue#127 - Update README.md --- core/src/main/samples/docker-domain/README.md | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 core/src/main/samples/docker-domain/README.md diff --git a/core/src/main/samples/docker-domain/README.md b/core/src/main/samples/docker-domain/README.md new file mode 100644 index 0000000000..3df357713b --- /dev/null +++ b/core/src/main/samples/docker-domain/README.md @@ -0,0 +1,46 @@ +Example Image with a WLS Domain +================================ +This Dockerfile extends the Oracle WebLogic image by creating a sample WLS 12.2.1.3 domain and cluster from a WebLogic Deploy Tool model. + +Utility scripts are copied into the image, enabling users to plug Node Manager automatically into the Administration Server running on another container. + +### WebLogic Deploy Tool + +The WebLogic Deploy Tool is used to create the domain image from a model file. Details about the tool and the model file format can be found in its GitHub project: + +https://github.com/oracle/weblogic-deploy-tooling + +### How to Build and Run + +**NOTE:** The image is based on a WebLogic image in the Docker store: store/oracle/weblogic:12.2.1.3 . Verify that you have access to download this image. + +The WebLogic Deploy Tool installer is required to build this image. Add weblogic-deploy.zip to the sample directory. + + $ wget https://github.com/oracle/weblogic-deploy-tooling/releases/download/weblogic-deploy-tooling-0.11/weblogic-deploy.zip + +To build this sample, run: + + $ docker build \ + --build-arg WDT_MODEL=simple-topology.yaml \ + -t 12213-domain-wdt . + +This will use the model file in the sample directory. + +To start the containerized Administration Server, run: + + $ docker run -d --name wlsadmin --hostname wlsadmin -p 7001:7001 --env-file ./container-scripts/domain.properties 12213-domain-wdt + +TBD To start a containerized Managed Server (MS1) to self-register with the Administration Server above, run: + + $ docker run -d --name MS1 --link wlsadmin:wlsadmin -p 8001:8001 --env-file ./container-scripts/domain.properties -e ADMIN_PASSWORD= -e MS_NAME=MS1 --volumes-from wlsadmin 12213-domain createServer.sh + +TBD To start a second Managed Server (MS2), run: + + $ docker run -d --name MS2 --link wlsadmin:wlsadmin -p 8002:8001 --env-file ./container-scripts/domain.properties -e ADMIN_PASSWORD= -e MS_NAME=MS2 --volumes-from wlsadmin 12213-domain createServer.sh + +The above scenario from this sample will give you a WebLogic domain with a cluster set up on a single host environment. + +You may create more containerized Managed Servers by calling the `docker` command above for `createServer.sh` as long you link properly with the Administration Server. For an example of a multihost environment, see the sample `1221-multihost`. + +# Copyright +Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. From d2efccb0fd13d3dcedb5e8e84028aad6c21b9cc1 Mon Sep 17 00:00:00 2001 From: rkillen Date: Tue, 19 Jun 2018 17:24:11 -0500 Subject: [PATCH 04/17] Issue#127 - Update WebLogic Deploy Tool download file --- .../main/samples/docker-domain/weblogic-deploy.zip.download | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 core/src/main/samples/docker-domain/weblogic-deploy.zip.download diff --git a/core/src/main/samples/docker-domain/weblogic-deploy.zip.download b/core/src/main/samples/docker-domain/weblogic-deploy.zip.download new file mode 100644 index 0000000000..e0c6153498 --- /dev/null +++ b/core/src/main/samples/docker-domain/weblogic-deploy.zip.download @@ -0,0 +1,5 @@ +# Download the WebLogic Deploy Tool installer to the sample directory. +# +# - wget https://github.com/oracle/weblogic-deploy-tooling/releases/download/weblogic-deploy-tooling-0.11/weblogic-deploy.zip +# + weblogic-deploy.zip From d358e00a686928d3354c1c9646b1059af54571f4 Mon Sep 17 00:00:00 2001 From: Richard Killen Date: Wed, 20 Jun 2018 18:14:01 -0400 Subject: [PATCH 05/17] Issue #130 - corrected archive option name --- core/src/main/samples/docker-domain/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/samples/docker-domain/Dockerfile b/core/src/main/samples/docker-domain/Dockerfile index 697e08bef7..7609148af7 100644 --- a/core/src/main/samples/docker-domain/Dockerfile +++ b/core/src/main/samples/docker-domain/Dockerfile @@ -65,7 +65,7 @@ RUN chmod +xw /u01/oracle/*.sh && \ chmod +xw /u01/weblogic-deploy/bin/*.sh && \ chmod -R +xw /u01/weblogic-deploy/lib/python && \ if [ -n "$WDT_MODEL" ]; then MODEL_OPT="-model_file /u01/$WDT_MODEL"; fi && \ - if [ -n "$WDT_ARCHIVE" ]; then MODEL_OPT="-archive_file /u01/$WDT_ARCHIVE"; fi && \ + if [ -n "$WDT_ARCHIVE" ]; then ARCHIVE_OPT="-archive_file /u01/$WDT_ARCHIVE"; fi && \ /u01/weblogic-deploy/bin/createDomain.sh \ -oracle_home /u01/oracle \ -java_home ${JAVA_HOME} \ From 07dae7739fdb3a09d4031c4bbcebf2b8962af2d9 Mon Sep 17 00:00:00 2001 From: Richard Killen Date: Wed, 20 Jun 2018 18:21:05 -0400 Subject: [PATCH 06/17] Issue #130 - enable build and deploy of simple application --- core/src/main/samples/docker-domain/build-archive.sh | 12 ++++++++++++ core/src/main/samples/docker-domain/build.sh | 3 ++- .../samples/docker-domain/simple-app/WEB-INF/web.xml | 8 ++++++++ .../docker-domain/simple-app/WEB-INF/weblogic.xml | 5 +++++ .../samples/docker-domain/simple-app/simple.html | 9 +++++++++ .../main/samples/docker-domain/simple-topology.yaml | 9 +++++++++ 6 files changed, 45 insertions(+), 1 deletion(-) create mode 100755 core/src/main/samples/docker-domain/build-archive.sh create mode 100644 core/src/main/samples/docker-domain/simple-app/WEB-INF/web.xml create mode 100644 core/src/main/samples/docker-domain/simple-app/WEB-INF/weblogic.xml create mode 100644 core/src/main/samples/docker-domain/simple-app/simple.html diff --git a/core/src/main/samples/docker-domain/build-archive.sh b/core/src/main/samples/docker-domain/build-archive.sh new file mode 100755 index 0000000000..88983151bf --- /dev/null +++ b/core/src/main/samples/docker-domain/build-archive.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# +#Copyright (c) 2018 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. +# +rm -Rf archive +mkdir -p archive/wlsdeploy/applications +cd simple-app +jar cvf ../archive/wlsdeploy/applications/simple-app.war * +cd ../archive +jar cvf ../archive.zip * diff --git a/core/src/main/samples/docker-domain/build.sh b/core/src/main/samples/docker-domain/build.sh index f457c9d219..1bee5bf978 100755 --- a/core/src/main/samples/docker-domain/build.sh +++ b/core/src/main/samples/docker-domain/build.sh @@ -1,10 +1,11 @@ #!/bin/sh # -#Copyright (c) 2014-2018 Oracle and/or its affiliates. All rights reserved. +#Copyright (c) 2018 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. # docker build \ --build-arg WDT_MODEL=simple-topology.yaml \ + --build-arg WDT_ARCHIVE=archive.zip \ -t 12213-domain-wdt . diff --git a/core/src/main/samples/docker-domain/simple-app/WEB-INF/web.xml b/core/src/main/samples/docker-domain/simple-app/WEB-INF/web.xml new file mode 100644 index 0000000000..5222bbdfba --- /dev/null +++ b/core/src/main/samples/docker-domain/simple-app/WEB-INF/web.xml @@ -0,0 +1,8 @@ + + + + /simple.html + + diff --git a/core/src/main/samples/docker-domain/simple-app/WEB-INF/weblogic.xml b/core/src/main/samples/docker-domain/simple-app/WEB-INF/weblogic.xml new file mode 100644 index 0000000000..3bfda546fd --- /dev/null +++ b/core/src/main/samples/docker-domain/simple-app/WEB-INF/weblogic.xml @@ -0,0 +1,5 @@ + + + + /simple + diff --git a/core/src/main/samples/docker-domain/simple-app/simple.html b/core/src/main/samples/docker-domain/simple-app/simple.html new file mode 100644 index 0000000000..778774ec74 --- /dev/null +++ b/core/src/main/samples/docker-domain/simple-app/simple.html @@ -0,0 +1,9 @@ + + + Simple Application + + +

Simple Application

+

This is the simple application.

+ + diff --git a/core/src/main/samples/docker-domain/simple-topology.yaml b/core/src/main/samples/docker-domain/simple-topology.yaml index 50dd415698..02d0398ab8 100644 --- a/core/src/main/samples/docker-domain/simple-topology.yaml +++ b/core/src/main/samples/docker-domain/simple-topology.yaml @@ -88,3 +88,12 @@ resources: MaxCapacity: 15 TestTableName: SQL ISVALID TestConnectionsOnReserve: true +appDeployments: + Application: + # Quote needed because of hyphen in string + 'simple-app': + SourcePath: 'wlsdeploy/applications/simple-app.war' + Target: AdminServer + ModuleType: war + StagingMode: nostage + PlanStagingMode: nostage From bf1ee34e4d7a5960340fe0c486a5fecd7e0427c0 Mon Sep 17 00:00:00 2001 From: rkillen Date: Thu, 21 Jun 2018 13:02:36 -0500 Subject: [PATCH 07/17] Issue#127 - Added instructions for building the sample archive --- core/src/main/samples/docker-domain/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/samples/docker-domain/README.md b/core/src/main/samples/docker-domain/README.md index 3df357713b..daecdcf76c 100644 --- a/core/src/main/samples/docker-domain/README.md +++ b/core/src/main/samples/docker-domain/README.md @@ -18,6 +18,10 @@ The WebLogic Deploy Tool installer is required to build this image. Add weblogic $ wget https://github.com/oracle/weblogic-deploy-tooling/releases/download/weblogic-deploy-tooling-0.11/weblogic-deploy.zip +This sample deploys a simple one-page web application contained in a .zip archive. This archive needs to be built (one time only) before building the Docker image. + + $ ./build-archive.sh + To build this sample, run: $ docker build \ From 527f5d2e98357464a8fabc78107fdd559e28ff27 Mon Sep 17 00:00:00 2001 From: rkillen Date: Thu, 21 Jun 2018 13:23:32 -0500 Subject: [PATCH 08/17] Issue#130 - Moved samples directory to top level --- .../docker-domain/Dockerfile | 0 .../docker-domain/README.md | 0 .../docker-domain/build-archive.sh | 0 .../docker-domain/build.sh | 0 .../container-scripts/domain.properties | 0 .../container-scripts/startWLSDomain.sh | 0 .../docker-domain/simple-app/WEB-INF/web.xml | 16 +- .../simple-app/WEB-INF/weblogic.xml | 10 +- .../docker-domain/simple-app/simple.html | 0 .../docker-domain/simple-topology.yaml | 198 +++++++++--------- .../weblogic-deploy.zip.download | 0 11 files changed, 112 insertions(+), 112 deletions(-) rename {core/src/main/samples => samples}/docker-domain/Dockerfile (100%) rename {core/src/main/samples => samples}/docker-domain/README.md (100%) rename {core/src/main/samples => samples}/docker-domain/build-archive.sh (100%) mode change 100755 => 100644 rename {core/src/main/samples => samples}/docker-domain/build.sh (100%) mode change 100755 => 100644 rename {core/src/main/samples => samples}/docker-domain/container-scripts/domain.properties (100%) rename {core/src/main/samples => samples}/docker-domain/container-scripts/startWLSDomain.sh (100%) mode change 100755 => 100644 rename {core/src/main/samples => samples}/docker-domain/simple-app/WEB-INF/web.xml (97%) rename {core/src/main/samples => samples}/docker-domain/simple-app/WEB-INF/weblogic.xml (97%) rename {core/src/main/samples => samples}/docker-domain/simple-app/simple.html (100%) rename {core/src/main/samples => samples}/docker-domain/simple-topology.yaml (97%) rename {core/src/main/samples => samples}/docker-domain/weblogic-deploy.zip.download (100%) diff --git a/core/src/main/samples/docker-domain/Dockerfile b/samples/docker-domain/Dockerfile similarity index 100% rename from core/src/main/samples/docker-domain/Dockerfile rename to samples/docker-domain/Dockerfile diff --git a/core/src/main/samples/docker-domain/README.md b/samples/docker-domain/README.md similarity index 100% rename from core/src/main/samples/docker-domain/README.md rename to samples/docker-domain/README.md diff --git a/core/src/main/samples/docker-domain/build-archive.sh b/samples/docker-domain/build-archive.sh old mode 100755 new mode 100644 similarity index 100% rename from core/src/main/samples/docker-domain/build-archive.sh rename to samples/docker-domain/build-archive.sh diff --git a/core/src/main/samples/docker-domain/build.sh b/samples/docker-domain/build.sh old mode 100755 new mode 100644 similarity index 100% rename from core/src/main/samples/docker-domain/build.sh rename to samples/docker-domain/build.sh diff --git a/core/src/main/samples/docker-domain/container-scripts/domain.properties b/samples/docker-domain/container-scripts/domain.properties similarity index 100% rename from core/src/main/samples/docker-domain/container-scripts/domain.properties rename to samples/docker-domain/container-scripts/domain.properties diff --git a/core/src/main/samples/docker-domain/container-scripts/startWLSDomain.sh b/samples/docker-domain/container-scripts/startWLSDomain.sh old mode 100755 new mode 100644 similarity index 100% rename from core/src/main/samples/docker-domain/container-scripts/startWLSDomain.sh rename to samples/docker-domain/container-scripts/startWLSDomain.sh diff --git a/core/src/main/samples/docker-domain/simple-app/WEB-INF/web.xml b/samples/docker-domain/simple-app/WEB-INF/web.xml similarity index 97% rename from core/src/main/samples/docker-domain/simple-app/WEB-INF/web.xml rename to samples/docker-domain/simple-app/WEB-INF/web.xml index 5222bbdfba..478af62e68 100644 --- a/core/src/main/samples/docker-domain/simple-app/WEB-INF/web.xml +++ b/samples/docker-domain/simple-app/WEB-INF/web.xml @@ -1,8 +1,8 @@ - - - - /simple.html - - + + + + /simple.html + + diff --git a/core/src/main/samples/docker-domain/simple-app/WEB-INF/weblogic.xml b/samples/docker-domain/simple-app/WEB-INF/weblogic.xml similarity index 97% rename from core/src/main/samples/docker-domain/simple-app/WEB-INF/weblogic.xml rename to samples/docker-domain/simple-app/WEB-INF/weblogic.xml index 3bfda546fd..93e03f08a1 100644 --- a/core/src/main/samples/docker-domain/simple-app/WEB-INF/weblogic.xml +++ b/samples/docker-domain/simple-app/WEB-INF/weblogic.xml @@ -1,5 +1,5 @@ - - - - /simple - + + + + /simple + diff --git a/core/src/main/samples/docker-domain/simple-app/simple.html b/samples/docker-domain/simple-app/simple.html similarity index 100% rename from core/src/main/samples/docker-domain/simple-app/simple.html rename to samples/docker-domain/simple-app/simple.html diff --git a/core/src/main/samples/docker-domain/simple-topology.yaml b/samples/docker-domain/simple-topology.yaml similarity index 97% rename from core/src/main/samples/docker-domain/simple-topology.yaml rename to samples/docker-domain/simple-topology.yaml index 02d0398ab8..919f3715bc 100644 --- a/core/src/main/samples/docker-domain/simple-topology.yaml +++ b/samples/docker-domain/simple-topology.yaml @@ -1,99 +1,99 @@ -domainInfo: - AdminUserName: weblogic - AdminPassword: welcome1 - ServerStartMode: dev -topology: - Name: my_domain - AdminServerName: AdminServer - Cluster: - mycluster: - ClientCertProxyEnabled: true - Server: - AdminServer: - Machine: machine1 - ListenPort: 7001 - SSL: - Enabled: true - ListenPort: 7002 - m1: - Machine: machine1 - ListenPort: 9003 - Cluster: mycluster - ServerStart: - ClassPath: '@@PWD@@/src/test/resources/nosuch.jar' - Arguments: '-Dosgi=true' - SSL: - Enabled: true - ListenPort: 9004 - m2: - Machine: machine1 - ListenPort: 9005 - Cluster: mycluster - ServerStart: - ClassPath: '@@PWD@@/src/test/resources/nosuch.jar' - Arguments: '-Dosgi=true' - SSL: - Enabled : true - ListenPort: 9006 - ServerTemplate: - template1: - Machine: machine1 - ListenPort: 9008 - SSL: - Enabled: true - ListenPort: 9009 - Machine: - machine1: - Notes: The only machine - NodeManager: - NMType: SSL - ListenPort: 5556 - Notes: The only node manager - SecurityConfiguration: - NodeManagerUsername: weblogic - NodeManagerPasswordEncrypted: welcome1 - JMX: - InvocationTimeoutSeconds: 40 - Notes: JMX notes - ManagedServerNotificationsEnabled: true - JTA: - MaxTransactions: 4 - Notes: JTA notes -resources: - JDBCStore: - JDBCStore99: - Notes: JDBC store notes - Target: m1 - DataSource: Generic1 - JDBCSystemResource: - Generic1: - Target: mycluster - JdbcResource: - JDBCDataSourceParams: - JNDIName: [ jdbc/generic1, jdbc/special1 ] - GlobalTransactionsProtocol: TwoPhaseCommit - JDBCDriverParams: - DriverName: oracle.jdbc.xa.client.OracleXADataSource - URL: 'jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=slc05til.us.oracle.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl.us.oracle.com)))' - PasswordEncrypted: welcome1 - Properties: - user: - Value: jshum - oracle.net.CONNECT_TIMEOUT: - Value: 5000 - oracle.jdbc.ReadTimeout: - Value: 30000 - JDBCConnectionPoolParams: - InitialCapacity: 3 - MaxCapacity: 15 - TestTableName: SQL ISVALID - TestConnectionsOnReserve: true -appDeployments: - Application: - # Quote needed because of hyphen in string - 'simple-app': - SourcePath: 'wlsdeploy/applications/simple-app.war' - Target: AdminServer - ModuleType: war - StagingMode: nostage - PlanStagingMode: nostage +domainInfo: + AdminUserName: weblogic + AdminPassword: welcome1 + ServerStartMode: dev +topology: + Name: my_domain + AdminServerName: AdminServer + Cluster: + mycluster: + ClientCertProxyEnabled: true + Server: + AdminServer: + Machine: machine1 + ListenPort: 7001 + SSL: + Enabled: true + ListenPort: 7002 + m1: + Machine: machine1 + ListenPort: 9003 + Cluster: mycluster + ServerStart: + ClassPath: '@@PWD@@/src/test/resources/nosuch.jar' + Arguments: '-Dosgi=true' + SSL: + Enabled: true + ListenPort: 9004 + m2: + Machine: machine1 + ListenPort: 9005 + Cluster: mycluster + ServerStart: + ClassPath: '@@PWD@@/src/test/resources/nosuch.jar' + Arguments: '-Dosgi=true' + SSL: + Enabled : true + ListenPort: 9006 + ServerTemplate: + template1: + Machine: machine1 + ListenPort: 9008 + SSL: + Enabled: true + ListenPort: 9009 + Machine: + machine1: + Notes: The only machine + NodeManager: + NMType: SSL + ListenPort: 5556 + Notes: The only node manager + SecurityConfiguration: + NodeManagerUsername: weblogic + NodeManagerPasswordEncrypted: welcome1 + JMX: + InvocationTimeoutSeconds: 40 + Notes: JMX notes + ManagedServerNotificationsEnabled: true + JTA: + MaxTransactions: 4 + Notes: JTA notes +resources: + JDBCStore: + JDBCStore99: + Notes: JDBC store notes + Target: m1 + DataSource: Generic1 + JDBCSystemResource: + Generic1: + Target: mycluster + JdbcResource: + JDBCDataSourceParams: + JNDIName: [ jdbc/generic1, jdbc/special1 ] + GlobalTransactionsProtocol: TwoPhaseCommit + JDBCDriverParams: + DriverName: oracle.jdbc.xa.client.OracleXADataSource + URL: 'jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=slc05til.us.oracle.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl.us.oracle.com)))' + PasswordEncrypted: welcome1 + Properties: + user: + Value: jshum + oracle.net.CONNECT_TIMEOUT: + Value: 5000 + oracle.jdbc.ReadTimeout: + Value: 30000 + JDBCConnectionPoolParams: + InitialCapacity: 3 + MaxCapacity: 15 + TestTableName: SQL ISVALID + TestConnectionsOnReserve: true +appDeployments: + Application: + # Quote needed because of hyphen in string + 'simple-app': + SourcePath: 'wlsdeploy/applications/simple-app.war' + Target: AdminServer + ModuleType: war + StagingMode: nostage + PlanStagingMode: nostage diff --git a/core/src/main/samples/docker-domain/weblogic-deploy.zip.download b/samples/docker-domain/weblogic-deploy.zip.download similarity index 100% rename from core/src/main/samples/docker-domain/weblogic-deploy.zip.download rename to samples/docker-domain/weblogic-deploy.zip.download From 60535579989115a38f39914e1579127464ec8c05 Mon Sep 17 00:00:00 2001 From: Richard Killen Date: Thu, 21 Jun 2018 14:36:51 -0400 Subject: [PATCH 09/17] Issue #130 - change script permissions back to executable --- samples/docker-domain/build-archive.sh | 0 samples/docker-domain/build.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 samples/docker-domain/build-archive.sh mode change 100644 => 100755 samples/docker-domain/build.sh diff --git a/samples/docker-domain/build-archive.sh b/samples/docker-domain/build-archive.sh old mode 100644 new mode 100755 diff --git a/samples/docker-domain/build.sh b/samples/docker-domain/build.sh old mode 100644 new mode 100755 From 6102f253036fc44baceb0eac9573d0fdf9a8c0fe Mon Sep 17 00:00:00 2001 From: Richard Killen Date: Fri, 22 Jun 2018 17:24:43 -0400 Subject: [PATCH 10/17] Use environment variables in createDomain, corrected how-to --- samples/docker-domain/Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/samples/docker-domain/Dockerfile b/samples/docker-domain/Dockerfile index 7609148af7..21d67405eb 100644 --- a/samples/docker-domain/Dockerfile +++ b/samples/docker-domain/Dockerfile @@ -12,9 +12,13 @@ # HOW TO BUILD THIS IMAGE # ----------------------- # Put all downloaded files in the same directory as this Dockerfile +# Build the deployment archive file using the build-archive.sh script. +# $ ./build-archive.sh +# # Run: # $ sudo docker build \ # --build-arg WDT_MODEL=simple-topology.yaml \ +# --build-arg WDT_ARCHIVE=archive.zip \ # -t 12213-domain-wdt . # # Pull base image @@ -67,9 +71,9 @@ RUN chmod +xw /u01/oracle/*.sh && \ if [ -n "$WDT_MODEL" ]; then MODEL_OPT="-model_file /u01/$WDT_MODEL"; fi && \ if [ -n "$WDT_ARCHIVE" ]; then ARCHIVE_OPT="-archive_file /u01/$WDT_ARCHIVE"; fi && \ /u01/weblogic-deploy/bin/createDomain.sh \ - -oracle_home /u01/oracle \ + -oracle_home $ORACLE_HOME \ -java_home ${JAVA_HOME} \ - -domain_parent /u01/oracle/user_projects/domains \ + -domain_parent $PRE_DOMAIN_HOME \ -domain_type WLS \ $MODEL_OPT \ $ARCHIVE_OPT && \ From daafc3851621361cea8aaaa42190e46580e96455 Mon Sep 17 00:00:00 2001 From: rkillen Date: Fri, 22 Jun 2018 16:26:29 -0500 Subject: [PATCH 11/17] Issue #130 - Updated README.md from review comments --- samples/docker-domain/README.md | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/samples/docker-domain/README.md b/samples/docker-domain/README.md index daecdcf76c..99ed0fb033 100644 --- a/samples/docker-domain/README.md +++ b/samples/docker-domain/README.md @@ -1,18 +1,24 @@ -Example Image with a WLS Domain -================================ -This Dockerfile extends the Oracle WebLogic image by creating a sample WLS 12.2.1.3 domain and cluster from a WebLogic Deploy Tool model. +Example Image with a WLS Domain +=============================== +This Dockerfile extends the Oracle WebLogic image by creating a sample WLS 12.2.1.3 domain and cluster. Utility scripts are copied into the image, enabling users to plug Node Manager automatically into the Administration Server running on another container. -Utility scripts are copied into the image, enabling users to plug Node Manager automatically into the Administration Server running on another container. +The Dockerfile uses the createDomain script from the Oracle WebLogic Deploy Tooling (WDT) to create the domain from a text-based model file. More information about WDT is available in the README file for the WDT project in GitHub: -### WebLogic Deploy Tool +https://github.com/oracle/weblogic-deploy-tooling -The WebLogic Deploy Tool is used to create the domain image from a model file. Details about the tool and the model file format can be found in its GitHub project: +### WDT Model File and Archive -https://github.com/oracle/weblogic-deploy-tooling +This sample includes a basic WDT model, simple-topology.yaml, that describes the intended configuration of the domain within the Docker image. WDT models can be created and modified using a text editor, following the format and rule described in the README file for the WDT project in GitHub. + +Another option is to use the WDT discoverDomain tool to create a model. This process is also described in the WDT project's README file. A user can use the tool to analyze an existing domain, and create a model based on its configuration. The user may choose to customize the model before using it to create a new docker image. + +Domain creation may require the deployment of applications and libraries. This is accomplished by creating a zip archive with a specific structure, then referencing those items in the model. This sample creates and deploys a simple ZIP archive containing a small application WAR. That archive is built in the sample directory prior to creating the Docker image. + +When the WDT discoverDomain tool is used on an existing domain, a ZIP archive is created containing any necessary applications and libraries. The corresponding configuration for those applications and libraries is added to the model. ### How to Build and Run -**NOTE:** The image is based on a WebLogic image in the Docker store: store/oracle/weblogic:12.2.1.3 . Verify that you have access to download this image. +**NOTE:** The image is based on a WebLogic image in the Docker store: store/oracle/weblogic:12.2.1.3 . Download this image to your local repository before building the image. The WebLogic Deploy Tool installer is required to build this image. Add weblogic-deploy.zip to the sample directory. @@ -26,9 +32,10 @@ To build this sample, run: $ docker build \ --build-arg WDT_MODEL=simple-topology.yaml \ + --build-arg WDT_ARCHIVE=archive.zip \ -t 12213-domain-wdt . -This will use the model file in the sample directory. +This will use the model file and archive in the sample directory. To start the containerized Administration Server, run: From 63f59d5b7b8c953e3b12ebf078a79c879f801ed8 Mon Sep 17 00:00:00 2001 From: Richard Killen Date: Fri, 22 Jun 2018 17:33:22 -0400 Subject: [PATCH 12/17] Issue #130 - Added checksum to download file --- samples/docker-domain/weblogic-deploy.zip.download | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/docker-domain/weblogic-deploy.zip.download b/samples/docker-domain/weblogic-deploy.zip.download index e0c6153498..4ea8dd5f2f 100644 --- a/samples/docker-domain/weblogic-deploy.zip.download +++ b/samples/docker-domain/weblogic-deploy.zip.download @@ -2,4 +2,4 @@ # # - wget https://github.com/oracle/weblogic-deploy-tooling/releases/download/weblogic-deploy-tooling-0.11/weblogic-deploy.zip # - weblogic-deploy.zip +d35e83d969dd6a485409da6e9eca250f weblogic-deploy.zip From b815bf227236f524959909da629e28626f4bd497 Mon Sep 17 00:00:00 2001 From: Richard Killen Date: Fri, 22 Jun 2018 17:58:00 -0400 Subject: [PATCH 13/17] Issue #130 - Corrected domain parent value --- samples/docker-domain/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/docker-domain/Dockerfile b/samples/docker-domain/Dockerfile index 21d67405eb..7a369fac64 100644 --- a/samples/docker-domain/Dockerfile +++ b/samples/docker-domain/Dockerfile @@ -73,7 +73,7 @@ RUN chmod +xw /u01/oracle/*.sh && \ /u01/weblogic-deploy/bin/createDomain.sh \ -oracle_home $ORACLE_HOME \ -java_home ${JAVA_HOME} \ - -domain_parent $PRE_DOMAIN_HOME \ + -domain_parent $PRE_DOMAIN_HOME/domains \ -domain_type WLS \ $MODEL_OPT \ $ARCHIVE_OPT && \ From ae0d84149c9c7f97554b3caeaf57b10d8f9f7cfe Mon Sep 17 00:00:00 2001 From: Richard Killen Date: Thu, 28 Jun 2018 14:39:06 -0400 Subject: [PATCH 14/17] Issue #130 - Added script to start managed server --- .../container-scripts/domain.properties | 2 ++ .../container-scripts/startManagedServer.sh | 22 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 samples/docker-domain/container-scripts/startManagedServer.sh diff --git a/samples/docker-domain/container-scripts/domain.properties b/samples/docker-domain/container-scripts/domain.properties index c7b86823a2..3bb3ba820b 100644 --- a/samples/docker-domain/container-scripts/domain.properties +++ b/samples/docker-domain/container-scripts/domain.properties @@ -1,2 +1,4 @@ +DOMAIN_NAME=my_domain ADMIN_PORT=7001 ADMIN_HOST=wlsadmin +ADMIN_USER=weblogic diff --git a/samples/docker-domain/container-scripts/startManagedServer.sh b/samples/docker-domain/container-scripts/startManagedServer.sh new file mode 100644 index 0000000000..bb4a7c4e31 --- /dev/null +++ b/samples/docker-domain/container-scripts/startManagedServer.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +#Copyright (c) 2014-2018 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. +# +# Start the Domain. + +#Define DOMAIN_HOME +export DOMAIN_HOME=/u01/oracle/user_projects/domains/$DOMAIN_NAME + +mkdir -p $DOMAIN_HOME/servers/$MS_NAME/security +echo username=$ADMIN_USER > $DOMAIN_HOME/servers/$MS_NAME/security/boot.properties +echo password=$ADMIN_PASSWORD >> $DOMAIN_HOME/servers/$MS_NAME/security/boot.properties + +# Start Managed Server and tail the logs +${DOMAIN_HOME}/bin/startManagedWebLogic.sh $MS_NAME http://$ADMIN_HOST:$ADMIN_PORT +touch ${DOMAIN_HOME}/servers/$MS_NAME/logs/${MS_NAME}.log +tail -f ${DOMAIN_HOME}/servers/$MS_NAME/logs/${MS_NAME}.log & + +childPID=$! +wait $childPID From ad86a0f465dbb745704601fb9c911dc4aa5ee8ca Mon Sep 17 00:00:00 2001 From: Richard Killen Date: Thu, 28 Jun 2018 14:43:35 -0400 Subject: [PATCH 15/17] Issue #130 - Use dynamic cluster in model; use variables from file in model --- samples/docker-domain/Dockerfile | 1 + samples/docker-domain/simple-topology.yaml | 51 ++++++---------------- 2 files changed, 14 insertions(+), 38 deletions(-) diff --git a/samples/docker-domain/Dockerfile b/samples/docker-domain/Dockerfile index 7a369fac64..6501328819 100644 --- a/samples/docker-domain/Dockerfile +++ b/samples/docker-domain/Dockerfile @@ -75,6 +75,7 @@ RUN chmod +xw /u01/oracle/*.sh && \ -java_home ${JAVA_HOME} \ -domain_parent $PRE_DOMAIN_HOME/domains \ -domain_type WLS \ + -variable_file /u01/oracle/domain.properties \ $MODEL_OPT \ $ARCHIVE_OPT && \ chown -R oracle:oracle $PRE_DOMAIN_HOME diff --git a/samples/docker-domain/simple-topology.yaml b/samples/docker-domain/simple-topology.yaml index 919f3715bc..21dc6afd5e 100644 --- a/samples/docker-domain/simple-topology.yaml +++ b/samples/docker-domain/simple-topology.yaml @@ -1,47 +1,29 @@ domainInfo: - AdminUserName: weblogic + AdminUserName: '@@PROP:ADMIN_USER@@' AdminPassword: welcome1 ServerStartMode: dev topology: - Name: my_domain + Name: '@@PROP:DOMAIN_NAME@@' AdminServerName: AdminServer Cluster: mycluster: ClientCertProxyEnabled: true + ClusterMessagingMode: unicast + DynamicServers: + ServerTemplate: template1 + CalculatedListenPorts: false + MaximumDynamicServerCount: 2 + ServerNamePrefix: 'ms-' + DynamicClusterSize: 2 + MaxDynamicClusterSize: 8 Server: AdminServer: Machine: machine1 - ListenPort: 7001 - SSL: - Enabled: true - ListenPort: 7002 - m1: - Machine: machine1 - ListenPort: 9003 - Cluster: mycluster - ServerStart: - ClassPath: '@@PWD@@/src/test/resources/nosuch.jar' - Arguments: '-Dosgi=true' - SSL: - Enabled: true - ListenPort: 9004 - m2: - Machine: machine1 - ListenPort: 9005 - Cluster: mycluster - ServerStart: - ClassPath: '@@PWD@@/src/test/resources/nosuch.jar' - Arguments: '-Dosgi=true' - SSL: - Enabled : true - ListenPort: 9006 + ListenPort: '@@PROP:ADMIN_PORT@@' ServerTemplate: template1: Machine: machine1 - ListenPort: 9008 - SSL: - Enabled: true - ListenPort: 9009 + ListenPort: 9001 Machine: machine1: Notes: The only machine @@ -60,11 +42,6 @@ topology: MaxTransactions: 4 Notes: JTA notes resources: - JDBCStore: - JDBCStore99: - Notes: JDBC store notes - Target: m1 - DataSource: Generic1 JDBCSystemResource: Generic1: Target: mycluster @@ -84,10 +61,8 @@ resources: oracle.jdbc.ReadTimeout: Value: 30000 JDBCConnectionPoolParams: - InitialCapacity: 3 + InitialCapacity: 0 MaxCapacity: 15 - TestTableName: SQL ISVALID - TestConnectionsOnReserve: true appDeployments: Application: # Quote needed because of hyphen in string From 7423c43a13fd7d7283d011c024ae0a76e5b4d92e Mon Sep 17 00:00:00 2001 From: Richard Killen Date: Thu, 28 Jun 2018 17:09:38 -0400 Subject: [PATCH 16/17] Issue #130 - Deploy application to cluster, not admin server --- samples/docker-domain/simple-topology.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/docker-domain/simple-topology.yaml b/samples/docker-domain/simple-topology.yaml index 21dc6afd5e..5b6bef2320 100644 --- a/samples/docker-domain/simple-topology.yaml +++ b/samples/docker-domain/simple-topology.yaml @@ -68,7 +68,7 @@ appDeployments: # Quote needed because of hyphen in string 'simple-app': SourcePath: 'wlsdeploy/applications/simple-app.war' - Target: AdminServer + Target: mycluster ModuleType: war StagingMode: nostage PlanStagingMode: nostage From 6ba3a7091e4543b177c7e7472976d9c4e0fb46b2 Mon Sep 17 00:00:00 2001 From: rkillen Date: Thu, 28 Jun 2018 16:25:30 -0500 Subject: [PATCH 17/17] Issue#130 - Updated README.md with server start information --- samples/docker-domain/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/docker-domain/README.md b/samples/docker-domain/README.md index 99ed0fb033..aa9e91bcb4 100644 --- a/samples/docker-domain/README.md +++ b/samples/docker-domain/README.md @@ -41,17 +41,17 @@ To start the containerized Administration Server, run: $ docker run -d --name wlsadmin --hostname wlsadmin -p 7001:7001 --env-file ./container-scripts/domain.properties 12213-domain-wdt -TBD To start a containerized Managed Server (MS1) to self-register with the Administration Server above, run: +To start a containerized Managed Server (ms-1) to self-register with the Administration Server above, run: - $ docker run -d --name MS1 --link wlsadmin:wlsadmin -p 8001:8001 --env-file ./container-scripts/domain.properties -e ADMIN_PASSWORD= -e MS_NAME=MS1 --volumes-from wlsadmin 12213-domain createServer.sh + $ docker run -d --name ms-1 --link wlsadmin:wlsadmin -p 9001:9001 --env-file ./container-scripts/domain.properties -e ADMIN_PASSWORD= -e MS_NAME=ms-1 12213-domain-wdt startManagedServer.sh -TBD To start a second Managed Server (MS2), run: +To start an additional Managed Server (in this example ms-2), run: - $ docker run -d --name MS2 --link wlsadmin:wlsadmin -p 8002:8001 --env-file ./container-scripts/domain.properties -e ADMIN_PASSWORD= -e MS_NAME=MS2 --volumes-from wlsadmin 12213-domain createServer.sh + $ docker run -d --name ms-2 --link wlsadmin:wlsadmin -p 9002:9001 --env-file ./container-scripts/domain.properties -e ADMIN_PASSWORD= -e MS_NAME=ms-2 12213-domain-wdt startManagedServer.sh -The above scenario from this sample will give you a WebLogic domain with a cluster set up on a single host environment. +The above scenario from this sample will give you a WebLogic domain with a dynamic cluster set up on a single host environment. -You may create more containerized Managed Servers by calling the `docker` command above for `createServer.sh` as long you link properly with the Administration Server. For an example of a multihost environment, see the sample `1221-multihost`. +You may create more containerized Managed Servers by calling the `docker` command above for `startManagedServer.sh` as long you link properly with the Administration Server. For an example of a multihost environment, see the sample `1221-multihost`. # Copyright Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.