Repository for dynamic tracing queries.
This repository relies on Minikube and GCP to emulate microservice scenarios. We primarily use Ubuntu 18.04 for our tests. For convenience, dependencies can be installed with the ./tools/setup.sh
command. It contains all the steps necessary to set up the compiler and testing environment.
rust
to build the dynamic tracing compilerkubernetes
to administrate and run web applications in a clusterminikube
to run a local Kubernetes clusterdocker
as the container driver back end of Minikubebazel
to build Wasm filters for Envoyistio
to manage Envoy and its filterspython3.6
to run the scripts
TBD
prometheus-api-client
to query Prometheus
The compiler can be build with cargo build
.
After the compiler has been built, you can compile queries with the
target/debug/dtc -q [QUERY] -u [USER_DEFINED_FUNCTION]
command in the tracing compiler
directory.
For example,
debug/dtc -q example_queries/count.cql -u example_udfs/count.cc
compiles a counting query with the user defined function "count". The result will be stored in cpp_filter/filter.cc
.
Once everything is installed, the Kubernetes cluster can be started with
./kube_env.py --setup
if you are running on minikube or ./kube_env.py --setup -p GCP
if you are running on google cloud. If you are running on google cloud, add -p GCP
to all subsequent commands as well. Starting the cluster will take a few minutes.
We provide a pre-built filter. It can be deployed with the ./kube_env.py --deploy-filter
command. If the filter was generated from the compiler, it
can be rebuilt with the ./kube_env.py --build-filter
command
Once the filter has been successfully installed, it is possible to run experiments with ./run_experiments.py --num-experiments 1
. You can also issue single
HTTP requests with ./env/send_request.py
.
Remove the filter
./kube_env.py --undeploy-filter
Remove the deployment
./kube_env.py --remove-bookinfo
Tear down the cluster
./kube_env.py --clean