Production-ready microservices platform deployed on Azure AKS, demonstrating modern DevOps practices, cloud-native architecture, and infrastructure as code.
π¬ Live Demo | π Documentation | π Deployment Guide
A complete end-to-end DevOps implementation showcasing:
- ποΈ Infrastructure as Code with Terraform
- βοΈ Cloud Deployment on Azure AKS
- π³ Containerization with Docker
- β Orchestration with Kubernetes & Helm
- π CI/CD workflows (in progress)
- π Observability & monitoring (planned)
βββββββββββββββββββββββ
β Azure Cloud β
β β
βββββββββββββββββ΄βββββββββββββββββββ β
β Azure Kubernetes Service (AKS) β β
β ββββββββββββββββββββββββββββββ β β
β β Ingress Controller β β β
β ββββββββββββ¬ββββββββββββββββββ β β
β β β β
β ββββββββββ΄βββββββββ β β
β β β β β
β βββΌβββββββββββ ββββΌββββββββββ β β
β β Product β β Order β β β
β β Service β β Service β β β
β β (x2) β β (x2) β β β
β ββββββββββββββ ββββββββββββββ β β
β β β
βββββββββββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββββββ β
β β Azure Container Registry β β
β β (Docker Images) β β
β ββββββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββββββ β
β β Azure Key Vault β β
β β (Secrets Management) β β
β ββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββ
- Product Service (Port 8000): Product catalog management with CRUD operations
- Order Service (Port 8001): Order processing with product validation via HTTP
- Cloud Platform: Microsoft Azure
- Kubernetes: Azure Kubernetes Service (AKS) - v1.28
- Container Registry: Azure Container Registry (ACR)
- Secrets: Azure Key Vault
- Networking: Azure VNet, NSG, Load Balancer
- Monitoring: Azure Log Analytics
- Terraform: Infrastructure provisioning
- Helm 3: Kubernetes package management
- Multi-environment: Dev/Staging/Prod configurations
- Language: Python 3.11
- Framework: FastAPI (async)
- API Docs: Swagger/OpenAPI
- Containerization: Docker (multi-stage builds)
- Version Control: Git, GitHub
- Container Orchestration: Kubernetes
- CI/CD: GitHub Actions (in progress)
- GitOps: ArgoCD (planned)
- Azure Subscription
- Azure CLI (
az) - Terraform (
>= 1.0) - kubectl
- Helm 3
- Docker
git clone https://github.com/YOUR_USERNAME/ecommerce-microservices.git
cd ecommerce-microservicesaz login
az account set --subscription "YOUR_SUBSCRIPTION_ID"cd infrastructure/terraform
# Initialize Terraform
terraform init
# Deploy (10-15 minutes)
terraform apply
# Or use the helper script:
./deploy.ps1 # Windows
./deploy.sh # Linux/Mac# Get AKS credentials
az aks get-credentials \
--resource-group $(terraform output -raw resource_group_name) \
--name $(terraform output -raw aks_cluster_name)
# Verify connection
kubectl get nodescd ../..
# Login to ACR
ACR_NAME=$(cd infrastructure/terraform && terraform output -raw acr_name)
az acr login --name $ACR_NAME
# Get ACR login server
ACR_LOGIN_SERVER=$(cd infrastructure/terraform && terraform output -raw acr_login_server)
# Build and push Product Service
cd product-service
docker build -t product-service:v1.0.0 .
docker tag product-service:v1.0.0 $ACR_LOGIN_SERVER/product-service:v1.0.0
docker push $ACR_LOGIN_SERVER/product-service:v1.0.0
cd ..
# Build and push Order Service
cd order-service
docker build -t order-service:v1.0.0 .
docker tag order-service:v1.0.0 $ACR_LOGIN_SERVER/order-service:v1.0.0
docker push $ACR_LOGIN_SERVER/order-service:v1.0.0
cd ..# Update Helm values with your ACR
# Edit helm/*/values-azure.yaml and set your ACR name
# Deploy with Helm
helm install product-service ./helm/product-service \
-f ./helm/product-service/values-azure.yaml
helm install order-service ./helm/order-service \
-f ./helm/order-service/values-azure.yaml
# Check deployment
kubectl get pods
kubectl get svc# Port-forward to access locally
kubectl port-forward svc/product-service 8000:8000
kubectl port-forward svc/order-service 8001:8001
# Access Swagger UI
# Product Service: http://localhost:8000/docs
# Order Service: http://localhost:8001/docsThe infrastructure includes cost-saving features:
- Single-node cluster for development (~$30/month if running 24/7)
- Destroy/Deploy scripts for daily usage (~$0.50/day)
- Auto-scaling disabled in dev (enable for prod)
- Basic SKU for ACR and other services
# Morning - Start work
cd infrastructure/terraform
./deploy.ps1 # 10 minutes to create
# Evening - End work
./destroy.ps1 # 5 minutes to destroy
# Saves ~$2-4/day!- Microservices architecture (2 services)
- FastAPI REST APIs with OpenAPI docs
- Docker containerization with multi-stage builds
- Local Kubernetes deployment
- Helm charts for package management
- Azure AKS production deployment
- Terraform infrastructure as code
- Azure Container Registry integration
- Azure Key Vault for secrets
- Health checks (liveness & readiness probes)
- Resource limits and requests
- High availability (2 replicas per service)
- Service discovery and inter-service communication
- Cost optimization scripts
- CI/CD pipeline with GitHub Actions
- GitOps with ArgoCD
- Prometheus & Grafana monitoring
- Centralized logging
- API Gateway / Ingress setup
- SSL/TLS certificates
- Infrastructure as Code with Terraform
- Kubernetes orchestration at scale
- Azure cloud services (AKS, ACR, Key Vault, VNet)
- Container best practices (multi-stage builds, security)
- Helm package management
- Microservices communication patterns
- DevOps workflows and automation
- High availability configuration
- Health monitoring and self-healing
- Resource optimization
- Security best practices (secrets management, network isolation)
- Cost management strategies
- Multi-environment deployments
ecommerce-microservices/
βββ product-service/ # Product microservice
β βββ main.py # FastAPI application
β βββ requirements.txt
β βββ Dockerfile # Multi-stage build
βββ order-service/ # Order microservice
β βββ main.py
β βββ requirements.txt
β βββ Dockerfile
βββ infrastructure/
β βββ terraform/ # Infrastructure as Code
β βββ main.tf # Resource group, workspace
β βββ aks.tf # AKS cluster configuration
β βββ acr.tf # Container registry
β βββ networking.tf # VNet, subnets, NSG
β βββ keyvault.tf # Secrets management
β βββ variables.tf # Input variables
β βββ outputs.tf # Output values
β βββ deploy.ps1 # Deployment script
β βββ destroy.ps1 # Cleanup script
βββ helm/ # Helm charts
β βββ product-service/
β β βββ values.yaml # Default values
β β βββ values-azure.yaml # Azure-specific
β β βββ templates/
β βββ order-service/
β βββ ...
βββ k8s/ # Raw K8s manifests (reference)
βββ docker-compose.yml # Local development
Product Service:
# Get all products
curl http://localhost:8000/api/products
# Create product
curl -X POST http://localhost:8000/api/products \
-H "Content-Type: application/json" \
-d '{"name": "Laptop", "price": 999.99, "stock": 50}'Order Service:
# Create order
curl -X POST http://localhost:8001/api/orders \
-H "Content-Type: application/json" \
-d '{
"items": [{"product_id": 1, "quantity": 2}],
"customer_email": "test@example.com"
}'Pods in ImagePullBackOff:
# Check image exists in ACR
az acr repository list --name $ACR_NAME
# Verify AKS can pull from ACR
az aks check-acr --name $AKS_NAME --resource-group $RG_NAME --acr $ACR_NAME.azurecr.ioService communication fails:
# Test from within cluster
kubectl exec -it <pod-name> -- curl http://product-service:8000/health
# Check service DNS
kubectl exec -it <pod-name> -- nslookup product-serviceTerraform state issues:
# Refresh state
terraform refresh
# If corrupted, import resources
terraform import azurerm_resource_group.main /subscriptions/.../resourceGroups/...- Architecture Decisions (coming soon)
- Deployment Guide (coming soon)
- API Documentation (Swagger)
- Monitoring Setup (coming soon)
This is a personal learning project, but feedback and suggestions are welcome!
MIT License - feel free to use for learning purposes.
DevOps Engineer
- π Building production-ready cloud-native applications
- βοΈ Azure & AWS certified
- β Kubernetes enthusiast (CKA in progress)
- π Learning in public and documenting the journey
Connect:
- LinkedIn: Shimon Hagag
Current Phase: Production deployment on Azure AKS β
Next Steps: CI/CD automation, monitoring & observability
Last Updated: November 2024
Active Development: This project is being actively developed with regular commits. Check back for updates!
Built with passion for DevOps and cloud-native technologies. Special thanks to the open-source community for the amazing tools and resources.
β If you find this project helpful, please consider giving it a star!