Skip to content

Add information about wko4 targets #1246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion documentation/2.0/content/release-notes/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ This may require some changes to existing models in order to be parsed correctly


- Object lists in the `kubernetes` section of the model now should be specified in a hyphenated list format,
similar to how they appear in the domain resource file produced for [WebLogic Kubernetes Operator](https://oracle.github.io/weblogic-kubernetes-operator/userguide/managing-domains/domain-resource/).
similar to how they appear in the domain resource file produced for [WebLogic Kubernetes Operator](https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/domain-resource/).

```yaml
    clusters:
Expand Down
35 changes: 26 additions & 9 deletions documentation/2.0/content/userguide/target_env.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ These target environment configurations are included in the WebLogic Deploy Tool

#### The WebLogic Kubernetes Operator targets

You can use these targets to customize the model and create a domain resource file for use with WebLogic Kubernetes Operator. There are three targets for specific [domain home source types](https://oracle.github.io/weblogic-kubernetes-operator/userguide/managing-domains/choosing-a-model/):
You can use these targets to customize the model and create a domain resource file for use with WebLogic Kubernetes Operator. There are three targets for specific [domain home source types](https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/choosing-a-model/):

- `wko` for [Model in Image](https://oracle.github.io/weblogic-kubernetes-operator/userguide/managing-domains/model-in-image/) deployments
- `wko-dii` for Domain in Image deployments
- `wko-pv` for Domain in PV deployments
- `wko` and `wko4` for [Model in Image](https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/model-in-image/) deployments
- `wko-dii` and `wko4-dii` for Domain in Image deployments
- `wko-pv`and `wko4-pv` for Domain in PV deployments

Targets beginning with `wko` are for use with WebLogic Kubernetes Operator versions 3.*, and those beginning with `wko4` are for use with versions 4.0.0 and later.

Each of these targets provides this additional processing:

Expand All @@ -57,9 +59,9 @@ In addition, the `wko` target will replace credentials in the model with referen

#### The Verrazzano targets

You can use these targets to customize the model and create a Kubernetes resource file for use with Verrazzano. There are three targets for specific [domain home source types](https://oracle.github.io/weblogic-kubernetes-operator/userguide/managing-domains/choosing-a-model/):
You can use these targets to customize the model and create a Kubernetes resource file for use with Verrazzano. There are three targets for specific [domain home source types](https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/choosing-a-model/):

- `vz` for [Model in Image](https://oracle.github.io/weblogic-kubernetes-operator/userguide/managing-domains/model-in-image/) deployments
- `vz` for [Model in Image](https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/model-in-image/) deployments
- `vz-dii` for Domain in Image deployments
- `vz-pv` for Domain in PV deployments

Expand Down Expand Up @@ -101,7 +103,7 @@ WDT_MODEL_SECRETS_NAME_DIR_PAIRS=__weblogic-credentials__=/etc/my-secrets
```
For more details about using the `WDT_MODEL_SECRETS_NAME_DIR_PAIRS` environment variable, see [Model Tokens]({{< relref "/concepts/model#model-tokens" >}}) .

In WebLogic Kubernetes Operator [Model in Image](https://oracle.github.io/weblogic-kubernetes-operator/userguide/managing-domains/model-in-image/) environments, the environment variable `DOMAIN_UID` is automatically set from the value in the domain resource file. The variable `WDT_MODEL_SECRETS_NAME_DIR_PAIRS` is automatically set to the directory containing WebLogic admin credentials.
In WebLogic Kubernetes Operator [Model in Image](https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/model-in-image/) environments, the environment variable `DOMAIN_UID` is automatically set from the value in the domain resource file. The variable `WDT_MODEL_SECRETS_NAME_DIR_PAIRS` is automatically set to the directory containing WebLogic admin credentials.

#### The create secrets script

Expand Down Expand Up @@ -130,6 +132,22 @@ kubernetes:
```
These fields will override the values in the output file, and the file would be rewritten with the revised values. List values in the model will be combined with existing values in the output file. For example, if `my-cluster` was in the original output file, the model content for `my-cluster` would be merged with it, overriding the `replicas` value. If `my-cluster` was not in the original output file, it would be added to the list of clusters.

When creating a resource file for WebLogic Kubernetes Operator version 4.0.0 and later, the `kubernetes` section of the model has to be structured differently. This is because there are multiple documents in the resource file for those versions. This example uses `domain` and `cluster` folders that will merge with the corresponding documents in the resource file:
```yaml
kubernetes:
domain:
spec:
domainHome: /etc/domainHome
image: my-image
clusters:
- spec:
clusterName: my-cluster
replicas: 4
- spec:
clusterName: other-cluster
replicas: 6
```

### Target environment configuration files

A target environment is configured in a JSON file at this location:
Expand Down Expand Up @@ -157,7 +175,6 @@ Here is an example of a target environment file:
"variable_injectors" : {"PORT": {},"HOST": {},"URL": {}},
"validation_method" : "lax",
"credentials_method" : "secrets",
"credentials_output_method" : "script",
"exclude_domain_bin_contents": true,
"wls_credentials_name" : "__weblogic-credentials__",
"use_persistent_volume" : true,
Expand Down Expand Up @@ -199,7 +216,7 @@ This field specifies a name for use with the WDT_MODEL_SECRETS_NAME_DIR_PAIRS en

#### `use_persistent_volume`

This field specifies if the domain is to be created for the Domain in PV [domain home source type](https://oracle.github.io/weblogic-kubernetes-operator/userguide/managing-domains/choosing-a-model/). If set to `true`, volume information will be added to the Kubernetes resource file that is generated.
This field specifies if the domain is to be created for the Domain in PV [domain home source type](https://oracle.github.io/weblogic-kubernetes-operator/managing-domains/choosing-a-model/). If set to `true`, volume information will be added to the Kubernetes resource file that is generated.

#### `additional_secrets`

Expand Down