Skip to content

Commit 62259d7

Browse files
committed
Changes to domain home in image plus reverting an accidental change
Signed-off-by: doxiao <[email protected]>
1 parent aeb3e2c commit 62259d7

File tree

3 files changed

+22
-25
lines changed

3 files changed

+22
-25
lines changed

kubernetes/samples/scripts/create-weblogic-domain-pv-pvc/create-pv-pvc-inputs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ weblogicDomainStorageType: HOST_PATH
2626

2727
# Physical path of the persistent storage.
2828
# The following line must be uncomment and customized:
29-
weblogicDomainStoragePath: /scratch/k8s_dir
29+
#weblogicDomainStoragePath: /scratch/k8s_dir
3030

3131
# Reclaim policy of the persistent storage
3232
# The valid values are: 'Retain', 'Delete', and 'Recycle'

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,14 @@ function validateDomainSecret {
8888

8989
# Verify the secret contains a username
9090
SECRET=`kubectl get secret ${weblogicCredentialsSecretName} -n ${namespace} -o jsonpath='{.data}'| grep username: | wc | awk ' { print $1; }'`
91+
USERNAME=`kubectl get secret ${weblogicCredentialsSecretName} -n ${namespace} -o jsonpath='{.data}'| grep username: | awk ' { print $1; }'`
9192
if [ "${SECRET}" != "1" ]; then
9293
validationError "The domain secret ${weblogicCredentialsSecretName} in namespace ${namespace} does contain a username"
9394
fi
9495

9596
# Verify the secret contains a password
9697
SECRET=`kubectl get secret ${weblogicCredentialsSecretName} -n ${namespace} -o jsonpath='{.data}'| grep password: | wc | awk ' { print $1; }'`
98+
PASSWORD=`kubectl get secret ${weblogicCredentialsSecretName} -n ${namespace} -o jsonpath='{.data}'| grep password: | awk ' { print $1; }'`
9799
if [ "${SECRET}" != "1" ]; then
98100
validationError "The domain secret ${weblogicCredentialsSecretName} in namespace ${namespace} does contain a password"
99101
fi
@@ -349,6 +351,13 @@ function createDomainHome {
349351
cp ${domainPropertiesOutput} ./docker-images/OracleWebLogic/samples/12213-domain-home-in-image/properties/docker_build
350352

351353
cd docker-images/OracleWebLogic/samples/12213-domain-home-in-image
354+
355+
sed -i -e "s|myuser|${USERNAME}|g" properties/docker_build/domain_security.properties
356+
sed -i -e "s|mypassword1|${PASSWORD}|g" properties/docker_build/domain_security.properties
357+
358+
sed -i -e "s|myuser|${USERNAME}|g" properties/docker_run/security.properties
359+
sed -i -e "s|mypassword1|${PASSWORD}|g" properties/docker_run/security.properties
360+
352361
./build.sh
353362

354363
if [ "$?" != "0" ]; then

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

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ spec:
4444
# - "ADMIN_ONLY" will start up only the administration server (no managed servers will be started)
4545
# - "IF_NEEDED" will start all non-clustered servers, including the administration server and clustered servers up to the replica count
4646
serverStartPolicy: "%SERVER_START_POLICY%"
47+
env:
48+
- name: JAVA_OPTIONS
49+
value: "%JAVA_OPTIONS%"
50+
- name: USER_MEM_ARGS
51+
value: "-Xms64m -Xmx256m "
52+
volumes:
53+
- name: runtime-properties
54+
hostPath:
55+
path: "%RUNTIME_PROPERTIES%"
56+
volumeMounts:
57+
- mountPath: "/u01/oracle/properties"
58+
name: runtime-properties
4759
# adminServer is used to configure the desired behavior for starting the administration server.
4860
adminServer:
4961
# serverStartState legal values are "RUNNING" or "ADMIN"
@@ -56,35 +68,11 @@ spec:
5668
%EXPOSE_T3_CHANNEL_PREFIX%exportedNetworkAccessPoints:
5769
%EXPOSE_T3_CHANNEL_PREFIX% T3Channel: {}
5870
# an (optional) list of environment variable to be set on the server
59-
env:
60-
- name: JAVA_OPTIONS
61-
value: "%JAVA_OPTIONS%"
62-
- name: USER_MEM_ARGS
63-
value: "-Xms64m -Xmx256m "
64-
volumes:
65-
- name: runtime-properties
66-
hostPath:
67-
path: "%RUNTIME_PROPERTIES%"
68-
volumeMounts:
69-
- name: runtime-properties
70-
mountPath: "/u01/oracle/properties"
7171
# clusters is used to configure the desired behavior for starting member servers of a cluster.
7272
# If you use this entry, then the rules will be applied to ALL servers that are members of the named clusters.
7373
clusters:
7474
%CLUSTER_NAME%:
7575
serverStartState: "RUNNING"
7676
replicas: %INITIAL_MANAGED_SERVER_REPLICAS%
77-
env:
78-
- name: JAVA_OPTIONS
79-
value: "%JAVA_OPTIONS%"
80-
- name: USER_MEM_ARGS
81-
value: "-Xms64m -Xmx256m "
82-
volumes:
83-
- name: runtime-properties
84-
hostPath:
85-
path: "%RUNTIME_PROPERTIES%"
86-
volumeMounts:
87-
- name: runtime-properties
88-
mountPath: "/u01/oracle/properties"
8977
# The number of managed servers to start from clusters not listed in clusters
9078
# replicas: 1

0 commit comments

Comments
 (0)