configUtility command

The configUtility command enables you to download configuration snippets from the Liberty Repository. The command also enables you to replace configuration snippet variables with your input values. The Liberty Repository config snippets are samples of Liberty server configurations for specific tasks.

For information about accessing and using the Liberty Repository, see Liberty Repository.


The command syntax is as follows:

configUtility action | configUtility configSnippet [options]
where action can take one of the following values:
Display a list of all configuration snippets in the repository.

Specify a string to filter the list to configuration snippets that have the specified string in the description. Enclose strings that contain spaces in double-quotation marks.

Display help information for a specified action.
Download the configuration snippet from the repository or use a local configuration snippet for variable substitution.

The configSnippet variable is the name of the configuration snippet. Run the configUtility find command to get the names of configuration snippets in the repository.


The following options are available for the configUtility install configSnippet command:
List all variable options in the configuration snippet. Return an empty list if the configuration snippet has no variables for substitution.
Replace configuration snippet variables found by the --info option with your input values. The utility identifies these variable using --v[variable]. Do not include the brackets ([]) in the command.
Optional. The utility writes the code snippet to the file specified by path instead of to the console screen. Add the provided code snippet to the server.xml configuration to include the specified file.
Optional. Specify the keystore password encoding. Supported encodings are xor and aes. The default encoding is xor.
Optional. Specify a key to be used when encoding using AES. This string is hashed to produce an encryption key which is used to encrypt and decrypt the password. Optionally, provide the key to the server by defining the variable wlp.password.encryption.key whose value is the key. If this option is not provided, a default key is used.
Use a configuration snippet from a local file system. You must specify the file path. This option replaces specifying a configuration snippet name.


The following examples demonstrate correct syntax:

configUtility find
configUtility find filter_string
configUtility find "filter string"
configUtility help
configUtility install configSnippet
configUtility install configSnippet --info
configUtility install configSnippet --vvariable=value
configUtility install configSnippet --createConfigFile=C:/wlp/usr/servers/server1/snippet-include.xml
configUtility install configSnippet --encoding=aes --key=myAESkey
configUtility install --useLocalFile=C:/wlp_temp/mySnippet.xml
Tip: If your option value has spaces, you must enclose it in double quotation marks ("). For example, if the file path for the --createConfigFile option is C:\Program Files\mySnipets\snippet-include.xml, specify --createConfigFile="C:/Program Files/mySnipets/snippet-include.xml" in the command.

Different operating systems and command line environments treat some characters differently. In many environments, you can redefine which characters are special and how they behave.

For Windows platformsBy default, in the Windows environment, if you have an exclamation point (!) in your input string, it must be escaped by the caret character (^). The following example has a value of a! encoded.
D:\Liberty\images\855\Liberty855\wlp\bin>securityUtility encode "a^!"

For some operating systems, you might need to use single quotation marks around arguments that are passed to the tool.

If you use a terminal emulator, make sure that your session is configured to use the same code page as your server.

Refer to your operating system, command shell, and terminal emulator documentation about special characters and code pages if you experience unexpected results.