Creating Swarm Clusters
Swarm clusters are ClickHouse® clusters that:
- Are stateless and ephemeral - they are provisioned and deprovisioned as needed and have no permanent state or storage
- Run on spot instances (typically) to save costs
- Self-register and unregister with Keeper (ClickHouse Keeper or Zookeeper)
- Run queries against data lakes
In this section we’ll look at how to enable swarms for our ClickHouse cluster, then we’ll create one.
But first…
It’s an obvious detail, but make sure your cluster is running an Antalya build. If you used the Quick Path method to create your cluster, it will use an Altinity Stable build by default. To change to an Antalya build, use the Upgrade menu item on the Cluster Actions menu and select an Antalya build. See the Upgrading a Cluster documentation for all the details.
Enabling swarms
You enable swarm clusters via the Cluster Actions menu:
NOTE: This menu item is currently disabled by default, but please contact us and we can enable it for your account.
Clicking the Enable Swarms menu item asks you to confirm your choice:
Figure 1 - Enabling swarms for a cluster
Simple as that. You’ll get a success message when your cluster is updated. Also, because swarms are enabled at the cluster level, you’ll need to enable swarms for each cluster going forward.
Be aware that enabling swarms will restart the cluster.
Creating a swarm cluster
Once swarms are enabled, the Launch Cluster wizard will have a LAUNCH SWARM button at the top of the Clusters view:
Figure 2 – The LAUNCH SWARM button
In Figure 2, we have a regular cluster named maddie-byok
, and we’ve used the Actions menu to enable swarms. Now clicking the LAUNCH SWARM button brings up this simple dialog:
Figure 3 - The Launch a Swarm dialog
Give your swarm cluster a name, select a node type, set the number of nodes, and click the button. Your swarm cluster will be ready shortly. While it’s being provisioned, you’ll see a dialog that gives you the password for the admin user:
Figure 4 - Getting the admin password for your swarm cluster
Click the icon to copy the password. Save the it somewhere safe; you won’t be able to see it later. (You can change it once you’re logged in, however.) When everything is deployed and running, your clusters will be displayed like this:
Figure 5 – A regular cluster and a swarm cluster
In Figure 5, we have a regular cluster named maddie-byok
and a swarm cluster named maddie-swarm
. With our swarm cluster set up, we’ll use it to query some data.