Thank you for your interest in contributing to BrokenOps. This document outlines the process for contributing and the standards we expect from all contributors.
Bugs and feature suggestions should be submitted via GitHub Issues. When filing a bug report, please include:
- A clear, descriptive title
- Steps to reproduce the issue
- Expected vs. actual behavior
- Environment details (OS, software versions, etc.)
Feature requests should describe the problem you are trying to solve and the use case behind it.
BrokenOps labs live in the labs/ directory. Each lab is a self-contained
folder with the files described in LAB_FORMAT.md. Follow
these steps to contribute a new lab:
-
Fork the repository on GitHub.
-
Create a feature branch from
main:git checkout -b labs/my-new-lab
-
Create the lab folder at
labs/<lab-id>/and add the required files:lab.yaml— lab metadata and VM specificationcloud-init.yaml— provisioning and intentional break configurationverify.sh— score verification scriptsolution.sh— automated fix scriptquestion.md— task descriptionsolution.md— step-by-step solution guide
See LAB_FORMAT.md for the full specification of each file, including required field names and format templates.
-
Test your lab locally before opening a pull request:
python3 scripts/test_labs.py
Ensure
verify.shpasses once the fix fromsolution.shis applied and fails when the environment is in its broken state. -
Open a pull request against
main. Use the pull request template and fill in all requested sections.
All bash scripts in this repository must follow these standards:
- Shebang: Use
#!/bin/bashat the top of every script. Do not use#!/bin/sh. - Exit codes: Scripts must exit with
0on success and a non-zero value on failure. Theverify.shscript must exit0only when the lab is fully solved. - Error handling: Use
set -eandset -uat the top of scripts where appropriate to catch errors early. - Quotes: Always quote variables containing paths or user-supplied values
(e.g.,
"$VAR"not$VAR). - Style: Prefer
[[ ]]over[ ]for conditionals in new code.
When opening a pull request:
- Fill out the PR template completely. The template prompts you to describe the change, select the type of change, and verify lab requirements.
- For new labs, ensure all items in the "Lab Requirements" checklist are satisfied.
- Link any related GitHub issue using the "Closes #" syntax.
- Ensure
scripts/test_labs.pypasses for any new or modified labs. - A maintainer will review your PR and may request changes. Be responsive to feedback.
The platform consists of a backend (FastAPI application) and a frontend (React 19 + Vite interface). Both run inside Docker containers orchestrated by Docker Compose.
- Docker
- Docker Compose
- Python 3.10+ (for running test scripts locally)
./deploy.shThis script builds and starts all containers. The frontend is available at
http://localhost:80 and the backend is exposed by the FastAPI container.
python3 scripts/test_labs.pyBrokenOps/
├── labs/ # All training labs (one folder per lab)
│ └── <lab-id>/
│ ├── lab.yaml
│ ├── cloud-init.yaml
│ ├── verify.sh
│ ├── solution.sh
│ ├── question.md
│ └── solution.md
├── backend/ # FastAPI application
├── frontend/ # React 19 + Vite interface
├── scripts/
│ └── test_labs.py # Lab validation script
├── deploy.sh # Docker Compose deployment script
└── LAB_FORMAT.md # Lab authoring guide
By contributing to BrokenOps, you agree that your contributions will be licensed under the MIT License.