Skip to content

Improve CTF testing orchestration scripts #88

Description

@madebygps

Summary

Improve the CTF testing scripts so the cloud validation flow is easier to maintain, safer to run, and clearer when failures happen.

Current state

The current testing flow works, but the local orchestration script has grown into a lot of Bash logic. It now handles Terraform, provider-specific values, SSH retries, setup marker checks, reboot flow, remote script copying, cleanup, and final reporting.

That is a lot of state and branching for Bash.

Proposed direction

  • Keep the VM-side challenge validation shell script for now because it runs learner-like Linux commands and proves the real student experience works.
  • Consider replacing the local deploy-and-test orchestration script with Python.
  • Use Python to manage Terraform subprocess calls, SSH/SCP subprocess calls, retries, timeouts, reboot handling, cleanup, logging, and clearer failure reporting.
  • Keep reboot testing optional instead of part of the default run.
  • Later, consider moving challenge checks into structured test data, while still executing shell commands on the VM.

Why this helps

  • Cleaner error handling and timeout handling.
  • Easier provider-specific branching.
  • More reliable cleanup behavior for paid cloud resources.
  • More readable test output when a provider, setup step, or challenge fails.
  • Easier future testing improvements without adding more complex Bash.

Notes

Reboot testing is useful, but should remain a deeper validation step. It is most important when changing systemd services, persistence paths, setup markers, verify state, or before a release.

Metadata

Metadata

Assignees

Labels

DevOpsDevOps, CI/CD, and infrastructurebashBash/shell scripting

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions