Updating the Liberty server configuration server.xml

To customize any Liberty server configuration, FTM uses the Liberty configuration drop-ins feature. Create an XML snippet for the server.xml configuration element and add it to the config-dropins.xml file in the component_name-dropins ConfigMap for the component. The files can have any name, but the extension must be .xml.

All FTM Java™ Platform, Enterprise Edition images have a default server.xml as part of the image. This server.xml cannot be changed, so FTM uses the Liberty configuration drop-ins feature to update the server configuration. The drop-ins feature enables users to drop snippets of XML to a specific location on the Liberty server. Liberty reads the snippets and either merges them with the main server.xml file or uses them to override the entire server.xml file. For more information, see Using the configuration drop-ins folder to specify server configuration in the Liberty documentation.

By default, the user registry configuration is added to the config-dropins.xml file in the drop-ins ConfigMap for the user interface components. It defines the fxhadmin primary user ID that can be used to log in to the development deployments without any additional user configuration.

In production deployments, the user normally configures their own registry authentication (for example, the LDAP registry) by using the server.xml customization mechanism. The user needs to explicitly define the basic or LDAP registry whenever the server.xml customization is configured.

Update the configuration for your component

To update the XML snippet, complete the following steps.
  1. Open the Red Hat® OpenShift® Container Platform user interface.
  2. List the ConfigMaps for your namespace.
  3. Open the correct drop-ins ConfigMap for the component. For example, ftm-component_name-engine-dropins is the dropins ConfigMap for the engine of your component.
  4. Click the ConfigMap.
  5. Go to the YAML tab and then add the XML snippet between the <server>...</server> tags within the data section for the config-dropins.xml key.
    The following example is a code snippet that can be used to override the default Liberty logging configuration.
    <server>
      <logging consoleLogLevel="AUDIT" traceFormat="BASIC" traceSpecification="\*=error">
      </logging>
    </server>
  6. Save and reload the YAML file to refresh the changes for the component.