- Home
- Multi-Cloud Networking
- Multi-cloud networking CE-HA demo
- Deploy the demo
Deploy the demo
Prerequisites
Section titled “Prerequisites”- Terraform at the version floor in
terraform/versions.tf—>= 1.8, for provider-defined functions and thecheckblock that guards the VIP. - The
xcshprovider. Nothing pins a version:.terraform.lock.hclis gitignored and the constraint is an open-ended floor, so everyinitresolves the latest published release. That is deliberate for a prerelease project — the demo should fail on a provider regression rather than sit on a stale version that hides it. - An F5 XC API credential for the tenant in
var.expected_xc_tenant, exported asXCSH_API_TOKEN(or the P12/PEM pair). Export the credential only, never a URL — see below. - Azure credentials with rights to create a resource group, VNet, Route Server and VMs.
- A pre-existing F5 XC namespace for the app tier. The deployment reads it and never creates or destroys it, so a namespace holding unrelated demos can never land on this stack’s destroy list.
Supply variable values via tfvars
Section titled “Supply variable values via tfvars”Every variable has a default or derived default. For internet readers and reference deployments, supply your own values via terraform.tfvars so deployment-specific names, subscriptions, domains, and addresses are not hardcoded into configuration:
cd terraformcp terraform.tfvars.example terraform.tfvars| Variable | Default / Role | Why it should be customized |
|---|---|---|
origin_ip | (no default) | Public IP of your origin server (e.g. 203.0.113.10 from RFC 5737 documentation space). |
lb_domain | (no default) | FQDN for Rest of World traffic (e.g. mcn-ce-ha.f5-sales-demo.com or mcn.example.com). |
ca_lb_domain | mcn-ce-ha.f5-sales-demo.ca | FQDN for Canada-only traffic (e.g. mcn.example.ca). |
enable_canada | true | Toggle to deploy parallel Canadian regional infrastructure, virtual sites, and load balancer. |
ca_location | canadacentral | Azure region for Canadian CEs and Route Server. |
ca_hub_cidr | 10.200.0.0/16 | VNet CIDR block for Canadian Hub VNet (RFC 1918 space). |
ca_vip | 10.250.1.10 | HA VIP advertised by Canadian CEs via eBGP (must be outside VNet CIDRs). |
ca_re_cities | ["toronto", "montreal"] | List of Regional Edge cities for Canadian RE Virtual Site selector expression. |
Both origin_ip and domains are format-validated so a typo fails the plan rather than runtime routing.
terraform.tfvars is gitignored to protect sensitive environment variables, subscription IDs, and custom credentials.
The tenant is configuration, not whatever your shell is exporting
Section titled “The tenant is configuration, not whatever your shell is exporting”var.expected_xc_tenant names the tenant and is the only place it is named.
providers.tf derives the xcsh provider’s api_url from it, which deliberately
overrides any XCSH_API_URL in the environment, and a postcondition in
terraform/main.tf fails the plan when the environment names a different tenant.
Read either half without running anything that changes state:
terraform output -raw xc_tenant # what the deployment targetsterraform output -raw xc_env_tenant # what your shell claims — diagnostic onlyIllustrative output for a correctly matched configuration:
example-corpexample-corp-
Initialise. The backend config is not committed; supply your own.
Terminal window terraform init -upgrade -backend-config=backend.hcl -
First apply. This builds Azure, the CE sites and the registration token, and boots the CEs.
Terminal window terraform apply -
Apply again once the CEs have registered. This is not optional, and the reason is below rather than being something you discover.
Terminal window terraform apply
Then go to prove it healthy before showing it to anyone.
Registration approval is automated, and the apply is still two-phase
Section titled “Registration approval is automated, and the apply is still two-phase”Registration approval no longer needs a human in the console: the
xcsh_registration_approval resource performs it, and the site module resolves which
registration to approve.
That still does not make the deployment a single hands-off apply, and the reason is worth
understanding before you watch a first run and conclude it failed:
- A CE’s registration object is named
r-<uuid>. It is never named after the site, so nothing can predict the name at plan time. - The registration only exists after the VM has booted and
vpmhas registered. - So the first apply plans no approval at all. Re-apply once the CEs have registered and the approvals are created.
terraform/main.tf documents this ordering at the top of the file, which is the
authoritative version — the deploy sequence lives with the code that implements it.
Operator SSH is a build-time decision
Section titled “Operator SSH is a build-time decision”The deployment writes an operator key to the appliance admin account, whose login shell
is the Site CLI. It is written by cloud-init write_files, which runs once on first boot.
Clean up
Section titled “Clean up”terraform destroyThe app namespace survives: it is read, never managed, so destroy cannot take a namespace
holding unrelated demos with it. Everything else in the resource group goes.