Connect two clusters with a portal¶
When you finish, a directory on one cluster (the hub) appears inside a directory on a second cluster (the spoke), and both ends of the portal report ACTIVE.
Before you start¶
- Two Qumulo clusters, each with a REST API on port 8000 that you can reach from this machine
- An admin account on each cluster for its connection profile
- Network paths between the two clusters' node addresses on TCP port 3713, in both directions
- Terraform 1.11 or later
1. Copy the configuration¶
Save this as main.tf in an empty directory.
terraform {
required_version = ">= 1.11"
required_providers {
qumulo = {
source = "qumulo-terraform-registry.s3.us-east-1.amazonaws.com/qumulo/qumulo"
version = "~> 1.0"
}
}
}
provider "qumulo" {
connection_profiles = [
{
name = "hub"
endpoint = "https://hub.example.com:8000" # <-- Replace with the hub cluster's REST API endpoint
username = "admin"
password = "YourHubPassword123!" # <-- Replace with the hub admin password
insecure_skip_verify = true
},
{
name = "spoke"
endpoint = "https://spoke.example.com:8000" # <-- Replace with the spoke cluster's REST API endpoint
username = "admin"
password = "YourSpokePassword123!" # <-- Replace with the spoke admin password
insecure_skip_verify = true
},
]
}
resource "qumulo_portal" "main" {
hub_connection_profile = "hub"
spoke_connection_profile = "spoke"
type = "PORTAL_READ_ONLY"
hub_hosts = ["10.0.0.1"] # <-- Replace with hub node addresses the spoke can reach
spoke_hosts = ["10.1.0.1"] # <-- Replace with spoke node addresses the hub can reach
}
resource "qumulo_portal_root" "data" {
portal_id = qumulo_portal.main.id
hub_root_path = "/data" # <-- Replace with the hub directory to share
spoke_root_path = "/cache" # <-- Replace with the spoke directory where it appears
}
output "hub_status" {
value = qumulo_portal.main.hub_status
}
output "spoke_status" {
value = qumulo_portal.main.spoke_status
}
Replace the eight values marked <-- Replace, and leave the rest as written. Delete both insecure_skip_verify lines if both clusters' certificates are signed by a CA your machine trusts.
2. Choose the access and the directories¶
- For two-way writes, set
type = "PORTAL_READ_WRITE". The example'sPORTAL_READ_ONLYgives the spoke a read-only view of the hub directory. - To map another directory pair, add a second
qumulo_portal_rootblock with the sameportal_id. Two clusters share at most one portal, so every pair between them goes through this one.
The plan in step 3 shows the portal type and one qumulo_portal_root per directory pair.
3. Apply¶
The plan ends with Plan: 2 to add, 0 to change, 0 to destroy. Terraform creates the portal first, opening it on the spoke and accepting it on the hub, then proposes the directory pair and authorizes it on the hub.
The apply ends with Apply complete! Resources: 2 added, 0 changed, 0 destroyed., followed by the hub_status and spoke_status outputs.
4. Check the portal¶
Both outputs read ACTIVE. A DEGRADED status means the clusters reach each other only partly, and the port 3713 paths between the node addresses are the place to look.
Next¶
How hub and spoke portals behave is covered in Qumulo's Cloud Data Fabric documentation. The qumulo_portal reference and qumulo_portal_root reference list every attribute, and the cluster troubleshooting guide helps if a step fails.