Projects
Production work, personal experiments, and open-source tools — with full setup instructions.
Zero-downtime deployment pipeline
Blue-green deployments on EKS using ArgoCD and GitHub Actions. Average deploy in under 4 minutes with instant rollback.
2024
Setup Instructions
- PrerequisitesAWS CLI v2, kubectl, Helm 3, and ArgoCD CLI installed. EKS cluster running with at least 2 node groups (blue and green).
- Clone the repo and configure secrets
git clone https://github.com/sujanmagar/eks-blue-green cd eks-blue-green # Add to GitHub repo secrets: AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY ECR_REGISTRY KUBECONFIG_BASE64
- Install ArgoCD on your cluster
kubectl create namespace argocd kubectl apply -n argocd -f \ https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml # Get initial admin password argocd admin initial-password -n argocd
- Apply Helm chart and ArgoCD app manifest
helm upgrade --install myapp ./chart \ --namespace production \ --set image.tag=latest kubectl apply -f argocd/application.yaml
- Push to main to trigger pipelineThe GitHub Actions workflow builds the Docker image, pushes to ECR, updates the Helm values file, and ArgoCD auto-syncs the deployment to the cluster. Rollback is one click in the ArgoCD UI.
Multi-region IaC module library
Reusable Terraform modules for AWS provisioning across three regions. DR failover under 60 seconds.
2023
Setup Instructions
- Install Terraform and configure AWS provider
# terraform >= 1.5.0 required brew install terraform aws configure # set default region to ap-south-1
- Clone and initialise
git clone https://github.com/sujanmagar/tf-multiregion cd tf-multiregion terraform init
- Edit variables for your environment
cp terraform.tfvars.example terraform.tfvars # Set your domain, account ID, and region list regions = ["ap-south-1", "us-east-1", "eu-west-1"] domain_name = "sujanmagar.info.np"
- Plan and apply
terraform plan -out=tfplan terraform apply tfplan
Centralised observability stack
Prometheus, Grafana, and Loki on Kubernetes. Covers metrics, logs, and alerting for all production services.
2023
Setup Instructions
- Add Helm repos
helm repo add prometheus-community \ https://prometheus-community.github.io/helm-charts helm repo add grafana https://grafana.github.io/helm-charts helm repo update
- Install kube-prometheus-stack
kubectl create namespace monitoring helm install prom-stack \ prometheus-community/kube-prometheus-stack \ -n monitoring \ -f values/prometheus-values.yaml
- Install Loki + Promtail
helm install loki grafana/loki-stack \ -n monitoring \ --set promtail.enabled=true \ --set grafana.enabled=false
- Configure PagerDuty alertingEdit values/alertmanager-values.yaml with your PagerDuty integration key. Alerts are pre-configured for pod crashes, high CPU, and failed deployments.
- Access Grafana
kubectl port-forward svc/prom-stack-grafana 3000:80 -n monitoring # Open http://localhost:3000 — default user: admin