23.1.4. 1010 Manage Groups of Machines using Clusters¶
Time: 10 Minutes
Tags: clusters, core
Concepts: clusters, resource_brokers, machines, contexts
Learn how Digital Rebar manages infrastructure using IaC resource abstractions like Clusters and Brokers.
This is our most basic IaC learning module that shows the most basic infrastructure management operations in Digital Rebar.
Business ROI: Unlike multi-tenant SaaS, Digital Rebar is user operated software: you will never have to open your firewall for us, share sensitive information or upload access credentials.
Use IaC to create a group of machines that are coordinated using an dedicated lifecycle workflow object. In Digital Rebar, that known as a “cluster”
18.104.22.168.1.1. Creating a Cluster¶
Navigate to the Clusters view
Name your Cluster
cluster/countif you want more or less than 3 machines
We will reconfigure the
cluster/countin a later step.
Now, watch the lab1010 Activity Tab for the
22.214.171.124.1.2. Observing the Operation¶
Now that you’ve created a cluster, let’s what Digital Rebar is doing as an IaC platform on your behalf.
Scan Digital Rebar
From Resource Brokers, review the context-broker to observe the Activity
From Overview, observe the Cluster Status Heartbeat and Runtime Statistics
Note: The Heartbeat only shows active clusters. If your cluster has completed operations, then it will not appear.
From Work Orders, observe the Work Order activity
From Machines, observe the newly created
lab1010-#Machines that are part of the
Observe that the your lab1010 Machines and cluster have shared profile (lab1010).
The shared profile is created when you created the lab and stores information that becomes accessible to the machines in the cluster because the cluster’s profile is also assigned to the machines. A share profile is common Digital Rebar practice used to create a shared working configuration between different IaC components.
From one of your lab1010 Machines, use the “Cluster” field to navigate back to the lab1010 cluster.
Digital Rebar stores the relationship between a machine and the cluster(s) that are managing it in the
While looking at the
cluster/tagsParam, you should also note that Digital Rebar also tracks information about the broker that created it in Params like
Params are used extensively throughout the platform to capture data about systems and their relationships.
126.96.36.199.1.3. Resizing your lab1010 Cluster¶
In Day 2 IaC, we must assume that everything we create will be modified. In this step, we’ll show how to resize the cluster you just created. Digital Rebar deliberately separates configuration and action operations. That ensures that you have time to complete all configuration changes before Digital Rebar begins making changes. Future labs will show you how to use Triggers to act immediately on changes.
Drain the lab1010 Cluster
Select and Apply the
The lab1010 Machines tab should not have any more machines listed.
It is acceptable to have an empty cluster (count = zero) with no machines.
This is different from deleting the cluster because all of the cluster APIs and configuration are available in an empty cluster. In an IaC sense, you can completely drain all the resources from a cluster and then reconstruct the cluster later by simply increasing the count.
Resize and Update lab1010 Cluster
Select and Apply the
This will cause the cluster to re-evaluate it’s configuration.
You can watch the change from the lab1010 Machines tab
If you try different
cluster/count, you will notice that Digital Rebar will add or remove machines during the re-evaluation phase.
Note: Future labs will explain how to control the naming of machines in your cluster.
188.8.131.52.1.4. Cleanup your cluster¶
Releasing resources is a critical part of the IaC story. When you cleanup your cluster, Digital Rebar invokes the Workflow defined in
on-delete-workflowto automatically decommission the cluster. This includes telling the associated resource broker to remove all the associated machines. It’s important to understand, this is intentional IaC behavior that was added on your behalf when you created the cluster. If you delete a cluster without this setting, then it will leave the associated machines in place. This is also helpful if you’ve made a mistake with your lab and need to reset and start over.
From the Clusters table
Select row with lab1010 (a checkbox will appear)
Use the Actions list to return your Cluster to Workflow Mode
Use the Actions list to Cleanup your cluster (the related machines will be automatically removed also)