You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Generates a domain resource YAML file for use with the WebLogic Kubernetes Operator."
6
+
description: "Generates YAML resource files for use with the WebLogic Kubernetes Operator or Verrazzano."
7
7
---
8
8
9
9
10
10
#### Using WDT with WebLogic Kubernetes Operator
11
11
12
-
The Extract Domain Resource Tool can be used to create a domain resource file for use with the WebLogic Kubernetes Operator. This allows the domain configuration and the Kubernetes container configuration to be specified in a single model file.
12
+
You can use the Extract Domain Resource Tool to create resource files for use with the WebLogic Kubernetes Operator or Verrazzano. This allows the domain configuration and the Kubernetes container configuration to be specified in a single model file.
13
13
14
-
This is especially useful when making configuration changes to the domain that also need to be reflected in the domain resource file. For example, adding a cluster to the domain only requires that it be added to the `topology` section of the WDT model, then a new domain resource file can be generated to apply to Kubernetes.
14
+
This is especially useful when making configuration changes to the domain that also need to be reflected in the resource file. For example, adding a cluster to the domain only requires that it be added to the `topology` section of the WDT model, then a new resource file can be generated to apply to Kubernetes.
15
15
16
16
More information about the WebLogic Kubernetes Operator can be found [here](https://oracle.github.io/weblogic-kubernetes-operator).
17
17
18
-
{{% notice note %}} The Extract Domain Resource Tool is available with WDT releases 1.7.0 and later.
19
-
{{% /notice %}}
18
+
More information about Verrazzano can be found [here](https://verrazzano.io/latest/docs/).
20
19
21
20
Here is an example command line for the Extract Domain Resource Tool:
For the simplest case, the Extract Domain Resource Tool will create a sparse domain file. This is what is generated when there is not a `kubernetes` section in the model, or that section is empty.
27
-
```yaml
28
-
apiVersion: weblogic.oracle/v8
29
-
kind: Domain
30
-
metadata:
31
-
name: DemoDomain
32
-
spec:
33
-
domainHome: /u01/mydomain
34
-
image: '--FIX ME--'
35
-
imagePullSecrets:
36
-
- name: '--FIX ME--'
37
-
webLogicCredentialsSecret: '--FIX ME--'
38
-
configuration:
39
-
model:
40
-
domainType: WLS
41
-
clusters:
42
-
- clusterName: mycluster
43
-
replicas: 2
44
-
- clusterName: mycluster3
45
-
replicas: 4
46
-
```
25
+
For the simplest case, the Extract Domain Resource Tool will create resource files based on the templates corresponding to the `target` argument, using information from the command line and the domain sections of the model. Information about target types and templates can be found [here]({{< relref "/userguide/target_env.md" >}}).
47
26
48
-
In this example, the value for `domainHome` was set as an input parameter to the `extractDomainResource` script 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.
27
+
The value of the optional `-domain_home` argument will be applied in the template output. Domain name and UID fields in the template will use the domain name in the topology section of the model, or the default `base_domain`. The cluster entries will be pulled from the topology section of the model; their replica counts will have been derived from the number of servers for each cluster.
49
28
50
-
The user is expected to fill in the image and secrets information identified by `--FIX ME--` in the domain resource output.
29
+
The user is expected to fill in the image and secrets information identified by `--FIX ME--` in the resource output.
51
30
52
-
For more advanced configurations, including pre-populating the `--FIX ME--` values, 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.
31
+
For more advanced configurations, including pre-populating the `--FIX ME--` values, the user can populate the `kubernetes` section of the WDT model, and those values will appear in the resulting resource files. This model section overrides and adds some values to the result.
53
32
```yaml
54
33
kubernetes:
55
34
metadata:
@@ -76,7 +55,7 @@ kubernetes:
76
55
```
77
56
This example uses `@@PROP:mySecret@@` to pull the value for `webLogicCredentialsSecret` from the variables file specified on the command line. This can be done with any of the values in the `kubernetes` section of the model. More details about using model variables can be found [here]({{< relref "/concepts/model#simple-example" >}}).
78
57
79
-
For this example, the resulting domain resource file would contain:
58
+
Using the `wko` target with this example, the resulting domain resource file would contain:
80
59
```yaml
81
60
apiVersion: weblogic.oracle/v8
82
61
kind: Domain
@@ -109,13 +88,11 @@ spec:
109
88
replicas: 4
110
89
```
111
90
112
-
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.
91
+
If clusters are specified in the `kubernetes/spec` section of the model, those clusters will be combined with any clusters from the `topology` section of the model.
113
92
114
93
If the WDT model has a value of `Never` for `spec/imagePullPolicy`, the `imagePullSecrets` default value will not be added.
115
94
116
-
A full list of sections and variables supported by the WebLogic Kubernetes Operator is available [here](https://github.com/oracle/weblogic-kubernetes-operator/blob/main/documentation/domains/Domain.md).
117
-
118
-
The Extract Domain Resource Tool supports a subset of these sections, including `metadata`, `serverPod`, and `spec`.
95
+
A full list of sections and variables supported by the WebLogic Kubernetes Operator is available [here](https://github.com/oracle/weblogic-kubernetes-operator/blob/main/documentation/domains/Domain.md). The Extract Domain Resource Tool supports a subset of these sections, including `metadata`, `serverPod`, and `spec`.
119
96
120
97
The [Model Help Tool]({{< relref "/userguide/tools/model_help.md" >}}) can be used to determine the folders and attributes that can be used in the `kubernetes` section of the model. For example, this command will list the folders and attributes in the `spec` folder:
121
98
```yaml
@@ -128,8 +105,10 @@ The content in the `kubernetes` section is not generated when a model is discove
128
105
| Parameter | Definition | Default |
129
106
| ---- | ---- | ---- |
130
107
| `-archive_file` | The path to the archive file. If the `-model_file` argument is not specified, the model file in this archive will be used. This can also be specified as a comma-separated list of archive files. The overlapping contents in each archive take precedence over previous archives in the list. | |
131
-
| `-domain_home` | (Required) The domain home directory. | |
132
-
| `-domain_resource_file` | (Required) The location of the extracted domain resource file. | |
108
+
| `-domain_home` | The domain home directory to be used in output files. This will override any value in the model. | |
109
+
| `-domain_resource_file` | The location of the extracted domain resource file. This is deprecated, use `-output_dir` to specify output location. | |
133
110
| `-model_file` | The location of the model file. This can also be specified as a comma-separated list of model locations, where each successive model layers on top of the previous ones. | |
134
111
| `-oracle_home` | Home directory of the Oracle WebLogic installation. Required if the `ORACLE_HOME` environment variable is not set. | |
112
+
| `-output_dir` | The location for the target output files. | |
113
+
| `-target` | The target output type. The default is `wko`. | |
135
114
| `-variable_file` | The location of the property file containing the values for variables used in the model. This can also be specified as a comma-separated list of property files, where each successive set of properties layers on top of the previous ones. | |
0 commit comments