WDT Model Files
WDT metadata model files are descriptions of a WebLogic Server domain configuration. These models are not connected to a running WebLogic Server domain; you make edits to a model file and then use WebLogic Deploy Tooling (WDT) to build or modify live domains.
WDT model files are simplistic representations of a domain. They are generally written in YAML but WebLogic Remote Console also accepts models in JSON format. For brevity, a WDT model file only describes departures from the default configuration.
Note
WebLogic Remote Console does not validate the data that you insert into WDT model files. It will accept changes or values that are invalid and that will present problems when the model file is used to build or update a domain.
Use the Validate Model tool in WebLogic Deploy Tooling to ensure your model will generate a usable domain. See Validate Model Tool in WebLogic Deploy Tooling documentation.
WDT Model
topology:
Server:
AdminServer:
ManagedServer1:
Cluster: Cluster2
ManagedServer2:
Cluster: Cluster2
ManagedServer3:
ServerTemplate:
ServerTemplate1:
Cluster:
Cluster1:
DynamicServers:
ServerTemplate: ServerTemplate1
DynamicClusterSize: 3
Cluster2:
resources:
JDBCSystemResource:
DataSource1:
JdbcResource:
JDBCDriverParams:
DriverName: oracle.jdbc.replay.OracleXADataSourceImpl
URL: 'jdbc:oracle:thin:@//dbhost:1521/Database1'
JDBCDataSourceParams:
JNDIName: [
jdbc/myDS
]
GlobalTransactionsProtocol: TwoPhaseCommit
DatasourceType: GENERIC
Target: [
Cluster2
]
appDeployments:
Application:
Application1:
Target: [
Cluster1
]
SourcePath: /apps/benefits/benefits.war
StagingMode: default
WDT Model Tokens
Use a WDT model token to increase the flexibility of a WDT model file by replacing a fixed value with a dynamic one.
With WDT model tokens, you can create WDT model files that adapt based on the applicable WDT tokens. Rather than creating multiple WDT model files whose only difference is a few fixed values, you can create a single file and update the tokens as needed.
WebLogic Remote Console supports multiple types of WDT model tokens. All tokens follow this format: @@TYPE:KEY@@ where TYPE is the model token type and KEY is the variable value. For more information on the different types of WDT model tokens and their syntax, see Model Tokens in WebLogic Deploy Tooling.
To insert a WDT model token, select the Field Settings
button beside the relevant field to the Field Settings dialog box. WebLogic Remote Console supports two types of WDT model tokens:
- Standalone WDT model tokens
- WDT variables
Standalone WDT Model Tokens
Standalone WDT model token are tokens that replaced when the WDT model file is passed through WebLogic Deploy Tooling or through another external process. WebLogic Remote Console knows nothing about the value of the token and cannot update it.
WDT Variables
WDT variables allow you to manage WDT model tokens and their values from within WebLogic Remote Console. First, you create a property list with a set of tokens and their values, then you assign a property list to a WDT model file. After they are linked, any properties that you create in the property list become available to insert into the associated WDT model file. By centralizing model tokens in a property lists, you can easily update their values and review available tokens.
For more information, see Property Lists.
Each WDT model file can only pull from one property list, but you can use the same property list for multiple WDT model files.
Note
You can use both standalone WDT model tokens and WDT variables in the same WDT model file. This can be useful if you want to synchronize certain values and leave other values as slightly more static or to be changed by a later process.Create a WDT Model File
To create a WDT model file for use with the WebLogic Deploy Tooling:
-
On the Projects / Providers page, select Create, then New WDT Model File Provider.
-
Enter a name for the WDT model file provider.
-
In the New WDT Model Filename field, enter a file name for the WDT model file. Include the file type extension, either
.yamlor.json. Then, select Browse Folder and browse to the directory where you want to save the new WDT model file. -
Select Done to create the WDT model file.
-
Optional: On the WDT Model File Settings page, choose a property list provider to associate with the WDT model file. If you don’t have a property list provider, you can always add one later.
See Property Lists.
-
Select Connect/Activate to start editing the WDT model file.
Upload a WDT Model File
If you created a WDT model file elsewhere, you can upload it to WebLogic Remote Console and continue to edit it.
-
On the Projects / Providers page, select Create, then Existing WDT Model File Provider.
-
Enter a name for the WDT model file provider.
-
Select Upload File and browse to the directory with the WDT model file.
The WDT model file must be in
YAMLorJSONformat. -
Select Done to create the WDT model file.
-
Optional: On the WDT Model File Settings page, choose a property list provider to associate with the WDT model file. If you don’t have a property list provider, you can always add one later.
See Property Lists.
-
Select Connect/Activate to start editing the WDT model file.
Edit a WDT Model File
To make changes to a WDT model file:
Note
For guidance on where to find specific domain configuration options and how to apply them, review the tasks under Administration Server. The WDT Model Tree perspective is very similar to the Edit Tree perspective in an Administration Server provider.-
Open the WDT model file that you want to edit.
-
Beside the domain configuration that you want to modify, select Field Settings
to open the Field Settings dialog box. -
Set a new value for the field, using one of the following options:
Some options only appear when the WDT model file is associated with a property list.
Option Description Default (unset) Restore field to its default value. Select Value Select a reference to a component that exists in the current WDT model file. Enter Value Enter a fixed value. Enter Model Token Enter a WDT model token. Enter Unresolved Reference Enter a reference to a component that does not exist in the current WDT model file but will exist at a later point. Select Model Token Variable Select a WDT model token variable from the list of available options. The WDT model file must be connected with a property list to see this option. Create Model Token Variable Enter a Variable Name and Variable Value to create a new WDT model token variable. New model token variables are added to the connected property list. The WDT model file must be connected with a property list to see this option. -
Select Save to update the
YAMLfile with your changes.
If you want to restore fields to their default value, open the Field Settings
dialog box and select Unset value. Select OK to save the change.
Build a WebLogic Server Domain
When you’re satisfied with the properties of your WDT model file, you can transform it into a live WebLogic Server domain with WebLogic Deploy Tooling (WDT).
-
Save the WDT model file in WebLogic Remote Console. Make a note of the location of the
YAMLfile on your computer. -
Download the latest version of WDT from the WDT GitHub Repository.
-
Follow the instructions in the WDT Documentation for creating a domain from a WDT model file.