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.

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 Icon of a bullseyebutton 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.

Create a WDT Model File

To create a WDT model file for use with the WebLogic Deploy Tooling:

  1. On the Projects / Providers page, select Create, then New WDT Model File Provider.

  2. Enter a name for the WDT model file provider.

  3. In the New WDT Model Filename field, enter a file name for the WDT model file. Include the file type extension, either .yaml or .json. Then, select Browse Folder and browse to the directory where you want to save the new WDT model file.

  4. Select Done to create the WDT model file.

  5. 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.

  6. 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.

  1. On the Projects / Providers page, select Create, then Existing WDT Model File Provider.

  2. Enter a name for the WDT model file provider.

  3. Select Upload File and browse to the directory with the WDT model file.

    The WDT model file must be in YAML or JSON format.

  4. Select Done to create the WDT model file.

  5. 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.

  6. Select Connect/Activate to start editing the WDT model file.

Edit a WDT Model File

To make changes to a WDT model file:

  1. Open the WDT model file that you want to edit.

  2. Beside the domain configuration that you want to modify, select Field Settings Icon of a bullseye to open the Field Settings dialog box.

  3. 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.
  4. Select Save to update the YAML file with your changes.

If you want to restore fields to their default value, open the Field Settings Icon of a bullseye 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).

  1. Save the WDT model file in WebLogic Remote Console. Make a note of the location of the YAML file on your computer.

  2. Download the latest version of WDT from the WDT GitHub Repository.

  3. Follow the instructions in the WDT Documentation for creating a domain from a WDT model file.