Testing DJ App v2

Connect to the dj container

To test if its working as expected, we’ll exec into the dj container inside the djpod.

export DJ_POD_NAME=$(kubectl get pods -n prod -l app=dj -o jsonpath='{.items[].metadata.name}')

kubectl -n prod exec -it ${DJ_POD_NAME} -c dj bash

Output should be similar to:


root@dj-5b445fbdf4-8xkwp:/usr/src/app#

Test canary between metal-v1 and metal-v2

We’ll issue our curl request to the metal virtual service:

while true; do
  curl http://metal.prod.svc.cluster.local:9080/
  echo
  sleep .5
done

Output should loop about 5050 between the v1 and v2 versions of the metal service, similar to:


...
["Megadeth","Judas Priest"]
["Megadeth (Los Angeles, California)","Judas Priest (West Bromwich, England)"]
["Megadeth","Judas Priest"]
["Megadeth (Los Angeles, California)","Judas Priest (West Bromwich, England)"]
...

Hit CTRL-C to stop the looping.

Test canary between jazz-v1 and jazz-v2

We’ll next perform a similar test, but against the jazz virtual service.

while true; do
  curl http://jazz.prod.svc.cluster.local:9080/
  echo
  sleep .5
done

Output should loop about in a 9010 ratio between the v1 and v2 versions of the jazz service, similar to:


...
["Astrud Gilberto","Miles Davis"]
["Astrud Gilberto","Miles Davis"]
["Astrud Gilberto","Miles Davis"]
["Astrud Gilberto (Bahia, Brazil)","Miles Davis (Alton, Illinois)"]
["Astrud Gilberto","Miles Davis"]
...

Hit CTRL-C to stop the looping, and type exit to quit the container’s shell.

Congrats on implementing the DJ App onto App Mesh!