Make the first run work for a newcomer: root lab recipes, sign-in file, progress

Closes #45 (closed) Closes #21 (closed)

A first run from a fresh clone took 21 minutes to the first lab and hit six gaps before anything else worked. This fixes each one, and the README wording on the publication prompt.

What changes

  1. README preflight at the repo root. A root mod lab delegates to the skill's lab.just, so just lab preflight works from the repo root. The README also gives the plugin-only form (cd ~/.claude/plugins/marketplaces/gitlab-simulation). contrib stays in the skill's justfile.
  2. Signing in. up writes the root password to <instance>.root-password in the state directory (mode 600). up and status print only that path. SIM_ROOT_PASSWORD was never forwarded to the install; it now is, and the omnibus default is unchanged. A caproni lab's password is read from the chart's secret on the VM. down removes the file.
  3. Prerequisites. getting-started lists mise, ssh-keygen and the Compute Engine and IAP APIs, and points at first-run.md for the detail. first-run.md gains the IAP API row.
  4. Project-wide firewall rules. up logs one line when it creates allow-iap-ssh-4252 or allow-http-https. operations.md documents both rules and that down leaves them.
  5. Progress. up starts with one line pointing at just lab status --json (step_index of the total). The idle self-delete ... (answer: none) warning now says it is usually the VM's 5-minute timer not having reported yet, and how to read the answer later. operations.md's troubleshooting table has the same row. just lab hold is called out where up and the long OpenShift install are described.
  6. Preflight's closing line says what it read, and that it does not test billing, firewall-create rights or organization policies.
  7. #21 (closed). The README says a host with no prompt, or a mode that skips prompts, posts at once, so the agent shows the exact draft and waits for a yes.

The newcomer path

flowchart TD
  A[Install the plugin or clone the repo] --> B[Prerequisites: mise, just, jq, gcloud, ssh-keygen, Compute and IAP APIs]
  B --> C["just lab preflight, from the repo root or the plugin directory"]
  C -->|a step is missing| B
  C -->|every read passes| D[just lab up]
  D --> E["up prints a pointer to just lab status --json, then logs each project-wide firewall rule it creates"]
  E --> F["Optional: just lab hold before a long quiet step"]
  F --> G["up ends with the GitLab URL and the path of the 0600 root password file"]
  G --> H["Sign in as root with the password read from that file"]
  H --> I[just lab down]

Proof

Each change has a selftest that goes red without it: the password file (written, mode 600, path printed, password never printed, caproni read, removed by down, SIM_ROOT_PASSWORD forwarded), the start line, both firewall log lines, the idle warning wording, preflight's closing line, and the root lab delegation (the argument-injection cases now run through the root justfile too). I ran each selftest against the unchanged engine, iap and preflight scripts and against the old root justfile, and each failed. The YAML-gate fixture copies the root justfile, so it now copies lab.just beside it.

Live, on an omnibus lab from a fresh clone of this branch, following only the README and getting-started:

  • just lab preflight ran from the repo root and passed 17 of 17 with the new closing lines.
  • up printed the progress pointer first. just lab status --json from a second terminal showed startup_wait, step 3 of 11, then rails_config, step 9 of 11.
  • The password file existed with mode 600. Its path was printed by up and status; the password was in neither.
  • Signing in as root with the password read from the file returned 302, and a signed-in page then returned 200.
  • us-central1-a had no capacity, so up landed in us-central1-b and said so.
  • No firewall line printed, because both project-wide rules already existed in the test project. The selftests cover the creation path.
  • down deleted the VM and the state and password files, and the project's list of lab VMs came back empty.

The skill's word count is 40485 of the 40489 ceiling. The added text is paid for by cuts to derivable detail in operations.md (a key list, the max-runtime table, an expiry note).

AI-Assisted: yes

Merge request reports

Loading
Loading