Skip to content

Commit a4733f6

Browse files
authored
examples: Sandbox cleanups (envoyproxy#13727)
Signed-off-by: Ryan Northey <[email protected]>
1 parent f69a78c commit a4733f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+92
-344
lines changed

docs/root/start/sandboxes/cache.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ In this example, we demonstrate how HTTP caching can be utilized in Envoy by usi
88
The setup of this sandbox is based on the setup of the :ref:`Front Proxy sandbox <install_sandboxes_front_proxy>`.
99

1010
All incoming requests are routed via the front Envoy, which acts as a reverse proxy sitting on
11-
the edge of the ``envoymesh`` network. Ports ``8000`` and ``8001`` are exposed by docker
11+
the edge of the ``envoymesh`` network. Port ``8000`` is exposed by docker
1212
compose (see :repo:`/examples/cache/docker-compose.yaml`) to handle ``HTTP`` calls
13-
to the services, and requests to ``/admin`` respectively. Two backend services are deployed behind the front Envoy, each with a sidecar Envoy.
13+
to the services. Two backend services are deployed behind the front Envoy, each with a sidecar Envoy.
1414

1515
The front Envoy is configured to run the Cache Filter, which stores cacheable responses in an in-memory cache,
1616
and serves it to subsequent requests. In this demo, the responses that are served by the deployed services are stored in :repo:`/examples/cache/responses.yaml`.
@@ -35,9 +35,9 @@ Step 3: Start all of our containers
3535
$ docker-compose up -d
3636
$ docker-compose ps
3737
38-
Name Command State Ports
39-
------------------------------------------------------------------------------------------------------------------------
40-
cache_front-envoy_1 /docker-entrypoint.sh /bin ... Up 10000/tcp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:8001->8001/tcp
38+
Name Command State Ports
39+
----------------------------------------------------------------------------------------------
40+
cache_front-envoy_1 /docker-entrypoint.sh /bin ... Up 10000/tcp, 0.0.0.0:8000->8000/tcp
4141
cache_service1_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 8000/tcp
4242
cache_service2_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 8000/tcp
4343

docs/root/start/sandboxes/cors.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ Switch to the ``frontend`` directory in the ``cors`` example, and start the cont
4141
$ docker-compose up --build -d
4242
$ docker-compose ps
4343
44-
Name Command State Ports
45-
------------------------------------------------------------------------------------------------------------------------------
46-
frontend_front-envoy_1 /docker-entrypoint.sh /bin ... Up 10000/tcp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:8001->8001/tcp
47-
frontend_frontend-service_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 8000/tcp
44+
Name Command State Ports
45+
------------------------------------------------------------------------------------------------------
46+
frontend_front-envoy_1 /docker-entrypoint.sh /bin ... Up 10000/tcp, 0.0.0.0:8000->8000/tcp
47+
frontend_frontend-service_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp
4848
4949
Now, switch to the ``backend`` directory in the ``cors`` example, and start the containers:
5050

@@ -58,7 +58,7 @@ Now, switch to the ``backend`` directory in the ``cors`` example, and start the
5858
5959
Name Command State Ports
6060
----------------------------------------------------------------------------------------------------------------------------
61-
backend_backend-service_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 8000/tcp
61+
backend_backend-service_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp
6262
backend_front-envoy_1 /docker-entrypoint.sh /bin ... Up 10000/tcp, 0.0.0.0:8002->8000/tcp, 0.0.0.0:8003->8001/tcp
6363
6464
Step 4: Test Envoy's CORS capabilities

docs/root/start/sandboxes/csrf.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Switch to the ``samesite`` directory in the ``csrf`` example, and start the cont
4343
$ docker-compose ps
4444
4545
Name Command State Ports
46-
----------------------------------------------------------------------------------------------------------------------
46+
----------------------------------------------------------------------------------------------------------------------------
4747
samesite_front-envoy_1 /docker-entrypoint.sh /bin ... Up 10000/tcp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:8001->8001/tcp
4848
samesite_service_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 8000/tcp
4949
@@ -56,10 +56,10 @@ Now, switch to the ``crosssite`` directory in the ``csrf`` example, and start th
5656
$ docker-compose up --build -d
5757
$ docker-compose ps
5858
59-
Name Command State Ports
60-
----------------------------------------------------------------------------------------------------------------------
61-
crosssite_front-envoy_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 0.0.0.0:8002->8000/tcp, 0.0.0.0:8003->8001/tcp
62-
crosssite_service_1 /docker-entrypoint.sh /bin ... Up 10000/tcp, 8000/tcp
59+
Name Command State Ports
60+
-----------------------------------------------------------------------------------------------------
61+
crosssite_front-envoy_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 0.0.0.0:8002->8000/tcp
62+
crosssite_service_1 /docker-entrypoint.sh /bin ... Up 10000/tcp
6363
6464
Step 4: Test Envoy's CSRF capabilities
6565
**************************************

docs/root/start/sandboxes/ext_authz.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ To build this sandbox example and start the example services, run the following
2929
$ docker-compose up --build -d
3030
$ docker-compose ps
3131
32-
Name Command State Ports
33-
---------------------------------------------------------------------------------------------------------------------------------------
32+
Name Command State Ports
33+
---------------------------------------------------------------------------------------------------------------
3434
ext_authz_ext_authz-grpc-service_1 /app/server -users /etc/us Up
3535
ext_authz_ext_authz-http-service_1 docker-entrypoint.sh node Up
36-
ext_authz_front-envoy_1 /docker-entrypoint.sh /bin Up 10000/tcp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:8001->8001/tcp
36+
ext_authz_front-envoy_1 /docker-entrypoint.sh /bin Up 10000/tcp, 0.0.0.0:8000->8000/tcp
3737
ext_authz_upstream-service_1 python3 /app/service/server.py Up
3838
3939
.. note::

docs/root/start/sandboxes/fault_injection.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ Terminal 1
2020
$ docker-compose up --build -d
2121
$ docker-compose ps
2222
23-
Name Command State Ports
24-
------------------------------------------------------------------------------------------------------------------------------
23+
Name Command State Ports
24+
------------------------------------------------------------------------------------------------------
2525
fault-injection_backend_1 gunicorn -b 0.0.0.0:80 htt Up 0.0.0.0:8080->80/tcp
26-
fault-injection_envoy_1 /docker-entrypoint.sh /usr Up 10000/tcp, 0.0.0.0:9211->9211/tcp, 0.0.0.0:9901->9901/tcp
26+
fault-injection_envoy_1 /docker-entrypoint.sh /usr Up 10000/tcp, 0.0.0.0:9211->9211/tcp
2727
2828
Step 4: Start sending continuous stream of HTTP requests
2929
********************************************************

docs/root/start/sandboxes/front_proxy.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ Step 3: Start all of our containers
4040
$ docker-compose ps
4141
4242
Name Command State Ports
43-
------------------------------------------------------------------------------------------------------------------------------------------------------
43+
----------------------------------------------------------------------------------------------------------------------------------------------------
4444
front-proxy_front-envoy_1 /docker-entrypoint.sh /bin ... Up 10000/tcp, 0.0.0.0:8080->8080/tcp, 0.0.0.0:8001->8001/tcp, 0.0.0.0:8443->8443/tcp
45-
front-proxy_service1_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 8000/tcp
46-
front-proxy_service2_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 8000/tcp
45+
front-proxy_service1_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp
46+
front-proxy_service2_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp
4747
4848
Step 4: Test Envoy's routing capabilities
4949
*****************************************

docs/root/start/sandboxes/grpc_bridge.rst

+4-5
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,13 @@ To build this sandbox example and start the example services, run the following
7272
$ docker-compose up --build -d
7373
$ docker-compose ps
7474
75-
Name Command State Ports
76-
---------------------------------------------------------------------------------------------------------------------------------------
77-
grpc-bridge_grpc-client-proxy_1 /docker-entrypoint.sh /bin ... Up 10000/tcp, 0.0.0.0:9911->9911/tcp, 0.0.0.0:9991->9991/tcp
75+
Name Command State Ports
76+
---------------------------------------------------------------------------------------------------------------
77+
grpc-bridge_grpc-client-proxy_1 /docker-entrypoint.sh /bin ... Up 10000/tcp, 0.0.0.0:9911->9911/tcp
7878
grpc-bridge_grpc-client_1 /bin/sh -c tail -f /dev/null Up
79-
grpc-bridge_grpc-server-proxy_1 /docker-entrypoint.sh /bin ... Up 10000/tcp, 0.0.0.0:8811->8811/tcp, 0.0.0.0:8881->8881/tcp
79+
grpc-bridge_grpc-server-proxy_1 /docker-entrypoint.sh /bin ... Up 10000/tcp, 0.0.0.0:8811->8811/tcp
8080
grpc-bridge_grpc-server_1 /bin/sh -c /bin/server Up 0.0.0.0:8081->8081/tcp
8181
82-
8382
Step 5: Send requests to the Key/Value store
8483
********************************************
8584

docs/root/start/sandboxes/jaeger_native_tracing.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ To build this sandbox example, and start the example apps run the following comm
5858
$ docker-compose up --build -d
5959
$ docker-compose ps
6060
61-
Name Command State Ports
62-
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
63-
jaeger-native-tracing_front-envoy_1 /start-front.sh Up 10000/tcp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:8001->8001/tcp
64-
jaeger-native-tracing_jaeger_1 /go/bin/all-in-one-linux - ... Up 14250/tcp, 14268/tcp, 0.0.0.0:16686->16686/tcp, 5775/udp, 5778/tcp, 6831/udp, 6832/udp, 0.0.0.0:9411->9411/tcp
65-
jaeger-native-tracing_service1_1 /start-service.sh Up 10000/tcp, 8000/tcp
66-
jaeger-native-tracing_service2_1 /start-service.sh Up 10000/tcp, 8000/tcp
61+
Name Command State Ports
62+
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
63+
jaeger-native-tracing_front-envoy_1 /start-front.sh Up 10000/tcp, 0.0.0.0:8000->8000/tcp
64+
jaeger-native-tracing_jaeger_1 /go/bin/all-in-one-linux - ... Up 14250/tcp, 14268/tcp, 0.0.0.0:16686->16686/tcp, 5775/udp, 5778/tcp, 6831/udp, 6832/udp
65+
jaeger-native-tracing_service1_1 /start-service.sh Up 10000/tcp
66+
jaeger-native-tracing_service2_1 /start-service.sh Up 10000/tcp
6767
6868
Step 4: Generate some load
6969
**************************

docs/root/start/sandboxes/jaeger_tracing.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ To build this sandbox example, and start the example apps run the following comm
4444
$ docker-compose up --build -d
4545
$ docker-compose ps
4646
47-
Name Command State Ports
47+
Name Command State Ports
4848
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
4949
jaeger-tracing_front-envoy_1 /docker-entrypoint.sh /bin ... Up 10000/tcp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:8001->8001/tcp
5050
jaeger-tracing_jaeger_1 /go/bin/all-in-one-linux - ... Up 14250/tcp, 14268/tcp, 0.0.0.0:16686->16686/tcp, 5775/udp, 5778/tcp, 6831/udp, 6832/udp, 0.0.0.0:9411->9411/tcp
51-
jaeger-tracing_service1_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 8000/tcp
52-
jaeger-tracing_service2_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 8000/tcp
51+
jaeger-tracing_service1_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp
52+
jaeger-tracing_service2_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp
5353
5454
Step 4: Generate some load
5555
**************************

docs/root/start/sandboxes/load_reporting_service.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ Terminal 2 ::
3333
envoy/examples/load_reporting_service
3434
$ docker-compose ps
3535

36-
Name Command State Ports
37-
--------------------------------------------------------------------------------------------------------------------------------------
38-
load-reporting-service_http_service_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 0.0.0.0:80->80/tcp, 0.0.0.0:8081->8081/tcp
39-
load-reporting-service_http_service_2 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 0.0.0.0:81->80/tcp, 0.0.0.0:8082->8081/tcp
40-
load-reporting-service_lrs_server_1 go run main.go Up 0.0.0.0:18000->18000/tcp
36+
Name Command State Ports
37+
------------------------------------------------------------------------------------------------------------
38+
load-reporting-service_http_service_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 0.0.0.0:81->80/tcp
39+
load-reporting-service_http_service_2 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 0.0.0.0:80->80/tcp
40+
load-reporting-service_lrs_server_1 go run main.go Up 0.0.0.0:18000->18000/tcp
4141

4242
Step 4: Start sending stream of HTTP requests
4343
*********************************************

docs/root/start/sandboxes/lua.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ Step 3: Build the sandbox
2222
$ docker-compose up --build -d
2323
$ docker-compose ps
2424
25-
Name Command State Ports
26-
--------------------------------------------------------------------------------------------------------------------
27-
lua_proxy_1 /docker-entrypoint.sh /bin Up 10000/tcp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:8001->8001/tcp
28-
lua_web_service_1 node ./index.js Up 0.0.0.0:8080->80/tcp
25+
Name Command State Ports
26+
--------------------------------------------------------------------------------------------
27+
lua_proxy_1 /docker-entrypoint.sh /bin ... Up 10000/tcp, 0.0.0.0:8000->8000/tcp
28+
lua_web_service_1 node ./index.js Up 0.0.0.0:8080->80/tcp
2929
3030
Step 4: Send a request to the service
3131
*************************************

docs/root/start/sandboxes/mysql.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ Terminal 1
2323
2424
Name Command State Ports
2525
------------------------------------------------------------------------------------------------------------------
26-
mysql_mysql_1 docker-entrypoint.sh mysqld Up 0.0.0.0:3306->3306/tcp
26+
mysql_mysql_1 docker-entrypoint.sh mysqld Up 3306/tcp
2727
mysql_proxy_1 /docker-entrypoint.sh /bin Up 10000/tcp, 0.0.0.0:1999->1999/tcp, 0.0.0.0:8001->8001/tcp
2828
29-
3029
Step 4: Issue commands using mysql
3130
**********************************
3231

docs/root/start/sandboxes/postgres.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ Step 3: Build the sandbox
2323
2424
Name Command State Ports
2525
----------------------------------------------------------------------------------------------------------------------
26-
postgres_postgres_1 docker-entrypoint.sh postgres Up 0.0.0.0:5432->5432/tcp
26+
postgres_postgres_1 docker-entrypoint.sh postgres Up 5432/tcp
2727
postgres_proxy_1 /docker-entrypoint.sh /usr ... Up 10000/tcp, 0.0.0.0:1999->1999/tcp, 0.0.0.0:8001->8001/tcp
2828
29-
3029
Step 4: Issue commands using psql
3130
*********************************
3231

docs/root/start/sandboxes/redis.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Terminal 1
2323
Name Command State Ports
2424
------------------------------------------------------------------------------------------------------------------
2525
redis_proxy_1 /docker-entrypoint.sh /bin Up 10000/tcp, 0.0.0.0:1999->1999/tcp, 0.0.0.0:8001->8001/tcp
26-
redis_redis_1 docker-entrypoint.sh redis Up 0.0.0.0:6379->6379/tcp
26+
redis_redis_1 docker-entrypoint.sh redis Up 6379/tcp
2727
2828
Step 4: Issue Redis commands
2929
****************************

docs/root/start/sandboxes/wasm-cc.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Change to the ``examples/wasm-cc`` folder in the Envoy repo, and start the compo
3333
Name Command State Ports
3434
-----------------------------------------------------------------------------------------------
3535
wasm_proxy_1 /docker-entrypoint.sh /usr ... Up 10000/tcp, 0.0.0.0:8000->8000/tcp
36-
wasm_web_service_1 node ./index.js Up 0.0.0.0:9000->9000/tcp
36+
wasm_web_service_1 node ./index.js Up
3737
3838
Step 4: Check web response
3939
**************************

docs/root/start/sandboxes/zipkin_tracing.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ To build this sandbox example, and start the example apps run the following comm
4444
$ docker-compose up --build -d
4545
$ docker-compose ps
4646
47-
Name Command State Ports
48-
-----------------------------------------------------------------------------------------------------------------------------
49-
zipkin-tracing_front-envoy_1 /docker-entrypoint.sh /bin ... Up 10000/tcp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:8001->8001/tcp
50-
zipkin-tracing_service1_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 8000/tcp
51-
zipkin-tracing_service2_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp, 8000/tcp
47+
Name Command State Ports
48+
-------------------------------------------------------------------------------------------------------
49+
zipkin-tracing_front-envoy_1 /docker-entrypoint.sh /bin ... Up 10000/tcp, 0.0.0.0:8000->8000/tcp
50+
zipkin-tracing_service1_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp
51+
zipkin-tracing_service2_1 /bin/sh -c /usr/local/bin/ ... Up 10000/tcp
5252
zipkin-tracing_zipkin_1 /busybox/sh run.sh Up 9410/tcp, 0.0.0.0:9411->9411/tcp
5353
5454
Step 4: Generate some load

examples/cache/docker-compose.yaml

+2-14
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,8 @@ services:
77
dockerfile: Dockerfile-frontenvoy
88
networks:
99
- envoymesh
10-
expose:
11-
- "8000"
12-
- "8001"
1310
ports:
1411
- "8000:8000"
15-
- "8001:8001"
1612

1713
service1:
1814
build:
@@ -21,13 +17,9 @@ services:
2117
volumes:
2218
- ./responses.yaml:/etc/responses.yaml
2319
networks:
24-
envoymesh:
25-
aliases:
26-
- service1
20+
- envoymesh
2721
environment:
2822
- SERVICE_NAME=1
29-
expose:
30-
- "8000"
3123

3224
service2:
3325
build:
@@ -36,13 +28,9 @@ services:
3628
volumes:
3729
- ./responses.yaml:/etc/responses.yaml
3830
networks:
39-
envoymesh:
40-
aliases:
41-
- service2
31+
- envoymesh
4232
environment:
4333
- SERVICE_NAME=2
44-
expose:
45-
- "8000"
4634

4735
networks:
4836
envoymesh: {}

examples/cache/front-envoy.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,3 @@ static_resources:
6464
socket_address:
6565
address: service2
6666
port_value: 8000
67-
admin:
68-
access_log_path: "/dev/null"
69-
address:
70-
socket_address:
71-
address: 0.0.0.0
72-
port_value: 8001

0 commit comments

Comments
 (0)