Spaces:
Sleeping
Sleeping
File size: 1,752 Bytes
2930dae 5b64237 2930dae 5510ae2 2930dae 5b64237 2930dae 5b64237 5510ae2 5b64237 5510ae2 5b64237 5510ae2 5b64237 5510ae2 5b64237 5510ae2 5b64237 5510ae2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | """
Linux DevOps tasks for SRE troubleshooting environment.
Task 1 (easy) — Restart crashed Nginx service
Task 2 (medium) — Fix Docker container misconfiguration
Task 3 (hard) — Debug and fix memory leak in mock API
"""
from __future__ import annotations
from typing import Any, Dict, List
# Nginx service configuration
NGINX_CONFIG_PATH = "/etc/nginx/nginx.conf"
NGINX_SYSTEMD_PATH = "/etc/systemd/system/nginx.service"
# Docker configuration
DOCKER_COMPOSE_PATH = "/srv/docker-compose.yml"
# Mock API code path
MOCK_API_PATH = "/opt/mockapi/app.py"
# ---------------------------------------------------------------------------
# TASK DEFINITIONS
# ---------------------------------------------------------------------------
TASK_META: Dict[str, Dict[str, Any]] = {
"task1": {
"name": "Nginx Service Recovery",
"difficulty": "easy",
"max_steps": 10,
"description": "The Nginx web server has crashed. Diagnose the issue, restart the service, and verify it returns HTTP 200 OK.",
"available_actions": ["bash_cmd", "file_edit", "submit"]
},
"task2": {
"name": "Docker Compose Port Fix",
"difficulty": "medium",
"max_steps": 15,
"description": "A Docker container is misconfigured with the wrong port mapping. Edit docker-compose.yml to fix it and restart the container.",
"available_actions": ["bash_cmd", "file_edit", "submit"]
},
"task3": {
"name": "Python API Memory Leak",
"difficulty": "hard",
"max_steps": 20,
"description": "A Python mock API has a memory leak. Find the process, kill it, patch app.py, and restart the service.",
"available_actions": ["bash_cmd", "file_edit", "submit"]
}
} |