/ftl:rhdp-lab-validator

๐Ÿš€ RHDP ZT Lab Validator

Generate runtime-automation/module-N/{solve,validation,setup}.yml playbooks for RHDP showroom labs using the Zero Touch (nookbag) grading system. Works for OCP tenant, OCP dedicated+bastion, RHEL VM+bastion, and AAP labs.

Different from /ftl:lab-validator โ€” that skill generates external FTL grader containers (grade_lab/solve_lab). This skill generates inline runtime-automation playbooks that run inside the showroom runner sidecar, powering the Solve/Validate buttons in the nookbag UI.


Workflow Overview

โ–ถ /ftl:rhdp-lab-validator
โ†“
Step 0 โ€” First question
What type of lab?
1. OCP multi-user โ€” shared cluster, student gets scoped namespaces
2. OCP dedicated โ€” student has cluster-admin, lab has a bastion VM
3. RHEL VM โ€” bastion + node VMs, runner runs ON the bastion

This determines runner location, SSH patterns, kubernetes.core vs shell.
โ†“
Step 1 โ€” Immediately
Showroom Repo โ†’ Scaffold
Read titles only (= Title per .adoc) for module count and labels.

Generate: ui-config.yml ยท verify site.yml nookbag v0.0.3 ยท runtime-automation/module-N/ stubs

Commit + push. Do NOT order yet.
โ†“
Step 2 โ€” Optional
AgV Catalog โ€” Check ZT Roles
Reads workloads: only โ€” is the FTL ZT role present?
Missing โ†’ offer to create branch and add it

Once both scaffold + AgV ready:
"Order the lab from integration.demo.redhat.com"
๐Ÿ’ก /rename ZT grading โ€” <lab-name> to resume after wait
โ†“
Step 3 โ€” While env provisions
Existing Scripts?
Share any .sh scripts or playbooks โ€” module by module.
Claude reads them and auto-generates matching validation tasks.
Nothing โ†’ generate from scratch in Step 5.
โ†“
Step 4 โ€” Required
GUID Ready โ†’ Connect
OCP (types 1 + 2):
oc login <api-url> --token <admin-token> --insecure-skip-tls-verify
Claude verifies: zt-runner SA ยท kubeconfig Secret ยท RoleBindings

RHEL VM (type 3):
Share bastion host / port / password โ†’ Claude SSHes to check runner

Confirm /runner/api/config returns module list.
โ†“
Step 5 โ€” ONE MODULE AT A TIME
Read Module N .adoc โ†’ Generate
Full content read of this module only. Extract every student task.
Auto-detect manual steps (browser/GitHub) โ†’ โš ๏ธ warning pattern.

Generate solve.yml + validation.yml โ€” multi-task โœ…/โŒ mandatory.

STOP. Give curl commands immediately.
OCP: curl -sk https://<showroom>/runner/api/module-N/solve
RHEL: curl -s http://localhost:8501/api/module-N/solve
โ†“
Step 6
Paste Results โ†’ Debug โ†’ Repeat
Developer pastes curl output โ†’ Claude diagnoses and fixes โ†’ re-test
โœ… Module N passes โ†’ proceed to Module N+1 (back to Step 5)
More
modules?
YES
Back to Step 5 โ€” read that module's .adoc only then.
โ†‘ Step 5
DONE
All modules generated and passing โœ…
โ†“
โœ… All Modules Generated & Tested

Lab Types Supported

Lab TypeConfigValidation PatternKey Extravar
OCP Tenantconfig: namespacekubernetes.core.k8s_info in student namespacestudent_ns, k8s_kubeconfig
OCP Dedicatedconfig: openshift-workloadsk8s admin + bastion bash script + oc --as developerbastion_host, k8s_kubeconfig
RHEL VM + Bastionconfig: cloud-vms-baseSSH via /app/.ssh/config to bastion + nodesbastion_host, bastion_port
AAPanyansible.builtin.uri against AAP Controller APIaap_controller_url, aap_token

What It Creates

runtime-automation/
โ”œโ”€โ”€ module-01/
โ”‚   โ”œโ”€โ”€ setup.yml       # debug stub
โ”‚   โ”œโ”€โ”€ solve.yml       # creates resources / runs scripts
โ”‚   โ””โ”€โ”€ validation.yml  # โœ…/โŒ per-task output
โ”œโ”€โ”€ module-02/
โ”‚   โ”œโ”€โ”€ solve-module2.sh     # bash script (if applicable)
โ”‚   โ”œโ”€โ”€ validate-module2.sh  # bash script (if applicable)
โ”‚   โ””โ”€โ”€ ...

Plus ui-config.yml snippet and AgV workload vars snippet.


Handling Existing Scripts

When developers already have bash scripts (like .sh or .sh.j2 from Ansible roles), the skill wraps them automatically:

Scripts in the showroom repo โ†’ ansible.builtin.script (copies to bastion + runs):

- ansible.builtin.script:
    executable: /bin/bash
    cmd: "/solve-module1.sh"

Scripts already on the bastion โ†’ ansible.builtin.shell (runs in-place):

- ansible.builtin.shell: /home/lab-user/scripts/solve-module1.sh

The skill reads the solve script content to generate a matching validation.yml automatically.


Tips: Getting the Most from This Skill