How anishdubey27/sky-guardian works
Project Type and Purpose
• Sky-Guardian is a weather detection tool built using Django. It is primarily a full-stack web application that uses Django for its backend logic and renders HTML templates for the frontend.
• Beyond the core Django web app (e.g., the “weather” app and the “weatherdetector” configuration), the project integrates several DevOps and infrastructure management tools. These include Docker (Dockerfile, docker-compose.yml), CI/CD pipelines (Jenkinsfile, .circleci and GitHub workflows), configuration management (Ansible playbooks), container orchestration (Kubernetes manifests), and cloud provisioning (Terraform for AWS).
Main Components
a. Client/Frontend:
• Web browsers that load the HTML/CSS/JS content. Note that “templates” (index.html) and static content (under media) represent the frontend part.
b. Backend Application:
• The Django application represented by the “manage.py” entry point, the “weatherdetector” project folder (with settings, asgi.py, wsgi.py, and urls), and the “weather” app (containing models, views, URLs, etc.).
c. Database:
• The project currently uses SQLite (db.sqlite3) as its database.
d. Containerization & Orchestration:
• Docker: Incorporate the Dockerfile and docker-compose.yml. This shows how the application is containerized for development or production deployment.
e. CI/CD & DevOps Pipelines:
• CI/CD pipelines configured in GitHub workflows (.github/workflows/django.yml) and CircleCI (.circleci/config.yml).
• Jenkins pipeline (Jenkinsfile) indicating alternative or additional automation/integration steps.
f. Infrastructure Automation Tools:
• Ansible: Reference the playbooks for configuration management.
• Terraform: Include the AWS provisioning component from the terraform-aws folder.
Connections and Interactions
• Backend to the Database (SQLite) indicating data operations (CRUD).
• How CI/CD tools (GitHub Actions, CircleCI, Jenkins) trigger builds and tests, which then push images to the Docker or Kubernetes deployment.
• Configuration management and infrastructure provisioning (Ansible, Terraform) as separate but integrated components that manage the deployment environment.
• Optionally, indicate how Kubernetes deployments interact with external load balancers or cloud provider configurations.
Architectural Patterns and Design Principles
• The project uses a modular monolithic architecture (with separate “weather” app and project-level configuration in “weatherdetector”) typical for Django web apps.
• The DevOps integrations highlight a commitment to continuous integration/delivery, containerization, and scalable cloud deployments.
• The separation into frontend (templates and media assets), backend (Django application), and infrastructure management layers (Docker, Kubernetes, CI/CD tools) represents a clear separation of concerns.
Technology & Framework Details
• Django: Core framework handling both the web application logic and rendering.
• HTML/CSS and JavaScript: For presenting the frontend (as seen in the templates folder).
• Docker: To containerize the application for consistent environments.
• Kubernetes, Ansible, Terraform: For deployment across scalable and potentially cloud-based environments.
• CI/CD: Managed via CircleCI, GitHub Actions, and Jenkins to enforce continuous integration and delivery.