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