You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-23Lines changed: 19 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -847,40 +847,36 @@ When creating the archive, the tool will try to gather all binaries, scripts, an
847
847
848
848
## The Variable Injector Tool
849
849
850
-
The variable injector tool is used to tokenize a model with variables. You assign a value for a variable in an external variable properties file. This facilitates using the same domain model to create new domains in different environments. You can run the variable injector tool as an option in the Discover Domain tool, or you can update a model with variables with the stand-alone command line interface.
850
+
The variable injector tool is used to tokenize a model with variables. The values for these variables are assigned using an external property file. This facilitates using the same domain model to create new domains in different environments. The variable injector tool can be run as an option in the Discover Domain tool, or or from the stand-alone command line interface.
851
851
852
-
To enable the Variable Injector during the Discover Domain, you place a json file named model_variable_injector.json into the \<WLSDEPLOY\>/lib directory. You create this file, and it contains pre-defined keywords and/or a CUSTOM list of files. A keyword points to, and the custom file is, an injector directive file. The tool applies the directives to the attributes in a model, and if the directive matches an attribute, then a property token with a unique variable name is injected into the attribute. The variable name and model value are placed into the external variable properties file. Variable injection on an attribute is only performed once. The property token is not replaced by any subsequent matches.
852
+
To enable the Variable Injector during the Discover Domain, create a variable injector configuration by placing a json file named model_variable_injector.json into the \<WLSDEPLOY\>/lib directory using one or more of the pre-defined keywords and/or a CUSTOM list of files. A keyword points toan injector directive file. The tool applies the directives to the attributes in a model, and if the directive matches an attribute, then a property token with a unique variable name is injected into the model and replaces the attribute value. The variable name and model attribute value are placed into the external variable properties file.
853
853
854
-
The Discover Domain tool calls the variable injector after the model has been discovered and all filters run. After variable injection, the model and variable file are validated with the validator tool.
854
+
NOTE: Variable injection on an attribute is only performed once. The property token is not replaced by any subsequent matches.
855
+
856
+
If variable injection is enabled, the Discover Domain Tool calls the variable injector after the model has been discovered and after all filters run, but before model validation.
855
857
856
858
The supported keywords are as follows:
857
859
858
-
- CREDENTIALS
859
-
All MBean credentials attribute values (user and password) are injected with a variable property string and the string and value placed in the variable property file
860
+
- CREDENTIALS - All MBean credentials attribute values (user and password) are injected with a variable.
860
861
861
-
- HOST
862
-
All MBean Host attribute values in the model are injected with a variable property string and the string and value placed in the variable property file
862
+
- HOST - All MBean Host attribute values in the model are injected with a variable.
863
863
864
-
- PORT
865
-
All MBean Port attribute values in the model are injected with a variable property string and the string and value placed in the variable property file
864
+
- PORT - All MBean Port attribute values in the model are injected with a variable.
866
865
867
-
- TARGET
868
-
All MBean Target attribute values in the model are injected with a variable property string and the string and value placed in the variable property file
866
+
- TARGET - All MBean Target attribute values in the model are injected with a variable.
869
867
870
-
- TOPOLOGY
871
-
Special MBean attributes found in the topology section of the model are injected with a variable property string and the string value placed in the variable
872
-
property file. This includes server, machine and node manager ports, credentials and listen addresses, and cluster messaging modes, addresses and ports.
868
+
- TOPOLOGY - Common environmental MBean attributes found in the topology section of the model are injected with a variable.
869
+
This includes server, machine and node manager ports, credentials and listen addresses, and cluster messaging modes, addresses and ports.
873
870
874
-
- URL
875
-
All MBean URL attribute values in the model are injected with a variable property string and the string and value placed in the variable property file
871
+
- URL - All MBean URL attribute values in the model are injected with a variable.
876
872
877
-
Note that these keywords are defined in a file installed into the \<WLSDEPLOY\>/lib folder. Each keyword points to an injector json file that is located in the \<WLSDEPLOY\>/lib/injectors folder. An injector file contains directives specific to the keyword. You can look at these files to help your create your own CUSTOM injector file.
873
+
NOTE: The directives used by each pre-defined keyword are defined in an injector json file that is located in the \<WLSDEPLOY\>/lib/injectors folder. These files should not be changed, but could be used as .
878
874
879
875
Here is an example of a model_variable_injector.json file using the PORT keyword.
To specify the name and location of the variable properties file, you use the argument `-variable_properties_file` on the discover domain command line. If you use this command line argument, the model variable injector file must exist in the \<WLSDEPLOY\>/lib directory. If the model variable injector file exists in the directory, but the command line argument is not used, the variable properties file is created as follows: If the model_file command line argument is used on the Discover Domain run, the properties file name and location will be the same as the model file, with the file extension `.properties`. If only the archive file argument is present, the archive file name and location will be used.
930
+
To specify the name and location of the variable properties file for the Discover Tool, use the argument `-variable_properties_file` on the command line. Usage of the variable_properties_file argument without the presence of the model variable injector file in the \<WLSDEPLOY\>/lib directory will cause an error condition and the tool will exit. If the model variable injector file exists in the directory, but the command line argument is not used, the variable properties file is created with the following defaults: If the model_file command line argument is used on the Discover Domain run, the properties file name and location will be the same as the model file, with the file extension `.properties`. If only the archive file argument is present, the archive file name and location will be used.
935
931
936
932
As with the archive and model file, each run of the discover domain tool will overwrite the contents of an existing variable property file with the values from the current run.
937
933
938
934
### Custom Variable Injector
939
935
940
-
You designate custom injector directives using the CUSTOM keyword in the model_variable_injector.json. The CUSTOM keyword requires a a list of one or more custom injector directive json files.
936
+
To designate custom injector directives, use the CUSTOM keyword in the model_variable_injector.json. The CUSTOM keyword requires a a list of one or more custom injector directive json files.
941
937
942
-
An injector directive contains a key that identifies an attribute to be tokenized, and an optional set of directive properties. The key is a period separated MBean hierarchy and attribute name as they are defined in the model. Do not enter the name of the model section into the injector key.
938
+
An injector directive contains a key that identifies an attribute to be tokenized, and an optional set of directive properties. The key is a period separated MBean hierarchy and attribute name as they are defined in the model. Always exclude the name of the model section from the injector key.
943
939
944
940
For example, an injector key for the Server SSL Listen Port is as below. This directive contains no additional properties.
945
941
946
942
```json
947
943
{
948
-
"Server.SSL.ListenPort": {},
944
+
"Server.SSL.ListenPort": {}
949
945
}
950
946
```
951
947
952
-
Note the hierarchy of MBeans in the model for the ListenPort attribute and note that the MBean name of AdminServer is NOT included in the directive:
948
+
NOTE: The hierarchy of MBeans in the model for the ListenPort attribute and note that the MBean name of AdminServer is NOT included in the directive:
0 commit comments