See Knative Eventing Tutorial for a primer on Knative Eventing.
Tested on a CUSTOM single-node stock Knative setup, see vHive Developer's Guide---uses knative/client@0c6ef82.
On the master node, execute the following instructions below:
- Apply the configuration
kubectl apply --filename config-k8s.yaml
You can interact with the pipeline either (A) from your local machine, or (B) from the master node.
On your local machine, execute the following instructions below:
-
Install grpcurl if not already installed:
wget -qO- https://github.com/fullstorydev/grpcurl/releases/download/v1.8.1/grpcurl_1.8.1_linux_x86_64.tar.gz | sudo tar -C /usr/bin/ -xz grpcurl
-
Make a gRPC request:
grpcurl -d '{"celsius": 97, "provider": "aws", "zone": "us-east-1", "machine": "monet"}' -plaintext <SERVER_HOSTNAME>:30002 TempReader.ReadTemp
<SERVER_HOSTNAME>
is the hostname/IP address of one of your worker nodes, or in the single-node setup the server itself; for instance,pc02.cloudlab.umass.edu
.
On the master node, execute the following instructions below:
- Install grpcurl if not already installed:
wget -qO- https://github.com/fullstorydev/grpcurl/releases/download/v1.8.1/grpcurl_1.8.1_linux_x86_64.tar.gz | sudo tar -C /usr/bin/ -xz grpcurl
- Get the cluster IP of
ease-pipeline-server
:kubectl get Service/ease-pipeline-server
- Make a gRPC request:
grpcurl -d '{"celsius": 97, "provider": "aws", "zone": "us-east-1", "machine": "monet"}' -plaintext <CLUSTER IP>:80 TempReader.ReadTemp
On the master node, execute the following instructions below:
- Inspect the server logs:
kubectl logs Service/ease-pipeline-server
- Inspect the
temp
-consumer logs:kubectl logs Service/ease-pipeline-temp-consumer
- Inspect the
overheat
-consumer logs:kubectl logs Service/ease-pipeline-overheat-consumer
On the master node, execute the following instructions below:
- Delete the configuration
kubectl delete --filename config-k8s.yaml
On the master node, execute the following instructions below:
- Apply the configuration
kubectl apply --filename config-kn.yaml
On the master node, execute the following instructions below:
- Install grpcurl if not already installed:
wget -qO- https://github.com/fullstorydev/grpcurl/releases/download/v1.8.1/grpcurl_1.8.1_linux_x86_64.tar.gz | sudo tar -C /usr/bin/ -xz grpcurl
- Wait until all services are ready:
watch kubectl get ksvc
- Press Ctrl+C to exit.
- Get the URL of
ease-pipeline-server
:kubectl get ksvc/ease-pipeline-server
- Make a gRPC request, stripping the protocol part (i.e.,
http://
) of the URL:grpcurl -d '{"celsius": 97, "provider": "aws", "zone": "us-east-1", "machine": "monet"}' -plaintext <URL>:80 TempReader.ReadTemp
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 server logs:
kubectl logs -c user-container -l serving.knative.dev/service=ease-pipeline-server
- Ignore the following error:
Failed to process env var: required key K_SINK missing value
- Ignore the following error:
- Inspect the
temp
-consumer logs:kubectl logs -c user-container -l serving.knative.dev/service=ease-pipeline-temp-consumer
- Inspect the
overheat
-consumer logs:kubectl logs -c user-container -l serving.knative.dev/service=ease-pipeline-overheat-consumer
overheat
-consumer is triggered only for temperatures > 80 °C.
On the master node, execute the following instructions below:
- Delete the configuration
kubectl delete --filename config-kn.yaml