Skip to content

Latest commit

 

History

History
53 lines (38 loc) · 1.64 KB

README.adoc

File metadata and controls

53 lines (38 loc) · 1.64 KB

http-proxy-playground

I’ve implemented the http-proxy-playround project to make use of the Vert.x HTTP Proxy and Vert.x Web Proxy APIs and find where the user experience may be improved. The good old dogfooding practice.

The project is the implementation of an online Pizza Shop with the microservices architecture. It consists in several modules:

  • product service

  • order service

  • delivery service

  • edge (a.k.a. proxy or API Gateway) service

The backend services expose their APIs over HTTP in JSON format. The delivery service also offer a WebSocket endpoint for updates about deliveries.

Order and delivery data are stored in separate Postgres databases.

Running Postgres Locally

docker run --name http-proxy-playground-postgres -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -d postgres

Deploying to Minikube

Assuming minikube and kubectl are installed:

minikube start
minikube addons enable dashboard
minikube addons enable metrics-server
eval $(minikube -p minikube docker-env)
mvn clean install jib:dockerBuild
kubectl apply -R -f k8s

When the service is ready:

xdg-open $(minikube service edge-service --url --https)

Query endpoints within a container

curl -v --cacert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt --header "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" "https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT_HTTPS}/api/v1/namespaces/$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)/endpoints"