HOCON Configuration File: Command Line Generation

The epadmin command line supports HOCON configuration file generation as explained below.

Once generated, use the HOCON File Editor to validate your file as you customize it for your deployment scenario. The Editor validates StreamBase's extension of standard HOCON, which itself is an extension of standard JSON.

HOCON File Generation

Command syntax:

generate configuration [--type=<String>] --rootobject=<String> [--requiredonly=<Boolean>] 
--file=<local filename>

The components of this command are:

  • The rootobject parameter is required, and is the HOCON configuration root object desired. If the root object is unique across all configuration types, no type is required. If it is not, then a type is also required.

  • The required-only parameter is optional. If set to true, only the required properties are placed in the generated configuration file. The default of false generates a complete file with all supported properties. All generated properties are commented with their descriptions, with a header at the top noting that the file will not validate until comments are removed from required properties.

  • The file parameter is required. Use to specify the generated HOCON configuration file name, and optionally, a file path to send the configuration file.

A servicename, hostname, or adminport global parameter is required with the above command.

Command Examples

Example command syntax:

epadmin --servicename A.X generate configuration  --rootobject=object --file=myfile.conf

Example 1 generates a file named output.conf under the Best Bids and Asks sample's top-level folder in Studio:

epadmin --servicename=sample_bestbidsandasks_BestBidsAsks.sbuser generate configuration 
--rootobject=OIDCAuthenticationRealm --file=output.conf

The next examples exclude servicename, hostname, or adminport for simplicity:

Example 2 generates a configuration file for the OIDCAuthenticationRealm root object, which is a security type:

epadmin generate configuration --rootobject=OIDCAuthenticationRealm --file=myfile.conf

Example 3 also generates a configuration file for the OIDCAuthenticationRealm root object, but with only the required properties:

epadmin generate configuration --rootobject=OIDCAuthenticationRealm --file=myfile.conf --requiredonly

Example 4 specifies the security type and generates a configuration file for the OIDCAuthenticationRealm root object:

epadmin generate configuration --type=com.tibco.ep.dtm.configuration.security
--rootobject=OIDCAuthenticationRealm --file=myfile.conf
// This is a sample of the com.tibco.ep.dtm.configuration.security.OIDCAuthenticationRealm 
// configuration containing all possible properties. The contents as presented are not valid; 
// uncomment and replace sample values with valid values as needed.

name = "sample-OIDCAuthenticationRealm-document"
type = "com.tibco.ep.dtm.configuration.security"
version = "1.0.0"
configuration = {

  // An OIDC authentication realm contains settings that configure authentication using OIDC.
  OIDCAuthenticationRealm = {
...

List Command

The list command identifies available HOCON configuration types and root objects, using the following syntax:

epadmin list configuration [--type=<String>] [--rootobject=<String>]
  • The rootobject parameter is optional, and is the HOCON configuration root object desired.

  • The type parameter is optional, and is the HOCON configuration type desired.

A servicename, hostname, or adminport global parameter is required with the above command. For example:

epadmin --servicename A.X list configuration  --rootobject "^Secure.*"

list command examples:

epadmin list configuration
epadmin list configuration --type "^com.tibco.ep.dtm.configuration.*"
epadmin list configuration --rootobject "^Secure.*"
epadmin list configuration --type "^com.tibco.ep.dtm.configuration.*" --rootobject "^OIDC.*"

Using the list command without specifying rootobject or type will display every available HOCON configuration. For example:

epadmin --servicename=sample_bestbbidsandasks_BestBidsAsks.sbuser list configuration
[sample_bestbidsandasks_BestBidsAsks.sbuser] type = com.tibco.ep.dtm.configuration.application
[sample_bestbidsandasks_BestBidsAsks.sbuser] rootobject = ApplicationDefinition
[sample_bestbidsandasks_BestBidsAsks.sbuser] description = Application Definition

...