• Home
Name Date Size #Lines LOC

..--

BUILD.bazelD22-Oct-20252 KiB6456

Dockerfile.clientD22-Oct-2025689 2717

Dockerfile.serverD22-Oct-2025697 2717

README.mdD22-Oct-20251.5 KiB3423

csm_greeter_client.pyD22-Oct-20255.6 KiB197162

csm_greeter_server.pyD22-Oct-20255.9 KiB221183

helloworld.protoD22-Oct-20251.1 KiB3932

README.md

1# gRPC Python CSM Hello World Example
2
3This CSM example builds on the [Python xDS Example](https://github.com/grpc/grpc/tree/master/examples/python/xds) and changes the gRPC client and server to accept configuration from an xDS control plane and test CSM observability.
4
5## Configuration
6
7The client takes the following command-line arguments -
8* `--target` - By default, the client tries to connect to the target "xds:///helloworld:50051" and gRPC would use xDS to resolve this target and connect to the server backend. This can be overridden to change the target.
9* `--secure_mode` - Whether to use xDS to retrieve server credentials. Default value is False.
10* `--prometheus_endpoint` - Endpoint used for prometheus. Default value is localhost:9464.
11
12
13The server takes the following command-line arguments -
14* `--port` - Port on which the Hello World service is run. Defaults to 50051.
15* `--secure_mode` - Whether to use xDS to retrieve server credentials. Default value is False.
16* `--server_id` - The server ID to return in responses.
17* `--prometheus_endpoint` - Endpoint used for prometheus. Default value is `localhost:9464`.
18
19## Building
20
21From the gRPC workspace folder:
22
23Client:
24```
25docker build -f examples/python/observability/csm/Dockerfile.client -t "us-docker.pkg.dev/grpc-testing/examples/csm-o11y-example-python-client" .
26```
27
28Server:
29```
30docker build -f examples/python/observability/csm/Dockerfile.server -t "us-docker.pkg.dev/grpc-testing/examples/csm-o11y-example-python-server" .
31```
32
33And then push the tagged image using `docker push`.
34