Skip to content

azzahamdani/udacity-udaconnect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to run the project

Steps

  1. Deploy Kafka
kubectl apply -f deployment/kafka
  1. Deploy Person Microservices
kubectl apply -f deployment/person-service
  1. Deploy Location Microservices
kubectl apply -f deployment/location-service
  1. Deploy Connection Microservices
kubectl apply -f deployment/connection-service
  1. DeploY Api Gateway

to deploy API gateway, we need to deploy first an open-source ingress-controller ingress nginx that will route the traffic to destinated microservices following our ingress rules

  • Ingress Controller
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.1/deploy/static/provider/baremetal/deploy.yaml
  • Patching Ingress Controller Nodeort
kubectl -n ingress-nginx patch svc ingress-nginx-controller --patch '{"spec": {"ports": [{"name": "http","port": 80, "nodePort": 30000}]}}'
  • Ingress Rules
kubectl apply -f deployment/api-gateway
  1. Deploy frontend
kubectl apply -f deployment/frontend/
  1. Seed databases

Before testing APIs it is mandatory to seed person and location databases in order to create DB tables and some dummy data

  • Seed location db
sh scripts/run_db_cmd_location.sh $(kubectl get pod -l service=location-postgres --no-headers -o jsonpath='{.items[0].metadata.name}{"\n"}')
  • Seed person db
sh scripts/run_db_cmd_person.sh $(kubectl get pod -l service=person-postgres --no-headers -o jsonpath='{.items[0].metadata.name}{"\n"}')

Once the project is up and running, you should be able to see 11 deployment of the system and 11 services exposing them as well as an ingress object with behind the scene ingress-controller as API-gateway kubectl get pods and kubectl get services and kubectl describe ingress udaconnect-ingress

These pages should also load on your web browser:

  • http://localhost:30000/api/ - Base path for API
  • http://localhost:30050/ - Frontend ReactJS Application

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors