mihaitodor / sidecar_demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sidecar cluster demo

Demo for the Go Remote Meetup talk from May 28 2020. Details and slides here.

Disclaimer: This was only tested on OSX with Docker for Mac. It should work on Linux as well but I haven't checked.

  1. Start the DinD containers, which will represent our cluster nodes
> ./start_cluster.sh
  1. Start infrastructure and backend services on the DinD containers
> ./start_services.sh
  1. Test that Sidecar and Envoy UI are up and running and accessible on the ingress host
Sidecar: http://localhost:7777
Envoy UI: http://localhost:7778
  1. Check that the WhoAmI TCP and HTTP services are accessible on ports 8888 and 10000 on the ingress host:
> curl localhost:8888
> curl -H "Host: whoami.one.local" localhost:10000
> curl -H "Host: whoami.two.local" localhost:10000
  1. Launch another service whoami-http-demo on backend2:
> docker exec -it backend2 sh
> docker run -d --rm -p80 --name whoami-http-demo -l ServiceName=whoami-http-demo -l ServicePort_80=10003 -l HealthCheck="HttpGet" -l HealthCheckArgs="http://{{ host }}:{{ tcp 10003 }}/health" containous/whoami:v1.5.0
> curl dev.local:10003
> exit
> # Uncomment `whoami-http-demo` section under the http_listener virtual_hosts
> # in envoy/ingress.yaml
> docker exec ingress docker restart envoy
> curl -H "Host: whoami.demo.local" localhost:10000

About


Languages

Language:Shell 100.0%