learntocloud / learntocloud/linux-ctfs

Improve CTF testing orchestration scripts

Open
#88 1 comment 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

bash DevOps
Dominant language
Python
Stars
284
Forks
379
Avg merge
2m
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.