Skip to content

Commit f264ce1

Browse files
authored
Documentation for WKO template changes (#758)
* JIRA WDT-461 - Documentation for WKO template changes, also adding wls_credentials_name description
1 parent f415316 commit f264ce1

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

site/config/target_env.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ Here is an example of a target environment file:
4141
"variable_injectors" : {"PORT": {},"HOST": {},"URL": {}},
4242
"validation_method" : "lax",
4343
"credentials_method" : "secrets",
44-
"additional_output" : "vz"
44+
"wls_credentials_name" : "__weblogic-credentials__",
45+
"additional_output" : "binding.yaml,model.yaml"
4546
}
4647
```
4748
Each of the fields in this example is optional, and can be customized.
@@ -68,22 +69,29 @@ This field specifies how credentials in the model should be handled. There are t
6869

6970
In both these cases, the script to create the Kubernetes secrets is written to `<output-directory>/create_k8s_secrets.sh`. You will need to update this script with credential values before executing
7071

72+
#### `wls_credentials_name`
73+
74+
This field specifies a name for use with the WDT_MODEL_SECRETS_NAME_DIR_PAIRS environment variable to identify administration credential Secrets for the domain. This is useful when those Secrets are stored in a directory that does not follow the `<directory>/<name>/<key>` convention. For more information about using the WDT_MODEL_SECRETS_NAME_DIR_PAIRS environment variable, see [Model Tokens](../model.md#model-tokens).
75+
7176
#### `additional_output`
7277

73-
This field can be used to create additional output for use in the target environment. The key `vz` is currently the only valid value for this field. It indicates that the tool should create additional Kubernetes resource files for use with the Verrazzano product.
78+
This field can be used to create additional output for use in the target environment. The value is a comma-separated list of template files in the `$WLSDEPLOY_HOME/lib/target/<target-name>` directory. These templates are populated with information derived from the model, and written to a file with the same name in the specified output directory.
79+
80+
Template files can be customized for specific environments. The recommended method is to copy the original template to a custom configuration directory as described above, such as `$WDT_CUSTOM_CONFIG/target/<target-name>/model.yaml`. The copied file can then be edited as needed, while maintaining the original for reference.
7481

7582
### Pre-configured Target Environments
7683

7784
These target environment configurations are included in the WebLogic Deploy Tooling installation.
7885

79-
#### The Oracle Weblogic Server Kubernetes Operator Target
86+
#### The Oracle WebLogic Server Kubernetes Operator Target
8087

8188
This target environment can be applied by providing the command-line argument `-target wko`. It will provide this additional processing:
8289

8390
- The `wko_operator_filter.py` filter will be applied to remove model elements that are not compatible with the Kubernetes environment
8491
- Variables will be injected into the model for port, host, and URL attributes
8592
- `lax` validation will be applied for the resulting model
8693
- Credentials in the model will be replaced with references to Kubernetes secrets, and a script to create those secrets will be produced
94+
- An additional Kubernetes resource file, `model.yaml`, will be produced, with cluster and naming information derived from the model
8795

8896
#### The Verrazzano Target
8997
This target environment can be applied by providing the command-line argument `-target vz`. It will provide this additional processing:

site/prepare.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,28 @@ The Prepare Model Tool prepares WDT model files for deploying to specific target
66
- Replacing credential and attribute values with WDT macros
77
- Generating a UNIX shell script that will help with creating any required Kubernetes secrets
88
- Generating a variable properties file to customize attribute values
9+
- Generating any additional configuration files to configure the target environment
910
- Updating the model file(s)
1011

1112

1213
To use the Prepare Model Tool, simply run the `prepareModel` shell script with the correct arguments. To see the list of valid arguments, simply run the shell script with the `-help` option (or with no arguments) for usage information.
1314

14-
For example, to prepare model files for use with Oracle Weblogic Server Kubernetes Operator, run the tool with `-target k8s` as follows:
15+
For example, to prepare model files for use with Oracle Weblogic Server Kubernetes Operator, run the tool with `-target wko` as follows:
1516
```
16-
$WLSDEPLOY_HOME/bin/prepareModel.sh -oracle_home /u01/wls12213 -model_file model1.yaml, model2.yaml -target k8s -output_dir $HOME/k8soutput
17+
$WLSDEPLOY_HOME/bin/prepareModel.sh -oracle_home /u01/wls12213 -model_file model1.yaml, model2.yaml -target wko -output_dir $HOME/wko-output
1718
```
1819

1920
In the output directory, you will find:
2021
```
22+
model.yaml
2123
model1.yaml
2224
model2.yaml
2325
create_k8s_secrets.sh
24-
k8s_variable.properties
26+
wko_variable.properties
2527
```
2628

2729

28-
You can then customize the `k8s_variable.properties` and `create_k8s_secrets.sh` to provide environment-specific values.
30+
You can then customize the `wko_variable.properties` and `create_k8s_secrets.sh` to provide environment-specific values.
2931

3032

3133
For more information about additional target environments and options, see [Target Environments](config/target_env.md).

0 commit comments

Comments
 (0)