We present a very simple hello world pipeline where
- producer accepts incoming
Greeter
gRPC requests from outside world; - consumer digests
greeting
events produced by the producer.
Both services log extensively for debugging and/or testing.
Manifests are split into separate files and are enumerated in the order of their dependencies. Using the helper script apply.sh
, one can setup the pipeline correctly whilst waiting for each component to get ready before applying the others that depend on it. This is especially important on CI pipelines, where components take longer to get ready.
On the master node, execute the following instructions below:
- Download the programs in
bin/
:git lfs pull
- Apply the configuration
./function-images/tests/chained-function-eventing/manifests/apply.sh
On the master node, execute the following instructions below:
- Start a TimeseriesDB experiment:
./bin/grpcurl -plaintext 10.96.0.84:90 -d @ Timeseries.StartExperiment < ./function-images/tests/chained-function-eventing/ts-experiment.json
- Make a gRPC request:
./bin/grpcurl -d '{"name": "Bora"}' -plaintext producer.chained-functions-eventing.192.168.1.240.sslip.io:80 helloworld.Greeter.SayHello
BEWARE:
Because Knative scales down to zero when idle, logs disappear if you wait too long after invoking. Invoke again before inspecting the logs, and proceed quickly.
On the master node, execute the following instructions below:
- Inspect the producer logs:
kubectl logs -n chained-functions-eventing -c user-container -l serving.knative.dev/service=producer
- Ignore the following error:
Failed to process env var: required key K_SINK missing value
- Ignore the following error:
- Inspect the consumer logs:
kubectl logs -n chained-functions-eventing -c user-container -l serving.knative.dev/service=consumer
- Inspect the timeseriesdb records:
./bin/grpcurl -plaintext 10.96.0.84:90 Timeseries.EndExperiment
- To inspect the logs of timeseriesdb:
kubectl logs -n chained-functions-eventing svc/timeseriesdb
- To inspect the logs of timeseriesdb:
On the master node, execute the following instructions below:
- Delete the configuration
./function-images/tests/chained-function-eventing/manifests/delete.sh
Number of instances per function in a stable flow:
Function | Instances | Is Configurable |
---|---|---|
Producer | 1 | No |
Consumer | 1 | No |