@@ -117,7 +117,7 @@ export NODEMGR_HOME=${NODEMGR_HOME:-/shared/nodemanagers}
117
117
# values match the values in those macros.
118
118
119
119
export ADMIN_NAME=${ADMIN_NAME:- " admin-server" }
120
- export ADMIN_PORT=${ADMIN_PROT :- 7001}
120
+ export ADMIN_PORT=${ADMIN_PORT :- 7001}
121
121
export MANAGED_SERVER_NAME_BASE=${MANAGED_SERVER_NAME_BASE:- " managed-server" }
122
122
export DOMAIN_NAME=${DOMAIN_NAME:- " base_domain" }
123
123
@@ -241,7 +241,7 @@ function deployYamlTemplate() {
241
241
if [ -f " {test_home}/${yaml_file} " ]; then
242
242
kubectl -n $NAMESPACE delete -f ${test_home} /${yaml_file} \
243
243
--ignore-not-found \
244
- 2>&1 | tracePipe " kubectl output: "
244
+ 2>&1 | tracePipe " Info: kubectl output: "
245
245
rm -f ${test_home} /${yaml_file}
246
246
fi
247
247
@@ -250,7 +250,7 @@ function deployYamlTemplate() {
250
250
${SCRIPTPATH} /util_subst.sh -g ${yaml_file} t ${test_home} /${yaml_file} || exit 1
251
251
252
252
kubectl create -f ${test_home} /${yaml_file} \
253
- 2>&1 | tracePipe " kubectl output: " || exit 1
253
+ 2>&1 | tracePipe " Info: kubectl output: " || exit 1
254
254
}
255
255
256
256
# ############################################################################
@@ -265,13 +265,13 @@ createConfigMapFromDir() {
265
265
266
266
kubectl -n $NAMESPACE create cm ${cm_name} \
267
267
--from-file ${cm_dir} \
268
- 2>&1 | tracePipe " kubectl output: " || exit 1
268
+ 2>&1 | tracePipe " Info: kubectl output: " || exit 1
269
269
270
270
kubectl -n $NAMESPACE label cm ${cm_name} \
271
271
weblogic.createdByOperator=true \
272
272
weblogic.operatorName=look-ma-no-hands \
273
273
weblogic.resourceVersion=domain-v2 \
274
- 2>&1 | tracePipe " kubectl output: " || exit 1
274
+ 2>&1 | tracePipe " Info: kubectl output: " || exit 1
275
275
}
276
276
277
277
@@ -300,7 +300,7 @@ function deployDomainConfigMap() {
300
300
301
301
kubectl -n $NAMESPACE delete cm weblogic-domain-cm \
302
302
--ignore-not-found \
303
- 2>&1 | tracePipe " kubectl output: "
303
+ 2>&1 | tracePipe " Info: kubectl output: "
304
304
305
305
createConfigMapFromDir weblogic-domain-cm ${SOURCEPATH} /operator/src/main/resources/scripts
306
306
}
@@ -329,7 +329,7 @@ function deployTestScriptConfigMap() {
329
329
330
330
kubectl -n $NAMESPACE delete cm test-script-cm \
331
331
--ignore-not-found \
332
- 2>&1 | tracePipe " kubectl output: "
332
+ 2>&1 | tracePipe " Info: kubectl output: "
333
333
334
334
createConfigMapFromDir test-script-cm ${test_home} /test-scripts
335
335
@@ -413,7 +413,7 @@ function deployIntrospectJob() {
413
413
414
414
kubectl -n $NAMESPACE delete cm $introspect_output_cm_name \
415
415
--ignore-not-found \
416
- 2>&1 | tracePipe " kubectl output: "
416
+ 2>&1 | tracePipe " Info: kubectl output: "
417
417
418
418
# run introspection job
419
419
@@ -452,26 +452,31 @@ function deployPod() {
452
452
if [ -f " ${target_yaml} " ]; then
453
453
kubectl -n $NAMESPACE delete -f ${target_yaml} \
454
454
--ignore-not-found \
455
- 2>&1 | tracePipe " kubectl output: "
455
+ 2>&1 | tracePipe " Info: kubectl output: "
456
456
rm -f ${target_yaml}
457
457
fi
458
458
459
459
# Generate server pod yaml from template and deploy it
460
460
461
461
(
462
462
export SERVER_NAME=${server_name}
463
- # TBD SERVER_NAME should be derived from introspect results
463
+ # TBD SERVER_NAME, ADMIN_PORT, MANAGED_SERVER_PORT should be derived from introspect results
464
464
export SERVICE_NAME=` toDNS1123Legal ${DOMAIN_UID} -${server_name} `
465
465
export AS_SERVICE_NAME=` toDNS1123Legal ${DOMAIN_UID} -${ADMIN_NAME} `
466
+ if [ " ${SERVER_NAME} " = " ${ADMIN_NAME} " ]; then
467
+ export LOCAL_SERVER_DEFAULT_PORT=$ADMIN_PORT
468
+ else
469
+ export LOCAL_SERVER_DEFAULT_PORT=$MANAGED_SERVER_PORT
470
+ fi
466
471
${SCRIPTPATH} /util_subst.sh -g wl-pod.yamlt ${target_yaml} || exit 1
467
472
) || exit 1
468
473
469
474
kubectl create -f ${target_yaml} \
470
- 2>&1 | tracePipe " kubectl output: " || exit 1
475
+ 2>&1 | tracePipe " Info: kubectl output: " || exit 1
471
476
472
477
# Wait for pod to come up successfully
473
478
474
- tracen " Waiting for pod readiness"
479
+ tracen " Info: Waiting for pod readiness"
475
480
local status=" 0/1"
476
481
local startsecs=$SECONDS
477
482
local maxsecs=180
@@ -504,7 +509,7 @@ function deploySinglePodService() {
504
509
if [ -f " ${target_yaml} " ]; then
505
510
kubectl -n $NAMESPACE delete -f ${target_yaml} \
506
511
--ignore-not-found \
507
- 2>&1 | tracePipe " kubectl output: "
512
+ 2>&1 | tracePipe " Info: kubectl output: "
508
513
rm -f ${target_yaml}
509
514
fi
510
515
@@ -517,7 +522,7 @@ function deploySinglePodService() {
517
522
)
518
523
519
524
kubectl create -f ${target_yaml} \
520
- 2>&1 | tracePipe " kubectl output: " || exit 1
525
+ 2>&1 | tracePipe " Info: kubectl output: " || exit 1
521
526
522
527
local svc=" "
523
528
local startsecs=$SECONDS
@@ -561,14 +566,32 @@ deployIntrospectJob
561
566
# topology file
562
567
#
563
568
564
- deployPod ${ADMIN_NAME}
569
+ deployPod ${ADMIN_NAME?}
570
+
571
+ deploySinglePodService ${ADMIN_NAME?} ${ADMIN_PORT?} 30701
565
572
566
- deploySinglePodService ${ADMIN_NAME} 7001 30701
573
+ deployPod ${MANAGED_SERVER_NAME_BASE?} 1
567
574
568
- deployPod ${MANAGED_SERVER_NAME_BASE} 1
575
+ deploySinglePodService ${MANAGED_SERVER_NAME_BASE?} 1 ${MANAGED_SERVER_PORT?} 30801
569
576
570
577
#
571
578
# TBD potentially add additional checks to verify wl pods are healthy
572
579
#
573
580
581
+ # TBD 1 weblogic/welcome1 should be deduced via a base64 of the admin secret
582
+ # TBD 2 generate checkBeans.input instead of using a hard coded file, add more beans to check, and check mgd servers too
583
+
584
+ trace " Info: Checking beans to see if sit-cfg took effect. Input file 'checkBeans.input', output file '$test_home /checkBeans.out'."
585
+ kubectl cp checkBeans.input domain1-admin-server:/shared/checkBeans.input || exit 1
586
+ kubectl cp checkBeans.py domain1-admin-server:/shared/checkBeans.py || exit 1
587
+ kubectl exec -it domain1-admin-server \
588
+ wlst.sh /shared/checkBeans.py \
589
+ weblogic welcome1 t3://domain1-admin-server:7001 \
590
+ /shared/checkBeans.input \
591
+ > $test_home /checkBeans.out 2>&1
592
+ if [ $? -ne 0 ]; then
593
+ trace " Error: checkBeans failed, see '$test_home /checkBeans.out'."
594
+ exit 1
595
+ fi
596
+
574
597
trace " Info: success!"
0 commit comments