An interactive application that generates real-world DevOps challenges in containers, provides hints, and verifies solutions. Currently focused on Linux troubleshooting, with more skills to be added in the future.
I built this project to keep reviewing and updating my DevOps skills, creating a hands-on learning environment for continuous improvement. I believe that strong Linux skills are the most important foundation for any DevOps professional, which is why this project initially focuses on Linux-based challenges.
Below is a screenshot showing the application in action:
- Generates realistic DevOps challenges using LLM integration
- Runs challenges in isolated Docker containers
- Provides hints when requested
- Verifies if the user's solution correctly resolves the challenge
- Tracks user progress and learning
- Python 3.9+
- Docker
- OpenAI API key (or other LLM provider)
-
Clone this repository:
git clone <repository-url> cd cb-devops-challenges/backend -
Install the dependencies:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt -
Set up your environment variable and add your OpenAI API key:
export OPENAI_API_KEY=your_api_key_here
- LLM Support: Currently only supports OpenAI's API. Support for additional LLM providers is on the roadmap.
- Container Runtime: Planning to migrate to Sysbox runtime for Docker, which will enable more realistic challenges by abstracting the container layer and supporting systemd, allowing for more complex system-level scenarios.
- User Interface: A frontend layer is planned to improve user experience and provide a more convenient interface for interacting with challenges.
-
Ensure Docker is running on your system before starting the application.
-
Start the application:
python main.py startYou can specify a difficulty level:
python main.py start --difficulty easyOptions are: easy, medium (default), hard
-
The application will check requirements and generate a challenge.
-
You'll see:
- Challenge title
- Description of the issue
- Container ID
- Command to connect to the container
-
Connect to the Container: Open a new terminal window and run the provided command:
docker exec -it <container-id> bash -
Investigate the Issue: Use appropriate commands to diagnose and troubleshoot the problem.
-
Request Hints (if needed):
- In the main application window (not the container terminal), you'll see a prompt asking "What would you like to do?"
- Type
hintand press Enter - The application will display a hint to help you solve the issue
- Each time you request a hint, you'll receive progressively more specific guidance
-
Apply a Solution: Based on your investigation and any hints, implement a solution in the container.
-
Verify Your Solution:
- In the main application window, when prompted for an action, type
verify - The application will check if your solution resolves the issue
- You'll receive feedback on whether your solution was successful
- In the main application window, when prompted for an action, type
-
Next Steps:
- If successful: You can choose to try another challenge or exit
- If unsuccessful: Continue troubleshooting and try again
-
Exit the Application: Type
quitwhen prompted for an action to clean up containers and exit.
-
Start the application and connect to the container.
-
Inside the container, try to ping a domain:
ping google.comYou'll see an error about unknown host.
-
Check if you can ping an IP address:
ping 8.8.8.8This should work, indicating a DNS issue.
-
Examine the DNS configuration:
cat /etc/resolv.confYou'll see it's empty or has only comments.
-
Add proper DNS nameservers to the file:
echo "nameserver 8.8.8.8" > /etc/resolv.conf echo "nameserver 8.8.4.4" >> /etc/resolv.conf -
Test DNS resolution again:
ping google.com
