Skip to content

Administrate the System Configuration


In an on-premise installation, the configuration of PLOSSYS Output Engine is kept in the Consul key value store and can be administrated by PLOSSYS CLI. In a cloud environment, the container-orchestration system is used for this.


Requirements

For the requirements for using PLOSSYS CLI, refer to PLOSSYS CLI.


Commands and Options

Usage: plossys config [options] [command]

Options:
  -V, --version                  output the version number
  --consul <value>               consul url (https://localhost:8500) (default: "https://localhost:8500")
  --insecure                     accept invalid https certificate from Consul server
  --htpasswd                     activate htpasswd syntax check for command set
  --json                         activate json syntax check for command set
  --file <value>                 input/output file for commands set/get
  --service <value>              name of the service without `seal-` for which to get or set parameters
  --token <value>                ACL token used to access Consul's key-/value store
  -h, --help                     display help for command

Commands:
  import [options] <configfile>  import new configuration

    required arguments:
      configfile: the path and name of the configuration file in YAML format
  update <configfile>            update configuration

    required arguments:
      configfile: the path and name of the configuration file in YAML format
  export <configfile>            export new configuration

    required arguments:
      configfile: the path and name of the target configuration file
  validate [options]             validate and correct configuration
  set <key> [<value>]            set configuration parameter

    required arguments:
      key: the name of the configuration parameter
      value: the value for the configuration parameter (not required if option --file is specified)
  get <key>                      get configuration parameter

    required arguments:
      key: the name of the configuration parameter
  template <key>                 get template for configuration parameter

    required arguments:
      key: the name of the configuration parameter
  help [command]                 display help for command

help

help displays the help for the command.

Usage: plossys config help [command]


export

export exports the current configuration as stored in Consul as YAML file.

Usage: plossys config export [options] <configfile>

Arguments:

  • configfile: path and name of the target configuration file, mandatory

Examples:

  • plossys config export export.yml

    Exports the configuration and save it to the file export.yml in the current directory.

  • plossys config export export.yml --insecure

    Exports the configuration and save it to the file export.yml in the current directory. The certificate will not be checked by the client.

  • plossys config export <filename>.yml --token <consul_token>

    Export the configuration from a secured Consul key value store.


get

get returns the value of a configuration parameter. If the parameter is not set, the command returns Key not found.

Usage: plossys config get [options] <key>

Arguments:

  • key: name of the configuration parameter, mandatory. For the list of available keys, refer to Keys.

Options:

  • --file <value>: path and name of the file to write the value into
  • --service <value>: name of the service without seal- for which to get the configuration value (default: any)

Examples:

  • plossys config get LOG_LEVEL

    Returns the value set for the LOG_LEVEL key if set for any service.

  • plossys config get LOG_LEVEL --insecure

    Returns the value set for the LOG_LEVEL key if set for any service. The certificate will not be checked by the client.

  • plossys config get LOG_LEVEL --service plossysadmin --insecure

    Returns the value set for the LOG_LEVEL key if set for seal-plossysadmin service. The certificate will not be checked by the client.

  • plossys config get LOG_LEVEL --insecure --file C:\temp\loglevel.txt

    Returns the value set for the LOG_LEVEL key if set for any service. The output is saved as loglevel.txt in the current directory. The certificate will not be checked by the client.

  • plossys config get ALLOWED_OIDC_CLIENTS --file template.json

    Getting the ALLOWED_OIDC_CLIENTS key is a special case of the get command. Here, the key is written for the seal-rest service automatically. ALLOWED_OIDC_CLIENTS is a complex JSON object, thus reading it from a file is advised. Additionally, the value of ALLOWED_OIDC_CLIENTS is checked for JSON conformity.

  • plossys config get HTPASSWD --file <filename>

    Getting the HTPASSWD key is a special case of the get command. Here, the key is written for the seal-rest service automatically. HTPASSWD has to accord to the format of the Apache htpasswd file, thus reading it from a file is advised. Additionally, the value of HTPASSWD is checked for htpasswd conformity.


import

import imports the configuration from a YAML file into Consul.

Usage: plossys config import [options] <configfile>

Arguments:

  • configfile: path and name of the target configuration file, mandatory

Options:

  • --purge: deletes the current configuration before import
  • --update: update configuration, does not overwrite entries

Examples:

  • plossys config import config.yml

    Reads the configuration from config.yml in the current directory and updates the configuration in Consul. Existent values will be overwritten.

  • plossys config import config.yml --insecure

    Reads the configuration from config.yml in the current directory and updates the configuration in Consul. Existent values will be overwritten. The certificate will not be checked by the client.

  • plossys config import config.yml --token <consul_token>

Reads the configuration from config.yml in the current directory and updates the configuration in a secured Consul. Existent values will be overwritten.

  • plossys config import config.yml --purge --insecure

Deletes the current configuration. Reads the configuration from config.yml in the current directory and imports it into Consul.

  • plossys config import config.yml --update --insecure

Reads the configuration from config.yml in the current directory. Only new key/value pairs will be added to the configuration in Consul. The certificate will not be checked by the client.


set

set sets the value of a configuration parameter.

Usage: plossys config set [options] <key> [<value>]

Arguments:

  • key: name of the configuration parameter, mandatory. For the list of available keys, refer to Keys.
  • value: the value for the configuration parameter (not required if option --file is specified)

Options:

  • --json: activate json syntax check
  • --file <value>: file to read the value from
  • --service <value>: name of the service without seal- for which to set the configuration value (default: any)

Examples:

  • plossys config set LOG_LEVEL warn

    Sets the value warn for the LOG_LEVEL key for any service.

  • plossys config set LOG_LEVEL warn --insecure

    Sets the value warn for the LOG_LEVEL key for any service. The certificate will not be checked by the client.

  • plossys config set LOG_LEVEL --service plossysadmin --insecure

    Sets the value warn for the LOG_LEVEL key for seal-plossysadmin service. The certificate will not be checked by the client.

  • plossys config set ALLOWED_OIDC_CLIENTS --file template.json

    Setting the ALLOWED_OIDC_CLIENTS key is a special case of the set command. Here, the key is written for the seal-rest service automatically. ALLOWED_OIDC_CLIENTS is a complex JSON object, thus reading it from a file is advised. Additionally, the value of ALLOWED_OIDC_CLIENTS is checked for JSON conformity.

  • plossys config set HTPASSWD --file <filename>

    Setting the HTPASSWD key is a special case of the set command. Here, the key is written for the seal-rest service automatically. HTPASSWD has to accord to the format of the Apache htpasswd file, thus reading it from a file is advised. Additionally, the value of HTPASSWD is checked for htpasswd conformity.


template

template creates a template for a configuration parameter. The main use cases for this command are the environment keys ALLOWED_OIDC_CLIENTS and HTPASSWD.

Arguments:

  • key: name of the configuration parameter, mandatory.

Options:

  • --file <value>: file to read the value from
  • --service <value>: name of the service without seal- for which to set the configuration value (default: any)

Examples:

  • plossys config template HTPASSWD --file <filename>

    Creates a template for HTPASSWD. The value of HTPASSWD has to accord to the format of the Apache htpasswd file. For this, a template can be generated which then only has to be filled out.

    Example - template for HTPASSWD

    user1:password1
    user2:password2
    
  • plossys config template ALLOWED_OIDC_CLIENTS --file template.json

    Creates a template for ALLOWED_OIDC_CLIENTS. The value of ALLOWED_OIDC_CLIENTS has to accord to a specific JSON object. For this, a template can be generated which then only has to be filled out.

    Example - template for ALLOWED_OIDC_CLIENTS with the superadmin and admin example roles

    {
      "seal-plossysadmin": {
        "roles": {
          "superadmin": {
            "areas": {
              "dashboard": {},
              "jobs": {
                "set-a": {
                  "views": [
                    {
                      "struct": "current.printerName",
                      "operator": "eq",
                      "value": "printer"
                    }
                  ],
                  "permissions": [
                    "tempfiles",
                    "move",
                    "pause",
                    "cancel",
                    "repeat",
                    "resume",
                    "delete"
                  ]
                },
                "set-b": {
                  "views": [
                    {
                      "struct": "current.printerName",
                      "operator": "eq",
                      "value": "printer2"
                    }
                  ],
                  "permissions": [
                    "ALL"
                  ]
                },
                "set-c": {
                  "views": [
                    "ALL"
                  ],
                  "permissions": []
                }
              },
              "printers": {
                "set-a": {
                  "views": [
                    {
                      "struct": "config.server",
                      "operator": "eq",
                      "value": "spooler1"
                    }
                  ],
                  "permissions": [
                    "add",
                    "pause",
                    "redirect",
                    "resume",
                    "createTestJob",
                    "delete"
                  ]
                },
                "set-b": {
                  "views": [
                    {
                      "struct": "connection",
                      "operator": "eq",
                      "value": "socket://valid:1234"
                    }
                  ],
                  "permissions": [
                    "add"
                  ]
                },
                "set-c": {
                  "views": [
                    {
                      "struct": "config.printer",
                      "operator": "eq",
                      "value": "printer2"
                    },
                    {
                      "struct": "config.printer",
                      "operator": "eq",
                      "value": "printer3"
                    }
                  ],
                  "permissions": [
                    "ALL"
                  ]
                }
              }
            }
          },
          "admin": {
            "areas": {
              "printers": {
                "set-a": {
                  "views": [
                    "ALL"
                  ],
                  "permissions": [
                    "resume",
                    "pause"
                  ]
                }
              }
            }
          }
        }
      }
    }
    

update

update updates the current configuration in a running system without overwriting the existent settings.

Usage: plossys config update [options] <configfile>

Arguments:

  • configfile: the path and name of the configuration file in YAML format, mandatory

Options:

--dc <value>: name of the target datacenter to update configuration. (default: home)

Examples:

  • plossys config update config.yml

    Reads the configuration from config.yml in the current directory and updates the configuration in Consul. Existent values will be not be overwritten.

  • plossys config update config.yml --insecure

    Reads the configuration from config.yml in the current directory and updates the configuration in Consul. Existent values will be not be overwritten. The certificate will not be checked by the client.

  • plossys config update config.yml --token <consul_token>

    Reads the configuration from config.yml in the current directory and updates the configuration in a secured Consul. Existent values will be not be overwritten.


validate

validate validates and - if necessary - corrects the configuration.

Usage: plossys config validate [options]

Arguments:

  • none

Options:

  • --purge: purge configuration before re-import

Back to top