Linux / Practice /
βDEVOPS COMMAND TRAINING SYSTEM
Master 175+ DevOps commands through interactive quizzes and hands-on practice
Linux Practice - DevOps Command Training
An interactive web application to master 175+ Linux, Docker, Kubernetes, AWS, Azure, and Terraform commands through hands-on quizzes. Build muscle memory for DevOps commands with progressive hints, instant feedback, and smart validation.
Features
- 175+ Practice Challenges across Linux, Docker, Kubernetes, AWS, Azure, Terraform, and Ansible
- 3-Level Progressive Hints: Get help without giving away the answer
- Smart Validation: Accepts multiple correct command variations with partial credit
- Interactive Web UI: Terminal-style interface in your browser
- RESTful API: Flask backend with session management
- 95 Tests: Comprehensive test coverage for reliability
- Docker Support: Containerized deployment
- Category & Difficulty Filters: Practice exactly what you need
Quick Start
Option 1: Docker (Recommended)
docker build -t linux-practice .
docker run -p 8000:8000 linux-practice
Open your browser to: http://localhost:8000
Option 2: Python (Development)
# Install dependencies
pip install -r requirements.txt
# Run the application
python app.py
Open your browser to: http://localhost:8000
API Endpoints
Start Quiz
POST /api/quiz/start
{
"num_questions": 10,
"category": "linux", # Optional
"difficulty": "beginner" # Optional
}
Validate Answer
POST /api/quiz/validate
{
"session_id": "xxx",
"command": "ls -la"
}
Get Hint
POST /api/quiz/hint
{
"session_id": "xxx"
}
Skip Question
POST /api/quiz/skip
{
"session_id": "xxx"
}
Get Next Question
POST /api/quiz/next
{
"session_id": "xxx"
}
Get Stats
GET /api/quiz/stats/<session_id>
Project Structure
linux-practice/
βββ app.py # Flask application
βββ run.py # Application runner
βββ challenges.json # Quiz questions database
βββ requirements.txt # Python dependencies
βββ requirements-test.txt # Test dependencies
βββ pytest.ini # Test configuration
βββ Dockerfile # Docker build file
βββ docker-compose.yml # Docker Compose config
βββ linux_practice/ # Main package
β βββ core/ # Business logic
β β βββ challenge.py # Challenge data model
β β βββ quiz.py # Quiz engine
β βββ validators/ # Command validators
β βββ base.py # Base validator
β βββ linux/ # Linux commands
β βββ docker/ # Docker commands
β βββ kubernetes/ # Kubernetes/Helm
β βββ aws/ # AWS CLI
β βββ azure/ # Azure CLI
β βββ terraform/ # Terraform
β βββ ansible/ # Ansible
βββ tests/ # Test suite (95 tests)
β βββ conftest.py # Test fixtures
β βββ test_app.py # API tests
β βββ test_quiz_engine.py # Engine tests
β βββ test_validators.py # Validator tests
β βββ test_security.py # Security tests
βββ web/ # Web interface
βββ index.html # Main page
βββ quiz.html # Quiz interface
βββ assets/ # Static assets
Development
Running Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=linux_practice --cov=app
# Run specific test file
pytest tests/test_app.py
# Run specific test
pytest tests/test_app.py::TestClass::test_method
Code Quality
# Linting
flake8 .
# Security scan
bandit -r linux_practice/ app.py
# Dependency check
safety check
Adding New Commands
- Create validator in
linux_practice/validators/<category>/ - Register in
linux_practice/validators/__init__.py - Add challenges to
challenges.json - Write tests in
tests/test_validators.py
See CLAUDE.md for detailed development guidelines.
Categories
- Linux: File operations, text processing, system monitoring, networking, archives, processes
- Docker: Container lifecycle, networking, volumes, Compose
- Kubernetes: kubectl, Helm charts, deployments
- AWS: S3, EC2, Lambda, IAM, CloudFormation, EKS, RDS, ECS, ECR, SSM, DynamoDB, SNS, SQS, CloudWatch
- Azure: VM, Storage, AKS, ACR, Network, Resource Groups
- Terraform: init, plan, apply, destroy, state, workspace
- Ansible: Playbooks, vault, galaxy, inventory
Requirements
- Python 3.11+
- Flask 3.0+
- pytest 7.4+ (for development)
Docker
The application includes:
- Multi-stage build for optimized image size
- Health checks for container monitoring
- Non-root user for security
- Efficient caching for faster builds
# Build
docker build -t linux-practice .
# Run
docker run -p 8000:8000 linux-practice
# Using docker-compose
docker-compose up
Contributing
- Fork the repository
- Create a feature branch
- Write tests for new features
- Ensure all tests pass:
pytest - Submit a pull request
License
MIT License - see LICENSE file for details
Support
For issues or questions, please open an issue on GitHub.
Built for DevOps engineers who want to master command-line tools through practice, not memorization.