Lab17 is done#4268
Open
AEZuraa wants to merge 32 commits into
Open
Conversation
Implemented Flask-based web service for DevOps monitoring and diagnostics. Application features: - GET / endpoint with comprehensive system information - GET /health endpoint for monitoring - Environment-based configuration (HOST, PORT=8080, DEBUG) - Error handling for 404 and 500 errors - Structured logging with INFO level Code quality: - PEP 8 compliant code with docstrings - Clean modular structure - Proper imports organization Documentation: - Complete README.md with installation and usage instructions - Detailed LAB01.md with framework justification and best practices - Real API responses from MacBook-Pro--Egor.local system - 3 screenshots demonstrating endpoints functionality Configuration: - requirements.txt with pinned versions (Flask 3.1.0, Werkzeug 3.1.3) - .gitignore for Python, IDE, and OS files - Tests directory prepared for Lab 3
Go implementation of DevOps Info Service: - Same endpoints: GET / and GET /health with identical JSON structure - Standard library only (net/http, encoding/json, runtime, os, time) - Real API responses from MacBook-Pro--Egor.local (go1.25.6, arm64) - Documentation: README, GO.md (language justification), LAB01.md - 5 screenshots: build, running, main endpoint, health, size comparison - Binary 5.2MB vs Python venv 21MB, memory 7MB vs 35.5MB Fixes in Python docs: - Logger example matches app.py (HOST:PORT) - Removed Lab 3 and Kubernetes probes references
Docker containerization for Python and Go implementations: Python container: - Dockerfile with python:3.12-slim base image - Non-root user (appuser) for security - Layer caching optimization (requirements.txt before app.py) - .dockerignore for efficient builds - Pushed to Docker Hub: aezuraa/devops-info-service:python Go multi-stage build: - Two-stage Dockerfile (golang:1.23-alpine → alpine:3.19) - Static binary - 91.5% size reduction - Pushed to Docker Hub: aezuraa/devops-info-service:go Documentation: - Updated README.md with Docker sections for both apps - app_python/docs/LAB02.md: best practices, real terminal outputs, tagging strategy - app_go/docs/LAB02.md: multi-stage analysis, security benefits, performance comparison
- Unit tests: 27 Python tests (97% coverage), 22 Go tests (75.9% coverage) - GitHub Actions: python-ci.yml and go-ci.yml with path filters - CI pipeline: flake8/golangci-lint → tests → Docker build+push → Snyk scan - CalVer versioning with 3 tags per build (latest, date, SHA) - Best practices: caching, concurrency, job dependencies, coverage threshold - Documentation: LAB03.md for both apps
- Terraform: Yandex Cloud VM, VPC, subnet, security group (SSH/80/5000), variables, outputs, .tflint.hcl, README; service account auth - Pulumi: same infrastructure in Python (pulumi-yandex), local backend - docs/LAB04.md: provider choice, Terraform/Pulumi steps, outputs, SSH proof, Terraform vs Pulumi comparison, Lab 5 plan and cleanup - .github/workflows/terraform-ci.yml: validate on terraform/** (fmt, init, validate, tflint) - terraform/github/: GitHub provider and repository resource for import (bonus) - .gitignore: tfstate, tfvars, .terraform, pulumi/venv, Pulumi.*.yaml, credentials
…pp, CI/CD - Add blocks, rescue/always, and tags to common, docker, web_app roles - Deploy via Docker Compose (docker-compose.yml.j2 template) - Wipe logic with double-gating (variable + tag) - Multi-app: deploy_python, deploy_bonus, deploy_all; independent wipe - GitHub Actions: ansible-deploy.yml (Python), ansible-deploy-bonus.yml (Go) - Add LAB06.md with documentation and evidence
- Create dummy vault pass in CI lint step to fix syntax-check - Fix yaml[truthy]: yes/no → true/false across all playbooks and roles - Fix key-order: reorder block-level keys per ansible-lint spec - Replace apt-get commands with apt module in rescue blocks - Add changed_when/failed_when instead of ignore_errors - Rename registered vars to web_app_* prefix - Add .ansible-lint config to skip var-naming for role defaults
- Deploy Loki 3.0 (TSDB/v13), Promtail 3.0, Grafana 12.3 via Docker Compose - Add structured JSON logging to Python app with custom JSONFormatter - Integrate both apps (Python/Go) with Promtail Docker SD and logging labels - Create 4-panel Grafana dashboard with LogQL queries - Add resource limits, health checks, and Grafana auth via .env - Add Ansible monitoring role with Jinja2 templates and idempotent deployment - Document setup, architecture, LogQL examples, and evidence screenshots
Instrument Python app with /metrics (Counter/Gauge/Histogram) and tests, add Prometheus service + scrape config, provision Grafana datasources/dashboards, and extend Ansible monitoring role; document LAB08 with evidence screenshots.
…on for Helm charts
…docs, and verification screenshots
…nt/coverage failures
Add ArgoCD Application resources pointing to the Helm chart in k8s/devops-info-python for the default (manual sync), dev (auto-sync with selfHeal+prune), and prod (manual sync) environments. Bump the dev nodePort to 30081 so dev and default can coexist on the same cluster.
…plicationSet Add dev/prod Application manifests (dev: auto-sync+selfHeal+prune, prod: manual), an ApplicationSet with a List generator as the bonus task, evidence logs from the self-healing tests, and full documentation in k8s/ARGOCD.md. Bump dev replicaCount to 2 to exercise the GitOps workflow after push.
Capture the end-to-end push→hard-refresh→OutOfSync→auto-sync→Synced flow in §5, including the recorded argocd app history with the ccac837 sync event. Update replica counts and sync-status outputs throughout §2–§3 and §7 to match the post-push state (dev now at 2 replicas), and tighten a few stale notes about hooks and sync history.
…-green, and analysis-driven auto-rollback
… ServiceMonitor scraping
Signed-off-by: Dmitrii Creed <creeed22@gmail.com>
Signed-off-by: Dmitrii Creed <creeed22@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.