Announcing Hazelcast Cloud CLI
We are happy to announce Hazelcast Cloud CLI (hzcloud) to provide full automation for your Hazelcast clusters and related operations. We all believe in the power of automation and if you already have Hazelcast within your pipeline, you can insert the missing piece by using hzcloud. To try examples here, you can create a Hazelcast Cloud account and get API Credentials
hzcloud supports various distributions including Mac, Linux, Windows, as well as different architectures including amd64 and even arm! You can select one of your favorite installation methods which are described here.
Getting API Credentials
If you don’t have an account, you can get a free one to see your Developer page. On the developer page, click Generate new API key to see your credentials. Copy API Key and API Secret to use it inside hzcloud tool. Keep in mind that, you will not see your credentials for the second time, be sure you keep them in a safe place before leaving the developer page. If you somehow lose it, you can delete it and generate a new one.
You can authenticate into Hazelcast Cloud by using hzcloud in 2 ways;
- hzcloud login -> provide credentials withing console prompt -> execute hzcloud commands
- Provide Hazelcast Cloud specific environment variables -> execute hzcloud commands
You can see advanced details about the above methods in the documentation, but in this blog I will use the first way. However, if you are doing automation, you may want to use the second method.
$ hzcloud login
- Api Key: SAMPLE_API_KEY
- Api Secret: SAMPLE_API_SECRET
You can simply pass the API Key and API Secret within the terminal prompt.
As you can see in the terminal, if there is a new version, we notify you about this so that you can upgrade to the latest version to use new features.
While you can see the possible parameters of creating a cluster from the help command, you can use the following command to create a starter cluster easily.
hzcloud starter-cluster create \
Show Cluster Details
You can see cluster details by using get subcommand with cluster-id param which is required.
hzcloud starter-cluster get --cluster-id=54069
Listing to iterate, is a good mechanism to satisfy your automation process. You can list clusters by using list subcommand.
hzcloud starter-cluster get –cluster-id=54069
For better visibility, we show details within the tabular view, but you can always change it by using –output param. You can use this param for getting details and various other commands.
We tried to show you some starting point about hzlcloud, but you can see more advanced examples and internals within documentation here.