Skip to content

Commit 032a33f

Browse files
committed
More changes
Signed-off-by: doxiao <[email protected]>
1 parent 3ebb87f commit 032a33f

File tree

5 files changed

+53
-6
lines changed

5 files changed

+53
-6
lines changed

kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,12 @@ The following parameters can be provided in the inputs file.
9393
| `clusterName` | Name of the WebLogic cluster instance to generate for the domain. | `cluster-1` |
9494
| `configuredManagedServerCount` | Number of Managed Server instances to generate for the domain. | `5` |
9595
| `domainHomeImageBase` | Base WebLogic binary image used to build the WebLogic domain image. The operator requires WebLogic Server 12.2.1.3.0 with patch 28076014 applied. Refer to [Weblogic Docker images](../../../../../site/weblogic-docker-images.md) for details on how to create one. If a different `domainHomeImageBase` (see Configuration table below) is specified, the specified image needs to be built locally or pulled from a repository before the `create-domain.sh` script is executed. | |
96+
<<<<<<< HEAD
9697
| `domainHomeImageBuildPath` | Location of the WebLogic "domain home in image" Docker image in `https://github.com/oracle/docker-images.git` project. If not specified, use "./docker-images/OracleWebLogic/samples/12213-domain-home-in-image-wdt". Another possible value is "./docker-images/OracleWebLogic/samples/12213-domain-home-in-image" which uses WLST scripts, instead of WDT, to generate the domain configuration. | `./docker-images/OracleWebLogic/samples/12213-domain-home-in-image-wdt` |
9798
| `domainPVMountPath` | Mount path of the domain persistent volume. | `/shared` |
99+
=======
100+
| `domainHomeImageBuildPath` | Location of the WebLogic "domain home in image" Docker image in `https://github.com/oracle/docker-images.git` project. If not specified, use "./docker-images/OracleWebLogic/samples/12213-domain-home-in-image". Another possible value is "./docker-images/OracleWebLogic/samples/12213-domain-home-in-image-wdt" which uses WDT scripts, instead of WLST, to generate the domain configuration. | `./docker-images/OracleWebLogic/samples/12213-domain-home-in-image` |
101+
>>>>>>> More changes
98102
| `domainUID` | Unique ID that will be used to identify this particular domain. Used as the name of the generated WebLogic domain as well as the name of the Kubernetes domain resource. This ID must be unique across all domains in a Kubernetes cluster. This ID cannot contain any character that is not valid in a Kubernetes service name. | `domain1` |
99103
| `exposeAdminNodePort` | Boolean indicating if the Administration Server is exposed outside of the Kubernetes cluster. | `false` |
100104
| `exposeAdminT3Channel` | Boolean indicating if the T3 administrative channel is exposed outside the Kubernetes cluster. | `false` |

kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/create-domain-inputs.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ domainPVMountPath: /shared
115115

116116
# Location of the WebLogic "domain home in image" Docker image sample in the
117117
# `https://github.com/oracle/docker-images.git` project.
118-
# If not specified, use "./docker-images/OracleWebLogic/samples/12213-domain-home-in-image-wdt".
119-
# Another possible value is "./docker-images/OracleWebLogic/samples/12213-domain-home-in-image",
120-
# which uses a WLST script, instead of WDT, to generate the domain configuration.
121-
domainHomeImageBuildPath: ./docker-images/OracleWebLogic/samples/12213-domain-home-in-image-wdt
122-
118+
# If not specified, use "./docker-images/OracleWebLogic/samples/12213-domain-home-in-image".
119+
# Another possible value is "./docker-images/OracleWebLogic/samples/12213-domain-home-in-image-wdt",
120+
# which uses a WDT script, instead of WLST, to generate the domain configuration.
121+
domainHomeImageBuildPath: ./docker-images/OracleWebLogic/samples/12213-domain-home-in-image

kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/properties-template.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ DB_PORT=1527
1111
DEBUG_FLAG=true
1212
DERBY_FLAG=true
1313
PRODUCTION_MODE_ENABLED=%PRODUCTION_MODE_ENABLED%
14+
CLUSTER_TYPE=%CLUSTER_TYPE%
1415
JAVA_OPTIONS=%JAVA_OPTIONS%
1516
T3_CHANNEL_PORT=%T3_CHANNEL_PORT%
1617
T3_PUBLIC_ADDRESS=%T3_PUBLIC_ADDRESS%

kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/create-domain.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,16 @@ function createDomainConfigmap {
146146
cp ${scriptDir}/common/* ${externalFilesTmpDir}/
147147
fi
148148
cp ${domainOutputDir}/create-domain-inputs.yaml ${externalFilesTmpDir}/
149-
149+
150150
# Set the domainName in the inputs file that is contained in the configmap.
151151
# this inputs file can be used by the scripts, such as WDT, that creates the WebLogic
152152
# domain in the job.
153153
echo domainName: $domainName >> ${externalFilesTmpDir}/create-domain-inputs.yaml
154154

155+
if [ -f ${externalFilesTmpDir}/prepare.sh ]; then
156+
sh ${externalFilesTmpDir}/prepare.sh -t ${clusterType} -i ${externalFilesTmpDir}
157+
fi
158+
155159
# create the configmap and label it properly
156160
local cmName=${domainUID}-create-weblogic-sample-domain-job-cm
157161
kubectl create configmap ${cmName} -n $namespace --from-file $externalFilesTmpDir
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
# Copyright 2018, Oracle Corporation and/or its affiliates. All rights reserved.
3+
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
4+
#
5+
6+
# Perform preparation based on the specified cluster type
7+
8+
function usage {
9+
echo usage: ${script} -t clusterTpe -i file [-h]
10+
echo " -i Directory, must be specified."
11+
echo " -t Cluster type, CONFIGURED or DYNAMIC, default is DYNAMIC."
12+
echo " -h Help"
13+
exit $1
14+
}
15+
16+
17+
while getopts "hi:t:" opt; do
18+
case $opt in
19+
i) externalFilesTmpDir="${OPTARG}"
20+
;;
21+
t) clusterType="${OPTARG}"
22+
;;
23+
h) usage 0
24+
;;
25+
*) usage 1
26+
;;
27+
esac
28+
done
29+
30+
echo Preparing the scripts with clusterType $clusterType
31+
32+
if [ "${clusterType}" = "CONFIGURED" ]; then
33+
source_model=${externalFilesTmpDir}/wdt_model_configured.yaml
34+
else
35+
source_model=${externalFilesTmpDir}/wdt_model_dynamic.yaml
36+
fi
37+
38+
cp $source_model ${externalFilesTmpDir}/wdt_model.yaml
39+

0 commit comments

Comments
 (0)