Skip to content

Building a three-node cluster

A single appliance is a single point of failure. If its host dies, or you patch it, every workflow stops. A cluster of three appliances behind a load balancer keeps Orchestrator running when any one node is down, and picks up the interrupted workflows on the nodes that are left. This recipe turns the appliance from chapter 1 into the first node of such a cluster.

Diagram. Users, VCF Automation and REST clients all connect to vco.vmw.lab on a load balancer: TCP 443, layer 4, TLS passed through, health check GET /health on port 8008. The load balancer forwards to vco01, vco02 and vco03. One Kubernetes cluster spans the three appliances; each runs vco-app and PostgreSQL, primary on vco01 and standby on the other two, kept in step by streaming replication.
Figure 2.6. A three-node Orchestrator cluster. Clients only ever use the load balancer's name.

Getting ready

You need:

  • The first node, vco01.vmw.lab, deployed and authenticated as in chapter 1. This becomes the cluster’s primary node.
  • Two more appliances, vco02.vmw.lab and vco03.vmw.lab, deployed as in recipe 1.2 from the same OVA build, with the same Kubernetes network ranges. Don’t configure authentication on them. Joining wipes them anyway.
  • A load balancer with a virtual IP and the FQDN vco.vmw.lab. NSX, HAProxy, F5, or anything else that can forward TCP will do. You set it up in step 1.
  • DNS: an A record and a PTR record for all four names (the three nodes and the load balancer), created before you start. Both are mandatory, as for a single appliance (recipe 1.2).
  • A certificate whose SANs include vco.vmw.lab, vco01.vmw.lab, vco02.vmw.lab, and vco03.vmw.lab. Create the CSR as in recipe 2.2, with all four names in -addext.
  • SSH on all three appliances, and a root shell on each: log in as vmware-system-user and run sudo su - (recipe 2.1).
  • A snapshot of each of the three VMs, taken with the VMs running but without memory, just before you start.
  • A maintenance window of about an hour. vco01 is offline for most of it.

Check that every pod is running on each appliance before you go further:

root@vco01, vco02, vco03
kubectl -n prelude get pods

How to do it

  1. Set up the load balancer. Create a pool and a virtual server with these settings:

    Setting Value
    Virtual server vco.vmw.lab, TCP port 443
    Type Layer 4 (TCP passthrough). Don’t decrypt TLS on the load balancer.
    Pool members vco01, vco02, vco03, port 443
    Persistence None
    Health monitor HTTP GET /health on port 8008, healthy on status 200, every 3 seconds, 10-second timeout

    Only vco01 will pass the health check for now. That’s expected.

  2. Point authentication at the load balancer. On vco01, check the current provider, then register it again with the load balancer’s name as the address Orchestrator advertises. This example re-registers the vSphere provider from recipe 1.4:

root@vco01
vracli vro authentication
vracli vro authentication unregister -u administrator@vsphere.local
vracli vro authentication set -p vsphere \
--hostname https://vc01.vmw.lab \
--username administrator@vsphere.local \
--tenant vsphere.local \
--admin-group OrchestratorAdmins \
--admin-group-domain vsphere.local \
--fqdn vco.vmw.lab
  1. Stop the services on the primary node:
root@vco01
/opt/scripts/deploy.sh --onlyClean
  1. Tell the appliance about the load balancer:
root@vco01
vracli load-balancer set vco.vmw.lab
  1. Load the cluster certificate. Copy the PEM chain to vco01 as in recipe 2.2, then:
root@vco01
vracli certificate ingress --set /root/vco-cluster-chain.pem
  1. Join the second node. On vco02, run the join command against the primary and enter vco01’s password when asked. The join resets vco02, copies the cluster configuration from vco01, and takes 10 to 15 minutes:
root@vco02
vracli cluster join vco01.vmw.lab
  1. When the join on vco02 has finished, join the third node the same way, from vco03:
root@vco03
vracli cluster join vco01.vmw.lab
Needs a lab check. The join connects to the primary with its root password in the 8.x procedure. With direct root login over SSH off from 9.1.1 (recipe 2.1), record on a 9.1.1 cluster which account and password vracli cluster join asks for.
  1. Check the cluster. Back on vco01, all three nodes should be listed and Ready:
root@vco01
kubectl -n prelude get nodes
Figure 2.7. Three nodes, all Ready, before the final deployment.
  1. Deploy the services across the cluster. On vco01, run the deployment script and wait for Prelude has been deployed successfully. In a second SSH session you can watch the pods start on all three nodes with watch -n 5 "kubectl -n prelude get pods -o wide".
root@vco01
/opt/scripts/deploy.sh
  1. Check the load balancer. All three pool members should now pass the health check.
Figure 2.8. The load balancer sees all three nodes as healthy.
  1. Browse to https://vco.vmw.lab and log in. From now on, use only this name, in browsers, in VCF Automation integrations, and in scripts.
  2. Delete the snapshots once you’re happy with the cluster. Don’t keep them as a fallback (see “There’s more”).
Needs a lab check. Steps 2 to 9 follow the Aria Automation Orchestrator 8.14 and 8.16 cluster procedures, adapted for the removal of Control Center. The 9.1 page Configure a VCF Operations Orchestrator Cluster exists but couldn’t be read for this draft. Run the whole recipe in the lab and correct the order, especially whether step 2 (re-registering authentication with –fqdn) is the right replacement for the old Control Center Host Settings page, and whether 9.x still needs deploy.sh –onlyClean in step 3.
Needs a lab check. The load balancer settings in step 1, including GET /health on port 8008, come from the vRealize Automation 8.11 load balancing guide’s entries for external Orchestrator. Confirm the health URL and port on 9.1.1 with curl -k http://vco02.vmw.lab:8008/health, and record what it returns.
Needs a lab check. Time steps 6, 7, and 9 in the lab. The 10 to 15 minutes per join is based on a community report from vRO 8.2.

How it works

vracli cluster join doesn’t link three separate Orchestrators together. It turns three appliances into one Kubernetes cluster that spans all three VMs. The joining node throws away its own setup, fetches the configuration from the primary, and becomes another member of the same cluster. Then deploy.sh spreads the services over the three nodes:

  • Orchestrator runs on every node, and all three take requests and run workflows. That’s why the load balancer needs no persistence.
  • PostgreSQL runs on every node too. One copy is the primary database, and the other two are replicas kept in step with it asynchronously. If the primary database’s node fails, one of the replicas takes over automatically.
  • Workflow state lives in that shared database. If a node fails partway through a workflow, another node picks the run up from the last step that hadn’t finished.

Because everything that matters is in the shared database and the shared cluster configuration, you configure Orchestrator once, through vco.vmw.lab, and every node gets the same settings, plug-ins, content, and certificates.

The cluster survives the loss of one node. With two nodes down, it stops working, because the remaining node can’t tell whether it’s the one that’s cut off.

Setting the load balancer and the advertised FQDN matters because Orchestrator builds links and login redirects from its own name. If it still thought it was vco01, a user who reached it through vco.vmw.lab would be redirected to vco01 after logging in, and would lose the protection of the cluster without noticing.

Needs a lab check. The descriptions of how work is spread across nodes and how interrupted runs resume come from the 8.14 Orchestrator Cluster page, which still contains text carried over from vRO 7. After building the cluster, power off the node running a long workflow and confirm the run resumes on another node.
Back in vRO 5.5–7Install an external SQL Server, Oracle, or PostgreSQL database, point every node at it, then set Number of active nodes and click Join node to cluster in Control Center.
In Orchestrator 9.xDeploy three identical appliances, run vracli load-balancer set on the first, vracli cluster join on the others, and deploy.sh. The database is built in and replicated for you.

There's more

9.1.2: a load balancer inside the appliance . From 9.1.2, the appliance has an integrated load-balancing service. A three-node cluster can spread traffic with Kubernetes-native routing, so step 1’s external load balancer is no longer required. On 9.1.1 and earlier, keep the external one. Broadcom documents the setup in Configuring VCF Operations Orchestrator Load Balancing.

Needs a lab check. From the 9.1.2 release notes; not yet tried in the lab, which runs 9.1.1. On 9.1.2, record how the integrated load balancer is turned on, which address clients use instead of vco.vmw.lab on an external load balancer, whether step 2 (advertising the load balancer’s name to the authentication provider) still applies, and whether the health check on port 8008 is still needed.

Removing a node is a one-way trip. To shrink the cluster, run vracli cluster leave on the node you want to remove, then check from a remaining node with kubectl -n prelude get nodes. A node that has left can’t be joined again. Delete the VM and deploy a new one if you need it back.

Recovering a broken node. If one node is NotReady and won’t recover, remove it from a healthy node, then join it again from the broken node:

root@vco01 (healthy node)
vracli cluster remove vco03.vmw.lab
root@vco03 (broken node)
vracli cluster join vco01.vmw.lab

Join it to whichever node holds the primary database, which may no longer be vco01. To find out, run this on a healthy node, then map the pod to its node with kubectl -n prelude get pods -o wide:

root@vco01
kubectl -n prelude exec postgres-0 -- chpst -u postgres repmgr cluster show --terse --compact

Don’t revert one node to a snapshot. Restoring a single node from a snapshot puts it out of step with the other two and can break the Kubernetes cluster. If a change goes wrong, revert all three nodes together, while they’re powered off.

Needs a lab check. Confirm that reverting all three nodes at once, powered off, is a safe rollback on 9.1.1. The documentation only warns against restoring a single node.

Keep the root passwords the same. Each node keeps its own root password. Anything that reaches a node through the load balancer lands on whichever node it’s sent to, so different passwords quickly become confusing. If you need to change one, take that node out of the load balancer pool first, change it, and put the node back.

Two nodes isn’t a cluster. The procedure supports exactly three. With two, losing either node takes the cluster down, which is worse than running one.

Sizing. Every node needs the full 4 vCPUs, 12 GB of memory, and 200 GB of disk from recipe 1.2. If you raise memory for a bigger Java heap (recipe 2.7), do it on all three.

See also