Linux / Practice /

β–ŒDEVOPS COMMAND TRAINING SYSTEM
Master 175+ DevOps commands through interactive quizzes and hands-on practice

Linux Practice - DevOps Command Training

πŸš€ Launch Practice App β†’

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.

Python 3.11+ Tests License

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

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

  1. Create validator in linux_practice/validators/<category>/
  2. Register in linux_practice/validators/__init__.py
  3. Add challenges to challenges.json
  4. 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

  1. Fork the repository
  2. Create a feature branch
  3. Write tests for new features
  4. Ensure all tests pass: pytest
  5. 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.