Skip to content

Latest commit

 

History

History

cloud-trace-demo-app

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

cloud-trace-demo-app

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.

Open Cloud Trace Demo APP in Cloud Shell

Demo Requirements

If you are using Cloud Shell, skip to the next section.

  1. Install gcloud https://cloud.google.com/sdk/install
  2. Install kubectl https://kubernetes.io/docs/tasks/tools/install-kubectl/
  3. Install docker https://docs.docker.com/install/

Google Container Registry Image Setup

If you are using the provided image, skip to the next section.

  1. Get default project id and set environment variable: PROJECT_ID=$(gcloud config get-value project)
  2. Build Image: docker build -t gcr.io/${PROJECT-ID}/cloud-trace-demo .
  3. Upload Image to Container Registry: gcloud docker -- push gcr.io/${PROJECT-ID}/cloud-trace-demo-test:v1

Create a GKE cluster

  1. Enable Google Cloud and set up region and zone. gcloud init
  2. Enable the GKE API & billing: gcloud services enable container.googleapis.com
  3. Create a GKE cluster named "demo": gcloud container clusters create demo

Send Requests to See Generated Traces

  1. If you are using your own image, please change the image variable in the following files:

  2. Run setup.sh to apply the YAML files. ./setup.sh

  3. Send request to the last service:

    curl -w "\n" $(kubectl get svc cloud-trace-demo-c -ojsonpath='{.status.loadBalancer.ingress[0].ip}')

  4. Visit Trace List to check traces generated. Click on any trace in the graph to see the Waterfall View. Screenshot

  5. Clean up GKE cluster/pods/services gcloud container clusters delete demo