Skip to content

Commit afdecba

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop_OWLS-76349
2 parents 21fe3b4 + 615c1a8 commit afdecba

File tree

49 files changed

+2296
-240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2296
-240
lines changed

docs-source/content/samples/simple/domains/domain-home-in-image/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ The following parameters can be provided in the inputs file.
149149
| `t3ChannelPort` | Port for the T3 channel of the NetworkAccessPoint. | `30012` |
150150
| `t3PublicAddress` | Public address for the T3 channel. This should be set to the public address of the Kubernetes cluster. This would normally be a load balancer address. <p/>For development environments only: In a single server (all-in-one) Kubernetes deployment, this may be set to the address of the master, or at the very least, it must be set to the address of one of the worker nodes. | If not provided, the script will attempt to set it to the IP address of the kubernetes cluster |
151151
| `weblogicCredentialsSecretName` | Name of the Kubernetes secret for the Administration Server's user name and password. | `domain1-weblogic-credentials` |
152+
| `serverPodCpuRequest`, `serverPodMemoryRequest`, `serverPodCpuCLimit`, `serverPodMemoryLimit` | The maximum amount of compute resources allowed, and minimum amount of compute resources required, for each server pod. Please refer to the Kubernetes documentation on `Managing Compute Resources for Containers` for details. | Resource requests and resource limits are not specified. |
152153

153154
Note that the names of the Kubernetes resources in the generated YAML files may be formed with the value of some of the properties specified in the `create-inputs.yaml` file. Those properties include the `adminServerName`, `clusterName` and `managedServerNameBase`. If those values contain any characters that are invalid in a Kubernetes service name, those characters are converted to valid values in the generated YAML files. For example, an uppercase letter is converted to a lowercase letter and an underscore `("_")` is converted to a hyphen `("-")`.
154155

docs-source/content/samples/simple/domains/domain-home-on-pv/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ The following parameters can be provided in the inputs file.
106106
| `t3PublicAddress` | Public address for the T3 channel. This should be set to the public address of the Kubernetes cluster. This would normally be a load balancer address. <p/>For development environments only: In a single server (all-in-one) Kubernetes deployment, this may be set to the address of the master, or at the very least, it must be set to the address of one of the worker nodes. | If not provided, the script will attempt to set it to the IP address of the Kubernetes cluster |
107107
| `weblogicCredentialsSecretName` | Name of the Kubernetes secret for the Administration Server's user name and password. If not specified, the value is derived from the `domainUID` as `<domainUID>-weblogic-credentials`. | `domain1-weblogic-credentials` |
108108
| `weblogicImagePullSecretName` | Name of the Kubernetes secret for the Docker Store, used to pull the WebLogic Server image. | `docker-store-secret` |
109-
109+
| `serverPodCpuRequest`, `serverPodMemoryRequest`, `serverPodCpuCLimit`, `serverPodMemoryLimit` | The maximum amount of compute resources allowed, and minimum amount of compute resources required, for each server pod. Please refer to the Kubernetes documentation on `Managing Compute Resources for Containers` for details. | Resource requests and resource limits are not specified. |
110110
Note that the names of the Kubernetes resources in the generated YAML files may be formed with the value of some of the properties specified in the `create-inputs.yaml` file. Those properties include the `adminServerName`, `clusterName` and `managedServerNameBase`. If those values contain any characters that are invalid in a Kubernetes service name, those characters are converted to valid values in the generated YAML files. For example, an uppercase letter is converted to a lowercase letter and an underscore `("_")` is converted to a hyphen `("-")`.
111111

112112
The sample demonstrates how to create a WebLogic domain home and associated Kubernetes resources for a domain that only has one cluster. In addition, the sample provides the capability for users to supply their own scripts to create the domain home for other use cases. The generated domain YAML file could also be modified to cover more use cases.

docs-source/content/samples/simple/domains/fmw-domain/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ The following parameters can be provided in the inputs file.
132132
| `t3PublicAddress` | Public address for the T3 channel. This should be set to the public address of the Kubernetes cluster. This would normally be a load balancer address. <p/>For development environments only: In a single server (all-in-one) Kubernetes deployment, this may be set to the address of the master, or at the very least, it must be set to the address of one of the worker nodes. | If not provided, the script will attempt to set it to the IP address of the Kubernetes cluster |
133133
| `weblogicCredentialsSecretName` | Name of the Kubernetes secret for the Administration Server's user name and password. If not specified, then the value is derived from the `domainUID` as `<domainUID>-weblogic-credentials`. | `domain1-weblogic-credentials` |
134134
| `weblogicImagePullSecretName` | Name of the Kubernetes secret for the Docker Store, used to pull the WebLogic Server image. | `docker-store-secret` |
135+
| `serverPodCpuRequest`, `serverPodMemoryRequest`, `serverPodCpuCLimit`, `serverPodMemoryLimit` | The maximum amount of compute resources allowed, and minimum amount of compute resources required, for each server pod. Please refer to the Kubernetes documentation on `Managing Compute Resources for Containers` for details. | Resource requests and resource limits are not specified. |
135136
| `rcuSchemaPrefix` | The schema prefix to use in the database, for example `SOA1`. You may wish to make this the same as the domainUID in order to simplify matching domains to their RCU schemas. | `domain1` |
136137
| `rcuDatabaseURL` | The database URL. | `database:1521/service` |
137138
| `rcuCredentialsSecret` | The Kubernetes secret containing the database credentials. | `domain1-rcu-credentials` |

docs-source/content/userguide/managing-domains/domain-resource.md

Lines changed: 72 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The following prerequisites must be fulfilled before proceeding with the creatio
2020

2121
* Make sure the WebLogic operator is running.
2222
* Create a Kubernetes namespace for the domain resource unless the intention is to use the default namespace.
23-
* Create the Kubernetes secrets `username` and `password` of the administrative account in the same Kubernetes namespace as the domain resource.
23+
* Create the Kubernetes secrets containing the `username` and `password` of the administrative account in the same Kubernetes namespace as the domain resource.
2424

2525
#### YAML files
2626

@@ -85,7 +85,7 @@ Elements related to overriding WebLogic domain configuration:
8585
* `configOverrideSecrets`: A list of names of the secrets for optional WebLogic configuration overrides.
8686

8787
Elements related to Kubernetes pod and service generation:
88-
* `serverPod`: Configuration affecting server pods.
88+
* `serverPod`: Configuration affecting server pods for WebLogic Server instances. Most entries specify standard Kubernetes content for pods that you may want the operator to include in pods generated for WebLogic Server instances, such as labels, annotations, volumes, or scheduling constraints, including anti-affinity.
8989
* `serverService`: Customization affecting ClusterIP Kubernetes services for WebLogic Server instances.
9090

9191
Sub-sections related to the Administration Server, specific clusters or specific Managed Servers:
@@ -97,7 +97,7 @@ The elements `serverStartPolicy`, `serverStartState`, `serverPod` and `serverSer
9797

9898
### Pod generation
9999

100-
The operator creates a pod for each running WebLogic Server instance. This pod will have a container based on the Docker image specified by the `image` field. Additional pod or container content can be specified using the elements under `serverPod`. This includes Kubernetes labels and annotations, additional volumes on the pod or volume mounts on the container, [resource requirements](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) or [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/).
100+
The operator creates a pod for each running WebLogic Server instance. This pod will have a container based on the Docker image specified by the `image` field. Additional pod or container content can be specified using the elements under `serverPod`. This includes Kubernetes sidecar and init containers, labels, annotations, volumes, volume mounts, scheduling constraints, including anti-affinity, [resource requirements](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) or [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/).
101101

102102
Prior to creating a pod, the operator replaces variable references allowing the pod content to be templates. The format of these variable references is `$(VARIABLE_NAME)` where *VARIABLE_NAME* is one of the variable names available in the container for the WebLogic Server instance. The default set of environment variables includes:
103103
* DOMAIN_NAME: The WebLogic domain name
@@ -106,3 +106,72 @@ Prior to creating a pod, the operator replaces variable references allowing the
106106
* SERVER_NAME: The WebLogic Server name
107107
* CLUSTER_NAME: The WebLogic cluster name, if this is a cluster member
108108
* LOG_HOME: The WebLogic log location as a file system path within the container
109+
110+
This example domain YAML specifies that pods for WebLogic Server instances in the "cluster-1" cluster will have a per-managed server volume and volume mount (similar to a Kubernetes StatefulSet), an init container to initialize some files in that volume, and anti-affinity scheduling so that the server instances are scheduled as much as possible on different nodes:
111+
112+
```
113+
# Copyright 2017, 2019, Oracle Corporation and/or its affiliates. All rights reserved.
114+
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
115+
#
116+
apiVersion: "weblogic.oracle/v5"
117+
kind: Domain
118+
metadata:
119+
name: domain1
120+
namespace: domains23
121+
labels:
122+
weblogic.resourceVersion: domain-v2
123+
weblogic.domainUID: domain1
124+
spec:
125+
domainHome: /u01/oracle/user_projects/domains/domain1
126+
domainHomeInImage: true
127+
image: "phx.ocir.io/weblogick8s/my-domain-home-in-image:12.2.1.3"
128+
imagePullPolicy: "IfNotPresent"
129+
imagePullSecrets:
130+
- name: ocirsecret
131+
webLogicCredentialsSecret:
132+
name: domain1-weblogic-credentials
133+
includeServerOutInPodLog: true
134+
serverStartPolicy: "IF_NEEDED"
135+
serverPod:
136+
env:
137+
- name: JAVA_OPTIONS
138+
value: "-Dweblogic.StdoutDebugEnabled=false"
139+
- name: USER_MEM_ARGS
140+
value: "-XX:+UseContainerSupport -Djava.security.egd=file:/dev/./urandom "
141+
142+
adminServer:
143+
serverStartState: "RUNNING"
144+
145+
clusters:
146+
- clusterName: cluster-1
147+
serverStartState: "RUNNING"
148+
serverPod:
149+
affinity:
150+
podAntiAffinity:
151+
preferredDuringSchedulingIgnoredDuringExecution:
152+
- labelSelector:
153+
matchExpressions:
154+
- key: "weblogic.clusterName"
155+
operator: In
156+
values:
157+
- cluster-1
158+
topologyKey: "kubernetes.io/hostname"
159+
volumes:
160+
- name: $(SERVER_NAME)-volume
161+
emptyDir: {}
162+
volumeMounts:
163+
- mountPath: /server-volume
164+
name: $(SERVER_NAME)-volume
165+
initContainers:
166+
- name: volumeinit
167+
image: "oraclelinux:7-slim"
168+
imagePullPolicy: IfNotPresent
169+
command: ["/usr/bin/sh"]
170+
args: ["echo", "Replace with command to initialize files in /init-volume"]
171+
volumeMounts:
172+
- mountPath: /init-volume
173+
name: $(SERVER_NAME)-volume
174+
replicas: 2
175+
```
176+
177+
The operator uses an "introspection" job to discover details about the WebLogic domain configuration, such as the list of clusters and network access points. The job pod for the introspector is generated using the `serverPod` entries for the administration server. Because the administration server name is not known until the introspection step is complete, the value of the `$(SERVER_NAME)` variable for the introspection job will be "introspector".

integration-tests/USECASES.MD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,7 @@ Configuration Overrides Usecases
162162
| Add initContainers with different names at different level | Add a multiple initContainers object at domain level and server level and verify all of the init containers are run before Weblogic server pods are started |
163163
| Add initContainers with same names at different level | Add a multiple initContainers object at domain level and server level and verify only the server level init containers are run before Weblogic server pods are started |
164164

165+
| Managed Coherence Tests | Use Case |
166+
| --- | --- |
167+
| Managed Coherence - Domain on PV | Sanity testing of managed coherence in domain on pv using WLST. The test adds data to be stored in the cache, retrieves it and clears the cache |
168+
| Managed Coherence - Domain in image | Sanity testing of managed coherence in domain in image using WLST. The test adds data to be stored in the cache, retrieves it and clears the cache |

0 commit comments

Comments
 (0)