Creating Swarm Clusters

Getting started with swarms

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.

Enabling swarms

Enable Swarms

Figure 1 - The Enable Swarms menu item on the Cluster Actions menu

NOTE: This menu item is currently disabled by default, but please contact us and we can enable it for your environment.

You enable swarm clusters via the Cluster Actions menu. Clicking the Enable Swarms menu item asks you to confirm your choice:

Figure 2 - Enabling swarms for your environment

Simple as that. You’ll get a success message when your environment is updated.

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:

Launch Cluster button

Figure 3 – The Launch Cluster Wizard, featuring the LAUNCH SWARM button

In Figure 3, 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 4 - 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 5 - 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:

Two clusters

Figure 6 – A regular cluster and a swarm cluster

In Figure 6, 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.

👉 Next: Querying data with swarms