Skip to content

andreichernov/demo-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple demo app for the local development purposes

Manual

Prerequisites

Deploy

Start Kubernetes:

minikube start
minikube addons list

Enable metrics server

minikube addons enable metrics-server

Build Docker images

docker build -t demo-frontend -f frontend/Dockerfile ./frontend
docker build -t demo-backend -f backend/Dockerfile ./backend

Load images to Minikube

minikube image load demo-frontend:latest
minikube image load demo-backend:latest

Deploy the demo applications:

helm install --dry-run --debug demo-app demo-app

Expose services to the host:

minikube tunnel

Confirm that services exist:

kubectl get services,deploy,po,hpa -owide

Increase the load

Run next command in a separate terminal

sh -c "while sleep 0.01; do wget -q -O- http://localhost:5200; done"
kubectl get hpa backend-autoscaling --watch

Wait several minutes and verify that count of replicas is increased. Stop the running wget. Check that the count of replicas is decreased.

Review the app

Open minikube dashboard and see if deployments succeeded. Run in the separate shell:

minikube dashboard

Check the frontend in browser: http://localhost:5100 Check the backend in browser: http://localhost:5200


Tasks:

  • Develop simple backend app
  • Develop simple Frontend app
  • Write Dockerfiles
  • Add minimal Helm-chart to run apps using Minikube

Additional tasks:

  • health-check
  • ready-check
  • metrics endpoints for Prometheus
  • docker-compose.yml to run all stuff including Grafana and Prometheus
  • Grafana dashboard to visualize metrics

Additional additional tasks:

  • Add E2E-tests to verify correctness of apps dockerization.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published