This repository demonstrates a complete DevOps implementation using modern tools and best practices. You'll learn by doing - from basic application deployment to advanced GitOps automation.
โ Node.js Application - Simple calculator web app โ CI/CD Pipeline - GitHub Actions automation โ Docker Containerization - Multi-stage production builds โ Kubernetes Orchestration - Local cluster with KinD โ Argo CD GitOps - Automated deployments from Git โ Manual Testing - Comprehensive validation scenarios
graph TD
A[๐ Start Here - README] --> B[๐งฎ Calculator App]
B --> C[๐ง CI/CD Pipeline]
C --> D[๐ณ Docker Setup]
D --> E[โธ๏ธ Kubernetes Cluster]
E --> F[๐ Argo CD GitOps]
F --> G[๐งช Manual Testing]
G --> H[๐ Complete Learning]
style A fill:#e1f5fe
style B fill:#f3e5f5
style C fill:#e8f5e8
style D fill:#fff3e0
style E fill:#fce4ec
style F fill:#f1f8e9
style G fill:#ede7f6
This is a simple calculator web application built with HTML, CSS, and JavaScript that runs on Node.js. It's the perfect starting point for learning DevOps because:
- ๐ฏ Simple to understand - Basic web application
- ๐งช Easy to test - Clear functionality to validate
- ๐ง Modular design - Easy to modify and extend
- ๐ฆ Production ready - Demonstrates real-world patterns
# 1. Start the application locally
node server.js
# 2. Open browser to:
open http://localhost:3000
# 3. Test calculator functionality:
# - Click number buttons (1, 2, 3...)
# - Click operations (+, -, ร, รท)
# - Click equals (=) to calculate
# - Click clear (C) to reset- โ Basic arithmetic - Addition, subtraction, multiplication, division
- ๐ข Decimal support - Floating point calculations
- ๐งน Clear function - Reset calculator state
- ๐ฑ Responsive design - Works on mobile and desktop
- โก Fast performance - Lightweight and optimized
Now that you understand the application, let's implement continuous integration and deployment.
CI/CD (Continuous Integration/Continuous Deployment) automates the process of building, testing, and deploying applications. Every code change triggers automated validation and deployment.
# View the complete CI/CD pipeline
cat .github/workflows/ci.ymlWhat the pipeline does:
- โ Multi-Node Testing - Tests on Node.js 18.x and 20.x
- โ Application Validation - Verifies server starts and responds
- โ Content Testing - Ensures calculator HTML is served
- โ Syntax Checking - Validates JavaScript and HTML
- โ Error Detection - Catches issues before deployment
# The pipeline runs automatically on:
# - Every push to main/master/develop branches
# - Every pull request to main/master/develop branches
# Check pipeline status in GitHub Actions tab
# or run tests locally๐ Read Complete CI/CD Implementation Guide โ
Containers package applications with their dependencies, ensuring consistent behavior across different environments. Your calculator becomes portable and deployment-ready.
# View Docker setup guide
cat docs/DOCKER_ORGANIZATION.mdWhat you'll learn:
- ๐๏ธ Multi-stage builds - Optimized production images (~50MB vs ~200MB)
- ๐ Security hardening - Non-root user, minimal attack surface
- โก Performance optimization - Layer caching, build efficiency
- ๐ฆ Container orchestration - Ready for Kubernetes deployment
# Build optimized image
docker build -f docker/Dockerfile -t simple-calculator:latest .
# Run containerized application
docker run -d -p 3000:3000 --name calculator-app simple-calculator:latest
# Test container functionality
curl http://localhost:3000
# View container logs
docker logs calculator-app
# Clean up
docker stop calculator-app && docker rm calculator-app๐ Read Complete Docker Implementation Guide โ
Kubernetes automates deployment, scaling, and management of containerized applications. It provides the foundation for production-ready deployments.
# View Kubernetes setup guide
cat docs/KUBERNETES_GUIDE.mdWhat you'll learn:
- ๐ Deployment management - Pod lifecycle and scaling
- ๐ Service networking - Load balancing and service discovery
- ๐ Health monitoring - Liveness and readiness probes
- ๐ Resource management - CPU and memory allocation
- ๐ง Rolling updates - Zero-downtime deployments
# Create local cluster (if not exists)
kind create cluster --name kind
# Deploy application
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yaml
# Scale application
kubectl scale deployment simple-calculator --replicas=3
# Access application
kubectl port-forward service/simple-calculator-service 8080:80
open http://localhost:8080
# Monitor deployment
kubectl get pods -l app=simple-calculator -w๐ Read Complete Kubernetes Implementation Guide โ
GitOps uses Git as the single source of truth for infrastructure and applications. Every change goes through Git workflows, enabling better collaboration and audit trails.
# View GitOps setup guide
cat docs/ARGOCD_GUIDE.mdWhat you'll learn:
- ๐ Automated deployments - Changes sync automatically from Git
- โช Rollback capability - Instant revert to previous versions
- ๐ง Self-healing - Automatic drift correction
- ๐ Observability - Complete sync and health monitoring
- ๐ Security - RBAC and approval workflows
# Access Argo CD dashboard
kubectl port-forward svc/argocd-server -n argocd 8082:443
open https://localhost:8082
# Check application status
kubectl argo app get simple-calculator
# View managed resources
kubectl argo app get simple-calculator -o tree
# Make a change and watch auto-sync
vim k8s/deployment.yaml
# Change replica count, save, commit, push
git add k8s/deployment.yaml && git commit -m "Test auto-sync" && git push๐ Read Complete Argo CD Implementation Guide โ
Now that everything is deployed, let's validate that your entire DevOps implementation works correctly.
# View testing guides
ls testing/
# ARGOCD_MANUAL_TESTS.md CI_PIPELINE_MANUAL_TESTS.md๐ Testing Scenarios Available:
- ๐ Access Control Test - Dashboard security validation
- ๐ Monitoring & Observability Test - Application status monitoring
- ๐ฌ End-to-End Application Test - Complete functionality validation
- โช Rollback Test - Version rollback capability
- ๐ง Self-Healing Test - Automatic drift correction
- ๐ Update Application Version - Rolling update testing
- ๐ Scale Application - Horizontal scaling validation
- ๐จ Color Palette Test - UI customization changes
- ๐ค Text Content Test - Content modification testing
- ๐งฎ Calculator Functionality Test - Mathematical operations
- ๐ Performance Test - Response times and load handling
- ๐ Security Headers Test - Security implementation
- ๐ Cross-Browser Compatibility Test - Multi-browser support
- ๐ GitOps Integration Test - Complete CI/CD + Argo CD workflow
# View Argo CD tests
cat testing/ARGOCD_MANUAL_TESTS.md
# View CI Pipeline tests
cat testing/CI_PIPELINE_MANUAL_TESTS.md
# Follow step-by-step instructions in each file
# Run commands manually to validate each component- โ Application Development - Node.js web application
- โ CI/CD Automation - GitHub Actions pipeline
- โ Containerization - Docker multi-stage builds
- โ Orchestration - Kubernetes deployment and scaling
- โ GitOps - Argo CD automated deployments
- โ Testing - Manual validation scenarios
- ๐ Continuous Integration - Automated testing and validation
- ๐ Continuous Deployment - Automated application delivery
- ๐ฆ Containerization - Application packaging and portability
- โธ๏ธ Orchestration - Container lifecycle management
- ๐ GitOps - Infrastructure as code with Git workflows
- ๐งช Observability - Monitoring, logging, and troubleshooting
- ๐ Security hardening - Non-root containers, minimal images
- ๐ Monitoring - Health checks, resource management
- ๐ง Self-healing - Automatic failure recovery
- โช Rollback - Instant version reversion
- ๐ Scalability - Horizontal scaling capabilities
- ๐ง Customize the application - Add new calculator features
- ๐ Add monitoring - Prometheus, Grafana integration
- ๐ Enhance security - Secrets management, network policies
- ๐ Multi-environment - Staging and production setups
- ๐ Advanced scaling - HPA, VPA, cluster autoscaling
- ๐ญ Microservices - Break calculator into multiple services
- ๐ Multi-region - Deploy across different regions
- ๐ Observability - Add comprehensive monitoring
- ๐ Security - Implement pod security policies
- ๐ฐ Cost optimization - Right-size resources
- ๐ Kubernetes Documentation - kubernetes.io/docs
- ๐ Argo CD Documentation - argo-cd.readthedocs.io
- ๐ณ Docker Documentation - docs.docker.com
- ๐ง GitHub Actions - docs.github.com/actions
You've successfully implemented and learned a complete DevOps stack from basic application deployment to advanced GitOps automation. This repository serves as both a working application and a comprehensive learning resource.
๐ Key Achievement: You now understand how modern DevOps practices work together to deliver reliable, scalable applications in production environments.
๐ Ready to apply these concepts to your own projects!
If you encounter issues or have questions:
- Check the troubleshooting sections in each guide
- Review the manual testing scenarios for validation
- Examine the application logs for debugging information
- Use the verification checklists to ensure proper setup
Happy Learning! ๐ Made with the help of Windsurf AI
by ~chaitanya