-
Build proto (Optional, I have done this for you but you have to rebuild it if you make changes to the protofile)
sudo pip install grpcio requests cd service ./script/gen ./script/gen_kv.pb cd - -
Build go service (Optional, I have built this for you, feel free to rebuild it if security is a concern for you)
script/bootstrap ./script/build -
Startup docker-compose
docker-compose up --build -
Do request
docker-compose exec python /client/client.py set foo bar docker-compose exec python /client/client.py get foo docker-compose exec python /client/client.py count
- Python client sends JSON request to Envoy proxy at port 9001.
- Envoy proxy convert the JSON request using the provided proto and the grpc_json_transcoder filter.
- The grpc requests are then forwarded to your microservice cluster which is running a grpc server.
- Build proto in grpc container instead.
- Guide on deploying to GCP
- Using envoy 1.17 as the docker base image. envoyproxy/envoy-dev:latest is recommended.