Customizing a Decision Center time zone

You might need to change the default JVM setting for the time zone in Decision Center as it is set to Central European Time (CET), by default. By changing a JVM argument to a different time zone, you can change the dates and calendars you see in the user interface.

Before you begin

You can customize the JVM arguments in an ODM for production instance at installation time, or use the default settings. The jvmOptionsRef parameters in the custom resources .yaml file can be used. For more information, see ODM for production parameters.

About this task

When you install an ODM instance the following configmap files are created, which define the default Liberty server JVM arguments for each ODM component.

Table 1. Naming convention for configmap files
Component Name of configmap
Decision Center <instance_name>-odm-dc-jvm-options-configmap
Decision Runner <instance_name>-odm-dr-jvm-options-configmap
Decision Server Console <instance_name>-odm-ds-console-jvm-options-configmap
Decision Server Runtime <instance_name>-odm-ds-runtime-jvm-options-configmap

Where <instance_name> is the name you gave to the operator when you configured it.

By default, the only JVM argument in the Decision Center configmap file is the time zone.

-Duser.timezone=Europe/Paris

Procedure

  1. Create a jvm.options file with the new settings for the liberty JVM.
    The name must be jvm.options as it replaces the default file in the container.
    Tip: If you do need to add multiple options in Decision Center or in the other components, separate the options by using the \n separator.
    -Dprop1=val1\n-Dprop2=val2
  2. Create a configmap with a key that corresponds to the component that you want to modify.
    The following keys must be used:
    • Decision Center: dc-jvm-options
    • Decision Runner: dr-jvm-options
    • Decision Server Console: dsc-jvm-options
    • Decision Server Runtime: dsr-jvm-options

    To create a JVM options configmap for Decision Center for example, enter the following command:

    $ kubectl create configmap my-odm-dc-jvm-options-configmap --from-file=dc-jvm-options=jvm.options
    
  3. Associate the new configmap to the application definition by using the jvmOptionsRef parameter in the custom resources .yaml file that the operator used to deploy ODM.

    For example, to change the logging in Decision Center use the following YAML:

    decisionCenter:
       jvmOptionsRef: my-odm-dc-jvm-options-configmap
  4. Modify the existing containers by running the kubectl apply command on the custom resources .yaml file.
    $ kubectl apply -f custom_resources.yaml

Results

The operator modifies the application to use the new configmap and updates the /config/configDropins/overrides/jvm.options file.