A cloud-native deployment and provisioning project for the Moonshot application. Designed with scalability, automation, and observability in mind, this project uses Kubernetes, Ansible, Docker, and Google Cloud to manage deployment pipelines, handle infrastructure provisioning, and execute performance tests in real-world scenarios.
- Automate the provisioning and deployment of a multilayer application
- Ensure service availability, scalability, and fault tolerance
- Monitor system performance using real workloads and metrics
- Use modern tools such as Kubernetes, Prometheus, Grafana, Docker, and GCP
To automate the deployment and testing process on Google Kubernetes Engine (GKE), use the following Ansible playbooks:
ansible-playbook -i inventory/gcp.yml gke-cluster-create.yml
# To destroy the cluster
ansible-playbook -i inventory/gcp.yml gke-cluster-destroy.yml
ansible-playbook -i inventory/gcp.yml moonshot-deploy.yml
# To undeploy the application
ansible-playbook -i inventory/gcp.yml moonshot-undeploy.yml
ansible-playbook -i inventory/gcp.yml load-test.yml
ansible-playbook -i inventory/gcp.yml test-all.yml
Monitoring plays a crucial role in assessing the health, performance, and resilience of the Moonshot system. This project uses Prometheus to collect metrics and Grafana to visualize them via dashboards.
- CPU & Memory Usage: Tracks resource consumption to detect saturation and trigger HPA scaling
- Network Throughput: Monitors incoming/outgoing data for bottlenecks and bandwidth usage
- Storage Usage: Observes ephemeral and persistent volume usage, ensuring there's no disk exhaustion
| Metric | Graphic |
|---|---|
| CPU usage | ![]() |
| Memory usage | ![]() |
| Volume usage | ![]() |
| Ephemeral storage usage | ![]() |
| Transmission throughput | ![]() |
| Reception throughput | ![]() |
- Resource Distribution: Ensures that load is balanced across the Kubernetes nodes
- CPU & RAM: Helps determine whether the nodes are over or under-utilized, which informs autoscaling needs
| Metric | Graphic |
|---|---|
| CPU usage | ![]() |
| Memory usage | ![]() |
- Request Duration: Measures latency and responsiveness of the application under different loads
- Request Rate: Indicates throughput capacity of the system
- Failed Requests: Alerts on system failures and backend unavailability during stress tests
| Metric | Graphic |
|---|---|
| HTTP overview | ![]() |
| HTTP request duration | ![]() |
| HTTP request receiving | ![]() |
- Simple Workload: Simulates 300 virtual users hitting /api/health to test autoscaling of the application server
- Complex Workload: Simulates 20 users performing login and certificate creation, stressing the database and I/O











