The cloudlab profile is called hotelreserv-k8s-setup link. It should work under my user (royno7), and root at least. If it doesn't work under your user, su to mine or root after experiment setup and run "if not" cmds in step B.
-
Check if there is a
DeathStarBench
repository under/local
.If not, manually clone
DeathStarBench
underdocclab
:git clone https://github.com/docc-lab/DeathStarBench.git
-
Check if hotelreservation image is pulled
docker images | grep hotel-reservation
If not, pull the
hotelreservation
Docker image:docker pull deathstarbench/hotel-reservation
-
Check if pods are running in kubernetes
kubectl get pods
If not, apply the Kubernetes configurations:
kubectl apply -Rf /local/DeathStarBench/hotelreservation/kubernetes
-
Check if there is wrk executable under /local/DeathStarBench/wrk2
If not, build from src
cd /local/DeathStarBench/wrk2 git submodule update --init --recursive ./deps/luajit/ sudo apt-get update sudo apt-get install -y libssl-dev make all
-
Build HotelReservation executable from src
cd /local/DeathStarBench/hotelreservation make bin
-
Build images from current filesystem Before executing following cmds, take a look at
build-docker-images.sh
script to accomendate your needs, including--no-cache
to build images w/t using any cached layers.--push
to push image to docker hub (user variable in script and extra auth withdocker login
are required)--output type=docker
to output image to local image store instead of pushing.--cache-from
to specifies external cache source for build- etc... Then use the script to build images
cd /local/DeathStarBench/hotelreservation/kubernetes/scripts ./build-docker-images.sh
-
Update yamls
cd /local/DeathStarBench/hotelreservation/kubernetes/scripts ./update-yamls.sh
-
Apply updated yamls in k8s, and continue to step D
kubectl apply -Rf /local/DeathStarBench/hotelReservation/kubernetes
-
Find IP address of services
kubectl get services | grep frontend
-
Update URL written in wrk2 script
nano /local/DeathStarBench/hotelReservation/wrk2/scripts/hotel-reservation/mixed-workload_type_1.lua
-
Copy files into standalone pod (called hr-client)
hrclient=$(kubectl get pod | grep hr-client | cut -f 1 -d " ") kubectl cp /local/DeathStarBench "${hrclient}":/home -c hr-client
-
Enter the pod to run workload generator
kubectl exec -it deployment/hr-client -- /bin/bash
After entering client pod, execute following cmd (there is placeholder for frontend's IP inline, don't forget to change it)
cd /home/DeathStarBench/hotelReservation ../wrk2/wrk -D exp -t 2 -c 2 -d 30 -L -s ./wrk2/scripts/hotel-reservation/mixed-workload_type_1.lua http://<FRONTEND_IP_IN_STEP_D.1>:5000 -R 2
-
(Recommended) Via Jaeger web UI with port forwarding
Note that all IPs in k8s cluster are not accessible from outside as CloudLab only provides a few public IPs per experiment. You can either setup port forwarding from k8s controler node to your local as the following (or use graphic ssh, see step E.2).
ssh -L 16686:localhost:16686 -i <PATH_TO_YOUR_KEY> <YOUR_CLOUDLAB_USERID>@<HOST_FOR_NODE_0> ‘kubectl port-forward deployment/jaeger 16686:16686’
Then you'll be able to see Jaeger web UI by visiting
http://localhost:16686/
with browser in your local. -
Via Jaeger web UI with graphic ssh
http://<jaeger service IP>:16686
Note that all IPs in k8s cluster are not accessible from outside as CloudLab only provides a few public IPs per experiment. So if you want to check Jaeger UI with graphic ssh, extra steps to setup graphic ssh to use browser are required on both your local and remote machine. I'll leave this part on your own.
-
Via api