Open this demo app in Google Cloud Shell. This includes necessary tools.
We provide a public image for the services in this demo app. You could also build your own following steps 4 - 6.
If you are using Cloud Shell, skip to the next section.
- Install gcloud https://cloud.google.com/sdk/install
- Install kubectl https://kubernetes.io/docs/tasks/tools/install-kubectl/
- Install docker https://docs.docker.com/install/
If you are using the provided image, skip to the next section.
- Get default project id and set environment variable:
PROJECT_ID=$(gcloud config get-value project)
- Build Image:
docker build -t gcr.io/${PROJECT-ID}/cloud-trace-demo .
- Upload Image to Container Registry:
gcloud docker -- push gcr.io/${PROJECT-ID}/cloud-trace-demo-test:v1
- Enable Google Cloud and set up region and zone.
gcloud init
- Enable the GKE API & billing:
gcloud services enable container.googleapis.com
- Create a GKE cluster named "demo":
gcloud container clusters create demo
-
If you are using your own image, please change the image variable in the following files:
-
Run setup.sh to apply the YAML files.
./setup.sh
-
Send request to the last service:
curl -w "\n" $(kubectl get svc cloud-trace-demo-c -ojsonpath='{.status.loadBalancer.ingress[0].ip}')
-
Visit Trace List to check traces generated. Click on any trace in the graph to see the Waterfall View.
-
Clean up GKE cluster/pods/services
gcloud container clusters delete demo