Tenancy Migration
Operations plugin Used occasionally, not day-to-dayThis plugin moves management of an entire OCI tenancy from one Mastermind instance to a completely separate one — a different deployment, different database, different encryption keys. It gathers every OCI Credential for that tenancy, every Kubernetes Cluster reachable from them (node pools, network security groups, subnets, namespaces, allowed customers), every Ecopoeisis tool configuration on those clusters, and every Deployment Set deployed to them — including literal secret values (Kubernetes Secrets, Certificates, kubeconfigs, and the tenancy's own API signing key) — into a single downloadable file. That file can then be uploaded to a different Mastermind instance, which recreates everything and can immediately take over managing that tenancy.
There is no "Tenancy" record anywhere else in Mastermind — a tenancy is just the OCID string shared by one or more OCI Credential rows. Exporting is always anchored on one OCI Credential you pick; everything else that belongs to the same tenancy OCID is gathered automatically.
Exporting a tenancy
- Go to OCI Credentials and click Export Tenancy next to the credential for the tenancy you're moving.
- Enter a passphrase (and confirm it) — at least 12 characters. This passphrase is the only thing protecting the downloaded file, since it contains real secret values. It is never stored by Mastermind and can't be recovered if lost.
- A file downloads. Hand it to whoever administers the destination instance, along with the passphrase, through a channel you trust (the passphrase should never travel the same way as the file itself).
Importing a tenancy
On the destination instance, use this plugin's own page (linked from OCI Credentials as "Import Tenancy…"). Importing is two steps:
- Preview — upload the file and enter the passphrase. Nothing is written yet; this just decrypts the file and shows what it contains (counts of credentials, clusters, deployment sets) and which exported clusters had an Ansible Tower instance assigned on the source.
- For each cluster that needs one, pick one of this instance's own Ansible Tower instances — the source instance's Tower assignment is never trusted directly, since the destination almost certainly has its own, separately configured Tower.
- Commit Import — recreates everything with fresh IDs. If anything collides with something already on this instance (a cluster or credential name already in use, for example), the entire import is rolled back — nothing partial is ever left behind; fix the collision and try again.
One exception to "fresh IDs everywhere": a Customer is matched by its billing code — if a customer with the same billing code already exists on the destination, the import reuses it rather than creating a duplicate.
Secret handling and 1Password references
Literal secret values (a Secret's values, a Certificate's key pair, a kubeconfig, the tenancy's own API signing key) travel in the file re-encrypted under your passphrase, and are re-encrypted again under the destination instance's own encryption key once imported — they're never written to disk unencrypted at either end.
A deployment_sets secret can also hold a op://vault/item/field 1Password
reference instead of a literal value. Those travel through an export/import unchanged —
Mastermind never resolves them during export. After a successful import, it tries
resolving every one against this instance's own 1Password access, purely to
report which ones work and which don't; a failure here never blocks the import itself. The
import result lists exactly which references couldn't be resolved, so you know what needs
a 1Password vault-access grant on the destination before those secrets will actually
redeploy.
One exception: an Admin OCI Credential's own 1Password reference is never checked, on either side. This backend's 1Password service account is deliberately never granted access to that particular vault (only a separate, Ansible-Tower-only service account can resolve it) — the import result lists these separately, as "verify manually," rather than lumping them in with a real failure.
What doesn't travel
- Anything that's a resync-safe cache of live OCI/Kubernetes state — node pools, network security groups, and subnets are included as a best-effort bootstrap, but get fully overwritten the next time the destination syncs that cluster.
- NSG Shapes (reusable rule templates) — not tied to a tenancy, set these up on the destination instance separately if needed.
- Deploy history beyond each release's latest version, and anything tied to the source's own Ansible Tower job IDs — those are meaningless on a different Tower.
Permissions
export and import — deliberately separate from every other
plugin's own permissions, and from each other. export can read literally
every secret under a tenancy in one action; import can create or change rows
across half a dozen plugins in one action. Grant both sparingly.