Connecting to Viridian with Hazelcast CLC

To use the Hazelcast CLC with Hazelcast Viridian, you need to authenticate with Viridian using your API secret and key. You can then import the configuration of the Viridian cluster that you want to connect to. No additional configuration is required.

Before you Begin

You need the following:

Authenticating with Viridian

To allow the Hazelcast CLC to do cluster operations, you must generate a Viridian token.

  1. Execute the following command to retrieve the Viridian token.

    clc viridian login
  2. When prompted, enter your API key and secret. If both are correct, the token is retrieved and saved.

List Accessible Clusters

Run the following command to list the clusters linked to your Hazelcast Viridian account:

clc viridian list-clusters

For each cluster, the following attributes are displayed in order: Cluster ID, Cluster Name, Current Status, Hazelcast Version.

Importing the Cluster Configuration

Import the configuration of the Viridian cluster that you want to connect to.

  1. Run the following command to save the cluster configuration with the name dev. Replace the $CLUSTER_NAME placeholder with the name of your cluster.

    clc viridian import-config $CLUSTER-NAME --name dev
  2. Start an interactive shell session.

    clc -c dev

CLC will start in the interactive mode, and you should see a command prompt. You’re ready to start managing Viridian clusters.

The Hazelcast CLC connects to the cluster on demand, that is when you issue a command that requires the connection, such as running a SQL query.