To use the Hazelcast CLC with Hazelcast Viridian Cloud, you need to authenticate with Viridian Cloud using your API secret and key. You can then import the configuration of the cluster that you want to connect to. No additional configuration is required.
You need the following:
A Viridian Cloud cluster
To allow the Hazelcast CLC to do cluster operations, you must generate a Viridian Cloud token.
Execute the following command to retrieve the token.
clc viridian login
When prompted, enter your API key and secret. If both are correct, the token is retrieved and saved.
Run the following command to list the clusters linked to your Viridian Cloud account:
clc viridian list-clusters
For each cluster, the following attributes are displayed in order: Cluster ID, Cluster Name, Current Status, Hazelcast Version.
Import the configuration of the Viridian Cloud cluster that you want to connect to.
Run the following command to save the cluster configuration with the name
dev. Replace the
$CLUSTER_NAMEplaceholder with the name of your cluster.
clc viridian import-config $CLUSTER-NAME --name dev
Start an interactive shell session.
clc -c dev
The Hazelcast CLC will start in interactive mode, and you should see a command prompt. You’re ready to start managing Viridian Cloud 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.|