Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tsegismont/http-proxy-playground
https://github.com/tsegismont/http-proxy-playground
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tsegismont/http-proxy-playground
- Owner: tsegismont
- License: apache-2.0
- Created: 2024-01-20T10:05:54.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-10-14T06:51:32.000Z (2 months ago)
- Last Synced: 2024-10-20T08:58:21.405Z (2 months ago)
- Language: Java
- Size: 5.51 MB
- Stars: 4
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE
Awesome Lists containing this project
README
= 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 https://en.wikipedia.org/wiki/Eating_your_own_dog_food[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) serviceThe 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
[source,shell]
----
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:
[source,shell]
----
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:
[source,shell]
----
xdg-open $(minikube service edge-service --url --https)
----== Query endpoints within a container
[source,shell]
----
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"
----