@@ -370,7 +370,7 @@ function initialize {
370
370
if [ ! -f ${apacheInput} ]; then
371
371
validationError " The template file ${apacheInput} for generating the apache-webtier deployment was not found"
372
372
fi
373
-
373
+
374
374
voyagerOperatorInput=" ${scriptDir} /voyager-operator.yaml"
375
375
if [ ! -f ${voyagerOperatorInput} ]; then
376
376
validationError " The file ${voyagerOperatorInput} for Voyager Operator was not found"
@@ -466,6 +466,14 @@ function createYamlFiles {
466
466
enabledPrefix=" " # uncomment the feature
467
467
disabledPrefix=" # " # comment out the feature
468
468
469
+ # For backward compatability, default to "store/oracle/weblogic:12.2.1.3" if not defined in
470
+ # create-weblogic-domain-inputs.yaml
471
+ if [ -z " ${weblogicImage} " ]; then
472
+ weblogicImage=" store/oracle/weblogic:12.2.1.3"
473
+ fi
474
+ # Must escape the ':' value in weblogicImage for sed to properly parse and replace
475
+ weblogicImage=$( echo ${weblogicImage} | sed -e " s/\:/\\ \:/g" )
476
+
469
477
# Generate the yaml to create the persistent volume
470
478
echo Generating ${domainPVOutput}
471
479
@@ -503,6 +511,7 @@ function createYamlFiles {
503
511
cp ${createJobInput} ${createJobOutput}
504
512
sed -i -e " s:%NAMESPACE%:$namespace :g" ${createJobOutput}
505
513
sed -i -e " s:%WEBLOGIC_CREDENTIALS_SECRET_NAME%:${weblogicCredentialsSecretName} :g" ${createJobOutput}
514
+ sed -i -e " s:%WEBLOGIC_IMAGE%:${weblogicImage} :g" ${createJobOutput}
506
515
sed -i -e " s:%WEBLOGIC_IMAGE_PULL_SECRET_NAME%:${weblogicImagePullSecretName} :g" ${createJobOutput}
507
516
sed -i -e " s:%WEBLOGIC_IMAGE_PULL_SECRET_PREFIX%:${weblogicImagePullSecretPrefix} :g" ${createJobOutput}
508
517
sed -i -e " s:%DOMAIN_UID%:${domainUID} :g" ${createJobOutput}
@@ -523,6 +532,7 @@ function createYamlFiles {
523
532
524
533
cp ${deleteJobInput} ${deleteJobOutput}
525
534
sed -i -e " s:%NAMESPACE%:$namespace :g" ${deleteJobOutput}
535
+ sed -i -e " s:%WEBLOGIC_IMAGE%:${weblogicImage} :g" ${deleteJobOutput}
526
536
sed -i -e " s:%WEBLOGIC_CREDENTIALS_SECRET_NAME%:${weblogicCredentialsSecretName} :g" ${deleteJobOutput}
527
537
sed -i -e " s:%WEBLOGIC_IMAGE_PULL_SECRET_NAME%:${weblogicImagePullSecretName} :g" ${deleteJobOutput}
528
538
sed -i -e " s:%WEBLOGIC_IMAGE_PULL_SECRET_PREFIX%:${weblogicImagePullSecretPrefix} :g" ${deleteJobOutput}
@@ -550,6 +560,7 @@ function createYamlFiles {
550
560
sed -i -e " s:%DOMAIN_UID%:${domainUID} :g" ${dcrOutput}
551
561
sed -i -e " s:%DOMAIN_NAME%:${domainName} :g" ${dcrOutput}
552
562
sed -i -e " s:%ADMIN_SERVER_NAME%:${adminServerName} :g" ${dcrOutput}
563
+ sed -i -e " s:%WEBLOGIC_IMAGE%:${weblogicImage} :g" ${dcrOutput}
553
564
sed -i -e " s:%ADMIN_PORT%:${adminPort} :g" ${dcrOutput}
554
565
sed -i -e " s:%INITIAL_MANAGED_SERVER_REPLICAS%:${initialManagedServerReplicas} :g" ${dcrOutput}
555
566
sed -i -e " s:%EXPOSE_T3_CHANNEL_PREFIX%:${exposeAdminT3ChannelPrefix} :g" ${dcrOutput}
@@ -584,7 +595,24 @@ function createYamlFiles {
584
595
if [ " ${loadBalancer} " = " APACHE" ]; then
585
596
# Apache file
586
597
cp ${apacheInput} ${apacheOutput}
598
+
587
599
echo Generating ${apacheOutput}
600
+
601
+ if [ " ${loadBalancerExposeAdminPort} " = " true" ]; then
602
+ enableLoadBalancerExposeAdminPortPrefix=" ${enabledPrefix} "
603
+ else
604
+ enableLoadBalancerExposeAdminPortPrefix=" ${disabledPrefix} "
605
+ fi
606
+
607
+ if [ ! -z " ${loadBalancerVolumePath} " ]; then
608
+ enableLoadBalancerVolumePathPrefix=" ${enabledPrefix} "
609
+ sed -i -e " s:%LOAD_BALANCER_VOLUME_PATH%:${loadBalancerVolumePath} :g" ${apacheOutput}
610
+ else
611
+ enableLoadBalancerVolumePathPrefix=" ${disabledPrefix} "
612
+ fi
613
+
614
+ sed -i -e " s:%ENABLE_LOAD_BALANCER_EXPOSE_ADMIN_PORT%:${enableLoadBalancerExposeAdminPortPrefix} :g" ${apacheOutput}
615
+ sed -i -e " s:%ENABLE_LOAD_BALANCER_VOLUME_PATH%:${enableLoadBalancerVolumePathPrefix} :g" ${apacheOutput}
588
616
sed -i -e " s:%NAMESPACE%:$namespace :g" ${apacheOutput}
589
617
sed -i -e " s:%DOMAIN_UID%:${domainUID} :g" ${apacheOutput}
590
618
sed -i -e " s:%DOMAIN_NAME%:${domainName} :g" ${apacheOutput}
@@ -594,17 +622,6 @@ function createYamlFiles {
594
622
sed -i -e " s:%MANAGED_SERVER_PORT%:${managedServerPort} :g" ${apacheOutput}
595
623
sed -i -e " s:%LOAD_BALANCER_WEB_PORT%:$loadBalancerWebPort :g" ${apacheOutput}
596
624
sed -i -e " s:%WEB_APP_PREPATH%:$loadBalancerAppPrepath :g" ${apacheOutput}
597
-
598
- if [ ! -z " ${loadBalancerVolumePath} " ]; then
599
- sed -i -e " s:%LOAD_BALANCER_VOLUME_PATH%:${loadBalancerVolumePath} :g" ${apacheOutput}
600
- sed -i -e " s:# volumes:volumes:g" ${apacheOutput}
601
- sed -i -e " s:# - name:- name:g" ${apacheOutput}
602
- sed -i -e " s:# hostPath: hostPath:g" ${apacheOutput}
603
- sed -i -e " s:# path: path:g" ${apacheOutput}
604
- sed -i -e " s:# volumeMounts:volumeMounts:g" ${apacheOutput}
605
- sed -i -e " s:# - name:- name:g" ${apacheOutput}
606
- sed -i -e " s:# mountPath: mountPath:g" ${apacheOutput}
607
- fi
608
625
609
626
# Apache security file
610
627
cp ${apacheSecurityInput} ${apacheSecurityOutput}
0 commit comments