|
| 1 | +--- |
| 2 | +name: test-playbooks |
| 3 | +description: Test Ansible playbooks across Ubuntu versions on target machines |
| 4 | +--- |
| 5 | + |
| 6 | +## Prerequisites |
| 7 | +- Virtualenv activated (`source .venv/bin/activate` or `source /opt/deepops/env/bin/activate`) |
| 8 | +- Target machines provisioned and accessible via SSH |
| 9 | +- Inventory configured: either `config/inventory` (static) or `config/maas-inventory.yml` (MAAS dynamic) |
| 10 | + |
| 11 | +## Steps |
| 12 | +1. Verify connectivity: `ansible -m ping all` |
| 13 | +2. Run playbook: `ansible-playbook playbooks/<playbook>.yml` |
| 14 | +3. Verify results (check playbook output, run smoke tests on targets) |
| 15 | +4. To test another OS version: reprovision targets with the new OS, re-run playbook, verify again |
| 16 | + |
| 17 | +## Test Matrix |
| 18 | +| Playbook | Inventory groups needed | Test on 24.04 | Test on 22.04 | |
| 19 | +|----------|------------------------|---------------|---------------| |
| 20 | +| k8s-cluster.yml | kube_control_plane, kube_node, etcd | yes | yes | |
| 21 | +| slurm-cluster.yml | slurm-master, slurm-node | yes | yes | |
| 22 | +| ngc-ready-server.yml | (any host group) | yes | yes | |
| 23 | + |
| 24 | +## MAAS Users |
| 25 | +If using MAAS dynamic inventory (`scripts/maas_inventory.py`), the deploy script automates provisioning: |
| 26 | +```bash |
| 27 | +./scripts/maas_deploy.sh --status # check VM state |
| 28 | +./scripts/maas_deploy.sh --os noble --profile k8s # deploy + tag for K8s |
| 29 | +./scripts/maas_deploy.sh --os jammy --profile slurm # deploy + tag for Slurm |
| 30 | +./scripts/maas_deploy.sh --profile k8s --tags-only # re-tag without redeploying |
| 31 | +./scripts/maas_deploy.sh --release # release VMs |
| 32 | +``` |
| 33 | +Profiles assign MAAS tags that the dynamic inventory maps to Ansible groups: |
| 34 | +- **k8s**: first machine = `kube_control_plane` + `etcd`, remaining = `kube_node` |
| 35 | +- **slurm**: first machine = `slurm-master`, remaining = `slurm-node` |
| 36 | + |
| 37 | +## Group Naming |
| 38 | +- K8s groups use underscores: `kube_control_plane`, `kube_node`, `k8s_cluster` |
| 39 | +- Slurm groups use hyphens: `slurm-master`, `slurm-node`, `slurm-cluster` |
| 40 | +- Old hyphenated K8s names (`kube-master`, `kube-node`) are accepted via TAG_ALIASES |
0 commit comments