Add a license catalog keyed by tier and add-on

Closes #26 (closed)

up --license-tier ultimate --license-addon self_hosted_dap selects a license from a catalog the operator owns, instead of taking whichever source discovery finds. The catalog is a JSON file outside the repo (SIM_LICENSE_CATALOG, default ~/.config/gitlab/simulation.license-catalog.json). Each entry maps a tier and add-ons to a file path or an env var name, never contents; a catalog that carries anything else is refused. The repo ships gce/fixtures/license-catalog.example.json with placeholder references only.

  • A pair the catalog lacks, or a source that is absent, fails up before provisioning and lists the catalogued pairs.
  • After activation up reads the plan and add-on names back from the instance. A mismatch fails up with failed_step license.
  • State records license_requested and license_verified (tier and add-on names only), surfaced in status --json, now schema_version 4.
  • The seat assignment defaults to the first requested add-on, so --license-addon self_hosted_dap no longer asks for a duo_enterprise seat.
  • Without the flags, discovery behaves as before. The flags refuse to combine with --license, --skip-activation, --no-gitlab or --base dev.

This catches the disagreement #8 (closed) describes at the up step when the caller asks through the catalog. It does not change just lab license, so #8 (closed) stays open for that recipe.

Proof:

  • The engine selftest covers a missing entry, a missing source, a mismatch and a match against stubbed sources, and asserts that no output or state carries the planted license contents.
  • One live run on GCE omnibus (19.5.6-ee, SIM_LICENSE_MODE=staging, no gateway) with a catalog entry pointing at an existing offline license file: license_requested and license_verified both read ultimate with self_hosted_dap. The VM is deleted.
  • Word budget stays at the ceiling: the License section of gce/bases.md lost as many words as it gained.
  • Local just skill-scan reports 32 of 36 accepted Tool Parameter Abuse findings in gce/engine-selftest.sh, on origin/main as well; the hosted pipeline is the gate for that count.
Edited by Andrew Dunn

Merge request reports

Loading
Loading