Skip to content

Administrate the System Configuration


The configuration of SEAL Operator is kept in the Consul key value store and can be administrated by SEAL Operator CLI. Below the most common commands and options are being described.

Hint - best practice

Always export the current configuration of SEAL Operator before you attempt any changes. Make changes to the exported file and re-import the changed settings. This way you can be sure the current configuration is being used as basis.

Alternatively, you can use the Consul to change the SEAL Operator configuration.


Commands

export

The command exports the current configuration of SEAL Operator into a YAML file.

  • command: export

  • parameter: relative or absolute path and file name where to save the configuration in

  • example:

    operator config export <filename>.yml
    

get

The command reads the value for the system key given as parameter. If no file destination is given output goes to stdout.

  • command: get

  • parameter: name of the key, for example ALLOWED_OIDC_CLIENTS

  • example:

    operator config get ALLOWED_OIDC_CLIENTS --file data.txt
    

import

The command imports the configuration from the specified YAML file into the Consul key value store.

  • command: import

  • parameter: relative or absolute path and file name of the YAML file you want to import

  • example:

    operator config import <filename>.yml
    

set

The command sets the value for the system key given as parameter. Specify the value directly as second parameter or in a file via the --file option.

  • command: set

  • parameters:

  • examples:

    operator config set ALLOWED_OIDC_CLIENTS --file changed_template.json
    
    operator config set DPF_URL 'https://<dpf_server_name>:<port>/rest/dpf' --service operator-dpf
    

template

The command generates a JSON template for the key given as parameter. The template is saved to the file specified by the --file option. If no file is specified, the output goes to stdout. The changed template can be set as value by the command set.

  • command: template

  • parameter: ALLOWED_OIDC_CLIENTS

  • example:

    operator config template ALLOWED_OIDC_CLIENTS --file template.json
    

Hint - difference between template and get

The template command always generates a template. It does not consider the current value of the key. To get the current value of the key, use the get command instead.


update

The command imports the configuration from the specified YAML file into the Consul key value store. Unlike import, it only adds keys that do not exist yet. It does not change the values of existing keys.

  • command: update

  • parameter: relative or absolute path and file name of the YAML file you want to import

  • example:

    operator config update <filename>.yml
    

Options

--dc

This option specifies the Consul datacenter. By default, home is used. Available for export, get, import, set and update commands.

  • option: --dc

  • example:

    operator config export <filename>.yml --dc <datacenter_name>
    

--file

This option specifies the file where the output is to be saved or the input to be taken from. Available for get, set and template commands.

  • option: --file

  • example:

    operator config template ALLOWED_OIDC_CLIENTS --file template.json
    

--insecure

With the --insecure option, the client does not check the certificate. This is especially helpful when using self-signed certificates.

  • option: --insecure

  • example:

    operator config <command> --insecure
    

--json

This option checks whether the value is valid JSON before it is set. For ALLOWED_OIDC_CLIENTS, the check is always active. Available for the set command.

  • option: --json

  • example:

    operator config set <key> --file <value>.json --json
    

--purge

When this option is used with the import command, the old configuration is deleted before the import.

Caution - configuration deleted

--purge deletes the complete configuration in Consul before the import. Export the current configuration first so that you can restore it if needed.

  • option: --purge

  • example:

    operator config import <filename>.yml --purge
    

--service

This option specifies the service for which the key is read or set. Specify the service name used in Consul, for example operator-dpf. By default, any is used, which applies to all services. Available for get and set commands.

  • option: --service

  • example: Read the value of a service-specific key

    operator config get DPF_URL --service operator-dpf --insecure
    

--token

If the Consul key value store has been secured by a token, specify the token with this option. By default, no token is used. For more information about the token, refer to CONSUL_TOKEN.

  • option: --token

  • example: Export the configuration from a secured Consul key value store

    operator config export <filename>.yml --token <consul_token>
    

Back to top