A newer version of Hazelcast CLC is available.

View latest

clc config

Configuration operations.

Usage:

clc config [command] [flags]

clc config add

Adds a named configuration with the given values. Specify the configurations as KEY=VALUE pairs.

It overwrites the previous configuration if it exists.

Usage:

clc config add [target] [source] [flags] [key=value...]

You can pass key=value pairs to add configuration items.

Configuration keys
Key Value Default Value Note

cluster.name

Any string

dev

cluster.address

HOST:PORT / HOST / :PORT

localhost:5701

cluster.user

Any string

Hazelcast Enterprise only

cluster.password

Any string

Hazelcast Enterprise only

cluster.discovery-token

Any string

Cloud only

ssl.enabled

true / false

false

Cloud or Hazelcast Enterprise

ssl.server

DOMAIN_NAME (must match SSL certificate)

Cloud (automatically set) or Hazelcast Enterprise

ssl.skip-verify

true / false

false

Cloud or Hazelcast Enterprise. Disables SSL host name and client-side verification. Never set to true in production.

ssl.ca-path

An absolute or relative path

Cloud or Hazelcast Enterprise. Sets the path to the CA certificate.

ssl.key-path

An absolute or relative path

Cloud or Hazelcast Enterprise. Sets the path to the certificate key.

ssl.key-password

Any string

Cloud or Hazelcast Enterprise. Sets the password for the certificate key.

log.path

An absolute or relative path or stderr to log to stderr.

$CLC_HOME/logs/YYYY-MM-DD.log where YYY-MM-DD is the date on which the log was created.

log.level

One of:

  1. error

  2. warn

  3. info

  4. debug

info

Log level filter

Global parameters
Parameter Description Default

--config, -c

Path to the configuration file in YAML format.

The following locations are tried in order for the existence of config.yaml

  1. Current working directory

  2. The parent directory of the clc executable

  3. $CLC_HOME/default directory

--format, -f

Set the output format

  • csv

  • delimited: By tab characters

  • json

  • table

  • Interactive mode: table

  • Non-interactive mode: delimited

--log.level

Set the log level, one of:

  • debug

  • info

  • warning

  • error

info

--log.path

Set the log path. Use stderr to log to the screen (stderr).

$CLC_HOME/logs/YYYY-MM-DD.log where YYYY-MM-DD is today’s date.

--quiet, -q

Prevent displaying unnecessary output.

false

--verbose

Enable output with more information.

false

--timeout

Timeout for operation to complete.

The duration is a string in the form of AMOUNTunit where AMOUNT is an integer, and unit is one of the following:

  • ms: milliseconds

  • s: seconds

  • m: minutes

  • h: hours

Underscore (_) character is ignored in the AMOUNT. unit is optional and defaults to s if not specified.

The following are a few of the valid DURATIONs:

  • 5: 5 seconds

  • 5s: 5 seconds

  • 10000ms: 10000 milliseconds

  • 10_000_000ms: 10000000 milliseconds

This is a client-side timeout, the operation you started maybe in progress on the server-side even if the given timeout is exceeded.

Example output:

clc config add dev cluster.name=dev cluster.address=localhost:5701

clc config import-cloud

Imports configuration from a Cloud CLI sample.

To get the URL for Cloud, follow the steps below:

  1. Open the Cloud console, and select DashboardConnect ClientCLI

  2. Copy the URL from the second step of the on-screen instructions, and pass it as the second parameter. Ensure that the URL is enclosed in quotation marks, then run:

    clc config import-cloud my-config "URL copied from console"
Global parameters
Parameter Description Default

--config, -c

Path to the configuration file in YAML format.

The following locations are tried in order for the existence of config.yaml

  1. Current working directory

  2. The parent directory of the clc executable

  3. $CLC_HOME/default directory

--format, -f

Set the output format

  • csv

  • delimited: By tab characters

  • json

  • table

  • Interactive mode: table

  • Non-interactive mode: delimited

--log.level

Set the log level, one of:

  • debug

  • info

  • warning

  • error

info

--log.path

Set the log path. Use stderr to log to the screen (stderr).

$CLC_HOME/logs/YYYY-MM-DD.log where YYYY-MM-DD is today’s date.

--quiet, -q

Prevent displaying unnecessary output.

false

--verbose

Enable output with more information.

false

--timeout

Timeout for operation to complete.

The duration is a string in the form of AMOUNTunit where AMOUNT is an integer, and unit is one of the following:

  • ms: milliseconds

  • s: seconds

  • m: minutes

  • h: hours

Underscore (_) character is ignored in the AMOUNT. unit is optional and defaults to s if not specified.

The following are a few of the valid DURATIONs:

  • 5: 5 seconds

  • 5s: 5 seconds

  • 10000ms: 10000 milliseconds

  • 10_000_000ms: 10000000 milliseconds

This is a client-side timeout, the operation you started maybe in progress on the server-side even if the given timeout is exceeded.

clc config import-java

This command imports a subset of Hazelcast Java client configuration and saves it as CLC configuration.

Limitations

Only PKCS12 keystores/truststores are supported.

The following are not supported:

  • <import> and <config-replacers> tags

  • Variables in .xml configuration

Java KeyStore

If the Java client configuration refers to a Java keystore, the key and certificate in the keystore are imported as key.pem and cert.pem files respectively. The keystore must contain one key and one certificate.

Java TrustStore

If the Java client configuration refers to a Java truststore, certificates in the truststore are imported as the ca.pem file. The truststore must contain only certificates.

Configuration Keys

You can pass key=value pairs to override configuration options.

Configuration keys
Key Value Default Value Note

cluster.name

Any string

dev

cluster.address

HOST:PORT / HOST / :PORT

localhost:5701

cluster.user

Any string

Hazelcast Enterprise only

cluster.password

Any string

Hazelcast Enterprise only

cluster.discovery-token

Any string

Cloud only

ssl.enabled

true / false

false

Cloud or Hazelcast Enterprise

ssl.server

DOMAIN_NAME (must match SSL certificate)

Cloud (automatically set) or Hazelcast Enterprise

ssl.skip-verify

true / false

false

Cloud or Hazelcast Enterprise. Disables SSL host name and client-side verification. Never set to true in production.

ssl.ca-path

An absolute or relative path

Cloud or Hazelcast Enterprise. Sets the path to the CA certificate.

ssl.key-path

An absolute or relative path

Cloud or Hazelcast Enterprise. Sets the path to the certificate key.

ssl.key-password

Any string

Cloud or Hazelcast Enterprise. Sets the password for the certificate key.

log.path

An absolute or relative path or stderr to log to stderr.

$CLC_HOME/logs/YYYY-MM-DD.log where YYY-MM-DD is the date on which the log was created.

log.level

One of:

  1. error

  2. warn

  3. info

  4. debug

info

Log level filter

Usage:

clc config import-java [target] [source] [flags] [key=value...]

Parameters:

Parameter Required Description Default

target

Required

Name or path to the configuration to create

source

Required

Path to the Java client XML configuration

Global parameters
Parameter Description Default

--config, -c

Path to the configuration file in YAML format.

The following locations are tried in order for the existence of config.yaml

  1. Current working directory

  2. The parent directory of the clc executable

  3. $CLC_HOME/default directory

--format, -f

Set the output format

  • csv

  • delimited: By tab characters

  • json

  • table

  • Interactive mode: table

  • Non-interactive mode: delimited

--log.level

Set the log level, one of:

  • debug

  • info

  • warning

  • error

info

--log.path

Set the log path. Use stderr to log to the screen (stderr).

$CLC_HOME/logs/YYYY-MM-DD.log where YYYY-MM-DD is today’s date.

--quiet, -q

Prevent displaying unnecessary output.

false

--verbose

Enable output with more information.

false

--timeout

Timeout for operation to complete.

The duration is a string in the form of AMOUNTunit where AMOUNT is an integer, and unit is one of the following:

  • ms: milliseconds

  • s: seconds

  • m: minutes

  • h: hours

Underscore (_) character is ignored in the AMOUNT. unit is optional and defaults to s if not specified.

The following are a few of the valid DURATIONs:

  • 5: 5 seconds

  • 5s: 5 seconds

  • 10000ms: 10000 milliseconds

  • 10_000_000ms: 10000000 milliseconds

This is a client-side timeout, the operation you started maybe in progress on the server-side even if the given timeout is exceeded.

clc config list

Lists the known configurations.

A known configuration is a directory at $CLC_HOME/configs that contains config.yaml. Directory names which start with dot (.) or underscore (_) are ignored.

Usage:

clc config list [flags]

Example output:

clc config list
default
production