MarketVerse is a cloud-native e-commerce platform that can be deployed using Kubernetes and Minikube. This guide provides step-by-step instructions for deploying MarketVerse on Minikube, setting up monitoring with Prometheus and Grafana, using automation with Makefile, and managing deployments with Argo CD.
Warning
This project is for learning purposes and aims to explore DevOps best practices.
- Infrastructure as Code (IaC) Guide
- Kubernetes Documentation
- Minikube Documentation
- Argo CD Documentation
- Prometheus Documentation
- Grafana Documentation
- Project - MarketVerse Deployment
Ensure the following tools are installed before proceeding:
- Docker β Install Guide
- Minikube β Install Guide
- kubectl β Install Guide
- Helm β Install Guide
- Argo CD β Install Guide
- Jenkins (Optional, for CI/CD) β Install Guide
# Clone the project repository
git clone https://github.com/iamanonymous419/marketverse-gitops.git marketverse-gitops
cd marketverse-gitops
# For a specific branch
git clone -b main https://github.com/iamanonymous419/marketverse-gitops.git marketverse-gitops
cd marketverse-gitopskubectl apply -f namespace.ymlkubectl apply -f ./databaseBefore running this command, make sure to set up the database URL of the Minikube service:
DATABASE_URL="postgresql://something:something@localhost:5432/database"Then, forward the database port and push the schema:
kubectl port-forward service/database-service 5432:5432 -n marketverse &
pnpm exec drizzle-kit pushTo verify the tables:
psql -h localhost -U something -d databaseTo access the database pod:
kubectl exec -it pod/database-0 -n marketverse -- bash
psql -U something -d databasekubectl apply -f ./appkubectl apply -f ./cron-jobkubectl port-forward service/marketverse-svc 3000:80 -n marketverse &Now, open http://localhost:3000 in your browser.
For easier deployment, use the provided Makefile:
make create-ns # Create Kubernetes namespace
make delete-ns # Delete Kubernetes namespacemake run-database # Deploy database
make delete-database # Remove databasemake run-app # Deploy application
make delete-app # Remove applicationmake run-job # Deploy scheduled jobs
make remove-job # Remove scheduled jobsmake forward-app # Forward port 3000 for the app
make forward-database # Forward port 5432 for the databaseπ οΈ Database Schema:
make schema-push # Push latest schema changes to DBπ Full Deployment:
make run-all # Deploys everything including schema pushπ§Ή Cleanup:
make delete # Deletes all resourcesEnable the Minikube dashboard:
minikube addons enable dashboard
minikube addons enable metrics-server
minikube dashboardAccess the dashboard at:
helm install prometheus prometheus-community/kube-prometheus-stack --namespace monitoring --create-namespacekubectl port-forward svc/prometheus-kube-prometheus-prometheus -n monitoring 9090:9090 &
kubectl port-forward svc/prometheus-grafana -n monitoring 4000:80 &kubectl get secret prometheus-grafana -n monitoring -o jsonpath="{.data.admin-password}" | base64 --decodeUsername: admin
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yamlkubectl port-forward svc/argocd-server -n argocd 8080:443 &kubectl get secret argocd-initial-admin-secret -n argocd -o jsonpath="{.data.password}" | base64 --decodeUsername: admin
Important
For production-grade AWS EKS deployment using Infrastructure as Code (IaC), please refer to our comprehensive guide:
π Marketverse Infrastructure as Code (IaC) with Terraform and Ansible
This guide provides a complete production-ready infrastructure setup, including:
- βοΈ AWS EKS Cluster setup using Terraform
- π CI/CD Pipeline with Jenkins on AWS EC2
- π Remote Backend for secure Terraform state management
- π’ GitOps Deployment using ArgoCD
- π Monitoring Stack with Prometheus and Grafana
- π§© Configuration Management using Ansible
Tip
The IaC deployment is ideal for production environments and follows industry best practices for secure, scalable, and maintainable infrastructure.
To delete everything:
kubectl delete -f namespace.yml
make delete