Skip to content

Commit da31c1c

Browse files
committed
Support WDT domain home in iamge sample
Signed-off-by: doxiao <[email protected]>
1 parent 0f73d3d commit da31c1c

File tree

3 files changed

+33
-6
lines changed

3 files changed

+33
-6
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ The following parameters can be provided in the inputs file.
7575
| `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` |
7676
| `exposeAdminNodePort` | Boolean indicating if the Administration Server is exposed outside of the Kubernetes cluster. | `false` |
7777
| `exposeAdminT3Channel` | Boolean indicating if the T3 administrative channel is exposed outside the Kubernetes cluster. | `false` |
78+
| `imagePath` | The relative directory of the WebLogic domain home in image Docker image in `https://github.com/oracle/docker-images.git` project under the `docker-images/OracleWebLogic/samples` directory. | `12213-domain-home-in-image-wdt` |
7879
| `includeServerOutInPodLog` | Boolean indicating whether to include server .out to the pod's stdout. | `true` |
7980
| `initialManagedServerReplicas` | Number of Managed Servers to initially start for the domain. | `2` |
8081
| `javaOptions` | Java options for starting the Administration and Managed Servers. A Java option can have references to one or more of the following pre-defined variables to obtain WebLogic domain information: `$(DOMAIN_NAME)`, `$(DOMAIN_HOME)`, `$(ADMIN_NAME)`, `$(ADMIN_PORT)`, and `$(SERVER_NAME)`. | `-Dweblogic.StdoutDebugEnabled=false` |

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,17 @@ exposeAdminNodePort: false
7070
# Name of the domain namespace
7171
namespace: default
7272

73-
#Java Option for Weblogic Server
73+
# Java Option for Weblogic Server
7474
javaOptions: -Dweblogic.StdoutDebugEnabled=false
7575

76-
#Base image used to build the domain home in image Docker image
77-
#If not specified, use the built-in base image oracle/weblogic:12.2.1.3-developer
76+
# Base image used to build the domain home in image Docker image
77+
# If not specified, use the built-in base image oracle/weblogic:12.2.1.3-developer
7878
baseImage: oracle/weblogic:12.2.1.3-developer
7979

80+
# The relative directory of the WebLogic domain home in image Docker image in the i
81+
# `https://github.com/oracle/docker-images.git` project under the `docker-images/OracleWebLogic/samples` directory.
82+
# If not specified, use 12213-domain-home-in-image-wdt.
83+
# Another possible value is 12213-domain-home-in-image which uses WLST script instead of WDT to
84+
# generate the domain home.
85+
imagePath: 12213-domain-home-in-image-wdt
86+

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

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,30 @@ function createFiles {
234234
function createDomainHome {
235235
cp ${domainPropertiesOutput} ./docker-images/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker_build
236236

237-
cd docker-images/OracleWebLogic/samples/12213-domain-home-in-image
237+
if [ -z $imagePath ]; then
238+
imagePath="12213-domain-home-in-image"
239+
fi
240+
241+
cd docker-images/OracleWebLogic/samples/${imagePath}
242+
usernameFile="properties/docker_build/domain_security.properties"
243+
passwordFile="properties/docker_build/domain_security.properties"
244+
245+
if [ ! -f $usernameFile ]; then
246+
usernameFile="properties/docker-build/adminuser.properties"
247+
passwordFile="properties/docker-build/adminpass.properties"
248+
fi
249+
250+
sed -i -e "s|myuser|${username}|g" $usernameFile
251+
sed -i -e "s|mypassword1|${password}|g" $passwordFile
252+
253+
if [ -f "build-archive.sh" ]; then
254+
sh ./build-archive.sh
255+
wget https://github.com/oracle/weblogic-deploy-tooling/releases/download/weblogic-deploy-tooling-0.14/weblogic-deploy.zip
256+
fi
238257

239-
sed -i -e "s|myuser|${username}|g" properties/docker_build/domain_security.properties
240-
sed -i -e "s|mypassword1|${password}|g" properties/docker_build/domain_security.properties
258+
chmod 777 . build.sh
241259

260+
sh ./build.sh
242261
if [ ! -z $baseImage ]; then
243262
sed -i -e "s|oracle/weblogic:12.2.1.3-developer|${baseImage}|g" Dockerfile
244263
fi

0 commit comments

Comments
 (0)