Skip to content

Commit 71477e3

Browse files
committed
Added README for configuring Operator
1 parent c0ff0d9 commit 71477e3

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

site/kubernetes.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
## Configuring Oracle WebLogic Server Kubernetes Operator
2+
3+
The Extract Domain Resource Tool can be used to create a domain resource file for use with the Oracle WebLogic Server Kubernetes Operator. This allows the domain configuration and the Kubernetes container configuration to be specified in a single model file.
4+
5+
The Extract Domain Resource Tool is available with WDT releases 1.7.0 and later.
6+
7+
More information about the Oracle WebLogic Server Kubernetes Operator can be found [here](https://github.com/oracle/weblogic-kubernetes-operator).
8+
9+
Here is an example command line for the Extract Domain Resource Tool:
10+
```
11+
<wls-deploy-home>/bin/extractDomainResource.sh -oracle_home /tmp/oracle -domain_home /u01/mydomain -model_file /tmp/mymodel.yaml -domain_resource_file /tmp/operator/domain-resource.yaml
12+
```
13+
14+
For the simplest case, the Extract Domain Resource Tool will create a sparse domain file. This is what is generated when there is not `kubernetes` section in the model, or that section is empty.
15+
```yaml
16+
apiVersion: weblogic.oracle/v6
17+
kind: Domain
18+
metadata:
19+
name: DemoDomain
20+
spec:
21+
domainHome: /u01/mydomain
22+
imagePullSecrets:
23+
- name: '--FIX ME--'
24+
webLogicCredentialsSecret: '--FIX ME--'
25+
clusters:
26+
- clusterName: mycluster
27+
replicas: 2
28+
- clusterName: mycluster3
29+
replicas: 4
30+
```
31+
32+
For this example, the user is expected to fill in the secrets information identified by `--FIX ME--` in the domain resource output. The value for `domainHome` was set from the command line. The `kind` and `name` were set to the domain name derived from the topology section of the model, or the default `base_domain`. The cluster entries are pulled from the topology section of the model, and their replica counts were derived from the number of servers for each cluster.
33+
34+
For more advanced configurations, the user can populate the `kubernetes` section of the WDT model, and those values will appear in the resulting domain resources file. This model section overrides and adds some values to the result.
35+
```yaml
36+
kubernetes:
37+
metadata:
38+
name: myName
39+
namespace: myNamespace
40+
spec:
41+
imagePullSecrets:
42+
WEBLOGIC_IMAGE_PULL_SECRET_NAME:
43+
webLogicCredentialsSecret:
44+
name: WEBLOGIC_CREDENTIALS_SECRET_NAME
45+
serverPod:
46+
env:
47+
USER_MEM_ARGS:
48+
value: '-XX:+UseContainerSupport -Djava.security.egd=file:/dev/./urandom'
49+
JAVA_OPTIONS:
50+
value: '-Dmydir=/home/me'
51+
```
52+
53+
For this example, the resulting domain resource file would contain:
54+
```yaml
55+
metadata:
56+
name: myName
57+
namespace: myNamespace
58+
spec:
59+
imagePullSecrets:
60+
- name: WEBLOGIC_IMAGE_PULL_SECRET_NAME
61+
webLogicCredentialsSecret:
62+
name: WEBLOGIC_CREDENTIALS_SECRET_NAME
63+
serverPod:
64+
env:
65+
- name: USER_MEM_ARGS
66+
value: '-XX:+UseContainerSupport -Djava.security.egd=file:/dev/./urandom'
67+
- name: JAVA_OPTIONS
68+
value: '-Dmydir=/home/me'
69+
domainHome: /u01/mine/domain
70+
clusters:
71+
- clusterName: mycluster
72+
replicas: 2
73+
- clusterName: mycluster3
74+
replicas: 4
75+
apiVersion: weblogic.oracle/v6
76+
kind: Domain
77+
```
78+
79+
The syntax of the `spec/serverPod/env` and other list sections in the WDT model are different from the syntax in the target file. The WDT tools do not recognize the hyphenated list syntax, so these elements are specified in a similar manner to other model lists.
80+
81+
If clusters are specified in the `kubernetes/spec` section of the model, those clusters will be configured in the domain resource file, and clusters from the `topology` section will be disregarded.
82+
83+
A full list of sections and variables supported by the Oracle WebLogic Server Kubernetes Operator is available [here](https://github.com/oracle/weblogic-kubernetes-operator/blob/master/docs/domains/Domain.md).
84+
85+
The Extract Domain Resource Tool supports a subset of these sections, including `metadata`, `serverPod`, and `spec`.
86+
87+
The content in the `kubernetes` section is not generated when a model is discovered by the Discover Domain Tool.

0 commit comments

Comments
 (0)