Skip to content

Commit 67a87a7

Browse files
authored
Merge pull request #758 from oracle/OWLS-71186
OWLS-71186 Update log home on PV sample
2 parents 806287e + f359bb0 commit 67a87a7

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

kubernetes/samples/scripts/common/utility.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# Copyright 2018, Oracle Corporation and/or its affiliates. All rights reserved.
2+
# Copyright 2018, 2019, Oracle Corporation and/or its affiliates. All rights reserved.
33
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
44

55
#
@@ -463,7 +463,7 @@ function createDomain {
463463
validateDomainSecret
464464

465465
# Validate the domain's persistent volume claim
466-
if [ "$doValidation" == true ]; then
466+
if [ "${doValidation}" == true ] && [ "${domainHomeInImage}" == false -o "${logHomeOnPV}" == true ]; then
467467
validateDomainPVC
468468
fi
469469

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ The following parameters can be provided in the inputs file.
104104
| `configuredManagedServerCount` | Number of Managed Server instances to generate for the domain. | `5` |
105105
| `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` is specified, the specified image needs to be built locally or pulled from a repository before the `create-domain.sh` script is executed. | |
106106
| `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, instead of WLST, to generate the domain configuration. | `./docker-images/OracleWebLogic/samples/12213-domain-home-in-image` |
107-
| `domainPVMountPath` | Mount path of the domain persistent volume. | `/shared` |
107+
| `domainPVMountPath` | Mount path of the domain persistent volume. This parameter is required if `logHomeOnPV` is true. Otherwise, it is ignored. | `/shared` |
108108
| `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` |
109109
| `exposeAdminNodePort` | Boolean indicating if the Administration Server is exposed outside of the Kubernetes cluster. | `false` |
110110
| `exposeAdminT3Channel` | Boolean indicating if the T3 administrative channel is exposed outside the Kubernetes cluster. | `false` |
@@ -114,12 +114,12 @@ The following parameters can be provided in the inputs file.
114114
| `includeServerOutInPodLog` | Boolean indicating whether to include `server.out` to the pod's stdout. | `true` |
115115
| `initialManagedServerReplicas` | Number of Managed Servers to initially start for the domain. | `2` |
116116
| `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` |
117-
| `logHomeOnPV` | Specifies whether the log home is stored on the persistent volume. | `false` |
118-
| `logHome` | The in-pod name of the directory to store the domain, node manager, server logs, and server .out files in. If not specified, the value is derived from the `domainUID` as `/shared/logs/<domainUID>`. | `/shared/logs/domain1` |
117+
| `logHomeOnPV` | Specifies whether the log home is stored on the persistent volume. If set to true, then you must specify the `logHome`, `persistentVolumeClaimName` and `domainPVMountPath` parameters.| `false` |
118+
| `logHome` | The in-pod name of the directory in which to store the domain, Node Manager, server logs, and server .out files. If not specified, the value is derived from the `domainUID` as `/shared/logs/<domainUID>`. This parameter is required if `logHomeOnPV` is true. Otherwise, it is ignored. | `/shared/logs/domain1` |
119119
| `managedServerNameBase` | Base string used to generate Managed Server names. | `managed-server` |
120120
| `managedServerPort` | Port number for each Managed Server. | `8001` |
121121
| `namespace` | Kubernetes namespace in which to create the domain. | `default` |
122-
| `persistentVolumeClaimName` | Name of the persistent volume claim. If not specified, the value is derived from the `domainUID` as `<domainUID>-weblogic-sample-pvc` | `domain1-weblogic-sample-pvc` |
122+
| `persistentVolumeClaimName` | Name of the persistent volume claim. If not specified, the value is derived from the `domainUID` as `<domainUID>-weblogic-sample-pvc`. This parameter is required if `logHomeOnPV` is true. Otherwise, it is ignored. | `domain1-weblogic-sample-pvc` |
123123
| `productionModeEnabled` | Boolean indicating if production mode is enabled for the domain. | `true` |
124124
| `serverStartPolicy` | Determines which WebLogic Servers will be started up. Legal values are `NEVER`, `IF_NEEDED`, `ADMIN_ONLY`. | `IF_NEEDED` |
125125
| `t3ChannelPort` | Port for the T3 channel of the NetworkAccessPoint. | `30012` |

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,16 @@ weblogicCredentialsSecretName: domain1-weblogic-credentials
6969
includeServerOutInPodLog: true
7070

7171
# Specifies whether the log home is stored on the persistent volume.
72+
# If set to true, then you must specify the 'logHome', 'persistentVolumeClaimName'
73+
# and 'domainPVMountPath' properties.
7274
# The default is false.
7375
logHomeOnPV: false
7476

75-
# The in-pod name of the directory to store the domain, node manager, server logs, and server .out
76-
# files in.
77+
# The in-pod name of the directory in which to store the domain, node manager, server logs,
78+
# and server .out files.
7779
# If not specified, the value is derived from the domainUID as /shared/logs/<domainUID>
80+
# This parameter is required if 'logHomeOnPV' is true.
81+
# Otherwise, it is ignored.
7882
logHome: /shared/logs/domain1
7983

8084
# Port for the T3Channel of the NetworkAccessPoint
@@ -103,9 +107,13 @@ javaOptions: -Dweblogic.StdoutDebugEnabled=false
103107

104108
# Name of the persistent volume claim
105109
# If not specified, the value is derived from the domainUID as <domainUID>-weblogic-sample-pvc
110+
# This parameter is required if 'logHomeOnPV' is true.
111+
# Otherwise, it is ignored.
106112
persistentVolumeClaimName: domain1-weblogic-sample-pvc
107113

108114
# Mount path of the domain persistent volume.
115+
# This parameter is required if 'logHomeOnPV' is true.
116+
# Otherwise, it is ignored.
109117
domainPVMountPath: /shared
110118

111119
# Base WebLogic binary image used to build the WebLogic domain image

0 commit comments

Comments
 (0)