|
1 | 1 | ---
|
2 |
| -title: "Tools Configuration" |
| 2 | +title: "Domain type definitions" |
3 | 3 | date: 2019-02-23T17:19:24-05:00
|
4 | 4 | draft: false
|
5 | 5 | weight: 2
|
6 | 6 | ---
|
7 | 7 |
|
8 | 8 |
|
9 |
| -#### Contents |
10 |
| - - [Tool property file](#tool-property-file) |
11 |
| - - [Model filters](#model-filters) |
12 |
| - - [Domain type definitions](#domain-type-definitions) |
13 |
| - - [Custom configuration](#custom-configuration) |
14 |
| - |
15 |
| - ### Tool property file |
16 |
| - You can configure or tune WebLogic Deploy Tooling tools using the tool property file. This property file is installed as `<weblogic-deploy>/lib/tool.properties`. You may change the value of any of the properties in this file to tune the WDT tool. Another option is to configure the tool properties in a Custom Configuration directory. Create the `tool.properties` file in the `$WDT_CUSTOM_CONFIG` directory. |
17 |
| - |
18 |
| - If a property is removed from the file, or a property value is incorrectly formatted, a `WARNING` message is logged and an internal default value used instead of the missing or bad value. |
19 |
| - |
20 |
| - | Property | Description | |
21 |
| - | -------- | ----- | |
22 |
| - | `connect.timeout` | The number of milliseconds that WLST waits for the online `connect` command to complete. A value of 0 means the operation will not timeout. | |
23 |
| - | `activate.timeout` | The number of milliseconds that WLST waits for the activation of configuration changes to complete. A value of -1 means the operation will not timeout. | |
24 |
| - | `deploy.timeout` | The number of milliseconds that WLST waits for the undeployment process to complete. A value of 0 means the operation will not timeout. | |
25 |
| - | `redeploy.timeout` | The number of milliseconds that WLST waits for the redeployment process to complete. A value of 0 means the operation will not timeout. | |
26 |
| - | `start.application.timeout` | The number of milliseconds that WLST waits for the start application process to complete. A value of 0 means the operation will not timeout. | |
27 |
| - | `stop.application.timeout` | The number of milliseconds that WLST waits for the stop application process to complete. A value of 0 means the operation will not timeout. | |
28 |
| - | `set.server.groups.timeout` | Specifies the amount of time the set server groups connection can be inactive before the connection times out. | |
29 |
| - |
30 |
| - ### Model filters |
31 |
| - |
32 |
| - WebLogic Deploy Tooling supports the use of model filters to manipulate the domain model. The Create Domain, Update Domain, and Deploy Applications Tool apply filters to the model after it is read, before it is validated and applied to the domain. The Discover Domain Tool applies filters to the model after it has been discovered, before the model is validated and written. |
33 |
| - |
34 |
| - Model filters are written in Jython, and must be compatible with the version used in the corresponding version of WLST. A filter must implement the method `filter_model(model)`, which accepts as a single argument the domain model as a Jython dictionary. This method can make any adjustments to the domain model that are required. Filters can be stored in any directory, as long as they can be accessed by WebLogic Deploy Tooling. |
35 |
| - |
36 |
| - The following filter example (`fix-password.py`) sets the password for two attributes in the `SecurityConfiguration` WLST folder. |
37 |
| - |
38 |
| - ```python |
39 |
| -def filter_model(model): |
40 |
| - if model and 'topology' in model: |
41 |
| - if 'SecurityConfiguration' in model['topology']: |
42 |
| - model['topology']['SecurityConfiguration']['CredentialEncrypted'] = 'welcome1' |
43 |
| - model['topology']['SecurityConfiguration']['NodeManagerPasswordEncrypted'] = 'welcome1' |
44 |
| - print 'Replaced SecurityConfiguration password' |
45 |
| - else: |
46 |
| - print 'SecurityConfiguration not in the model' |
47 |
| - ``` |
48 |
| - |
49 |
| - Model filters are configured by creating a `model_filters.json` file in the `WLSDEPLOY_HOME/lib` directory. This file has separate sections for filters to be applied for specific tools. |
50 |
| - |
51 |
| - Another option is to configure model filters in a [Custom configuration](#custom-configuration) directory. Create the `model_filters.json` file in the `$WDT_CUSTOM_CONFIG` directory. |
52 |
| - |
53 |
| - This example configures two filters for the Create Domain Tool: `fix-password.py` and `no-mail.py`, and one filter for the Discover Domain tool. |
54 |
| - |
55 |
| - ```json |
56 |
| - { |
57 |
| - "create": [ |
58 |
| - { "name": "fixPassword", "path": "/home/user/fix-password.py" }, |
59 |
| - { "name": "noMail", "path": "/home/user/no-mail.py" } |
60 |
| - ], |
61 |
| - "deploy": [ |
62 |
| - ], |
63 |
| - "discover": [ |
64 |
| - { "name": "noMail", "path": "/home/user/no-mail.py" } |
65 |
| - ], |
66 |
| - "update": [ |
67 |
| - ] |
68 |
| - } |
69 |
| - ``` |
70 |
| - |
71 |
| - ### Domain type definitions |
72 |
| - |
73 | 9 | WebLogic Deploy Tooling has an extensible domain type system. The three built-in domain types (`WLS`, `RestrictedJRF`, and `JRF`) are defined in JSON files of the same name in the `WLSDEPLOY_HOME/lib/typedefs` directory. For example, the `JRF` domain type is defined in the `WLSDEPLOY_HOME/lib/typedefs/JRF.json` file with similar content, as shown below.
|
74 | 10 |
|
75 | 11 | ```json
|
@@ -150,7 +86,7 @@ def filter_model(model):
|
150 | 86 |
|
151 | 87 | New domain types can be defined by creating a new JSON file with the same structure in the `WLSDEPLOY_HOME/lib/typedefs` directory.
|
152 | 88 |
|
153 |
| - Another option is to create this file in the [Custom configuration](#custom-configuration) directory `$WDT_CUSTOM_CONFIG/typedefs`. |
| 89 | + Another option is to create this file in the [Custom configuration]({{< relref "/userguide/tools-config/custom_config.md" >}}) directory `$WDT_CUSTOM_CONFIG/typedefs`. |
154 | 90 |
|
155 | 91 | For example, to define a `SOA` domain type for 12.2.1.3, add the `typedefs/SOA.json` file with similar content, as shown below.
|
156 | 92 |
|
@@ -234,49 +170,3 @@ def filter_model(model):
|
234 | 170 | ```
|
235 | 171 |
|
236 | 172 | The `targeting` attribute is not valid for WebLogic Server versions 12.2.1 and up.
|
237 |
| - |
238 |
| - |
239 |
| - ### Custom configuration |
240 |
| - |
241 |
| - WDT allows you to create or extend the pre-installed type definitions, model filters, variable injectors, and target environments. Starting with WDT 1.10.0, these additional configuration files can be stored outside the `$WLSDEPLOY_HOME/lib` directory. This allows the files to remain in place if the WDT installation is moved or upgraded to a new version. |
242 |
| - |
243 |
| - To use a separate configuration directory, set the `WDT_CUSTOM_CONFIG` environment variable to the directory to be used for configuration. For example: |
244 |
| - ``` |
245 |
| - export WDT_CUSTOM_CONFIG=/etc/wdtconfig |
246 |
| - ``` |
247 |
| - |
248 |
| - The customized configuration files should be named and organized the same way they would be under the `$WLSDEPLOY_HOME/lib` directory. For example: |
249 |
| - ``` |
250 |
| - /etc/wdtconfig |
251 |
| - injectors |
252 |
| - *.json (injector files) |
253 |
| - typedefs |
254 |
| - *.json (typedef files) |
255 |
| - targets |
256 |
| - my-target |
257 |
| - target.json |
258 |
| - *.py (filter files) |
259 |
| - model_filters.json |
260 |
| - model_variable_injector.json |
261 |
| - variable_keywords.json |
262 |
| - ``` |
263 |
| - This is a full set of files that can be configured. You will need only to add the files you have created or extended. Details for each configuration type are found at: |
264 |
| - - [Tool property file](#tool-property-file) |
265 |
| - - [Model filters](#model-filters) |
266 |
| - - [Type definitions](#domain-type-definitions) (See the following [Extending a type definition](#example-extending-a-type-definition) example.) |
267 |
| - - [Variable injection]({{< relref "/userguide/tools/variable_injection.md" >}}) |
268 |
| - - [The Prepare Model Tool]({{< relref "/userguide/tools/prepare.md" >}}); see [Target environments]({{< relref "/userguide/target_env.md" >}}). |
269 |
| - |
270 |
| - The WDT tools will look for each configuration file under `$WDT_CUSTOM_CONFIG` if specified, then under `$WLSDEPLOY_HOME/lib`. |
271 |
| - |
272 |
| - #### Example: Extending a type definition |
273 |
| - |
274 |
| - To extend the `WLS` type definition, follow these steps: |
275 |
| - - Create a directory to use for custom configurations, such as `/etc/wdtconfig`. |
276 |
| - - Define the `WDT_CUSTOM_CONFIG` environment variable to point to that directory. |
277 |
| - - Copy the file `$WLSDEPLOY_HOME/lib/typedefs/WLS.json` to the `$WDT_CUSTOM_CONFIG/typedefs` directory and rename it, for example `MY_WLS.json`. |
278 |
| - - Edit `MY_WLS.json` with any required changes. |
279 |
| - - Run the tool referencing the name of the new type definition, for example: |
280 |
| - ``` |
281 |
| - createDomain.cmd -oracle_home /wls12213 -domain_type MY_WLS ... |
282 |
| - ``` |
0 commit comments