Skip to content

alistarle/vtt-tracing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VTT Demo

Prerequisite

  • A clean k8s cluster (tested only with OVHcloud managed k8s)

Cluster prerequisite

Note: This example was run from a OVHcloud k8s managed cluster

  1. Install nginx ingress controller on the cluster
helm upgrade --install ingress-nginx ingress-nginx \
  --repo https://kubernetes.github.io/ingress-nginx \
  --namespace ingress-nginx --create-namespace --version 4.4.2
  1. Install cert-manager and cluster issuer
helm repo add jetstack https://charts.jetstack.io
helm upgrade --install cert-manager jetstack/cert-manager \
  --namespace cert-manager --create-namespace -f cert-manager/values.yaml --version v1.11.0
kubectl apply -f cert-manager/cluster-issuer.yml
  1. Install kube-prometheus-stack
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm upgrade --install kube-prometheus-stack prometheus-community/kube-prometheus-stack -f kube-prometheus-stack/values.yaml --namespace monitoring --create-namespace --version 44.3.0
  1. Install Keystone application
cd keystone
helm upgrade --install keystone .

** Please be patient while the chart is being deployed **

Connect to openstack with the following variables:

export OS_USERNAME=admin
export OS_PASSWORD=******
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_AUTH_URL=https://keystone.57.128.91.118.xip.opensteak.fr/v3/
export OS_IDENTITY_API_VERSION=3
  1. You can export the variable created from the previous step and create openstack token:
pip install python-openstackclient
openstack token issue

Demo time

  1. Install grafana tempo
helm repo add grafana https://grafana.github.io/helm-charts
helm upgrade --install tempo grafana/tempo --set tempo.searchEnabled=true --set tempo.global_overrides.max_search_bytes_per_trace=0
  1. Add the grafana datasource: http://tempo.default:3100 (1m)

  2. Install opentelemetry operator

kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml
kubectl get pods -n opentelemetry-operator-system
  1. Install open-telemetry collector
kubectl apply -f otel/collector.yaml
  1. Install open-telemetry instrumentation
kubectl apply -f otel/instrumentation.yaml
  1. Edit the Keystone deployment with right annotation
kubectl patch deployment keystone -p '{"spec": {"template":{"metadata":{"annotations":{"instrumentation.opentelemetry.io/inject-python":"true","instrumentation.opentelemetry.io/container-names": "keystone"}}}}}'
  1. Create a token a check the trace
openstack token issue

Go to https://grafana.57.128.91.118.xip.opensteak.fr/explore

Rollback demo

  1. Delete grafana datasource

  2. Kubectl patch to remove annotation from keystone deployment

kubectl patch deployment keystone --type=json -p='[{"op":"remove","path":"/spec/template/metadata/annotations/instrumentation.opentelemetry.io~1inject-python"}]'
kubectl patch deployment keystone --type=json -p='[{"op":"remove","path":"/spec/template/metadata/annotations/instrumentation.opentelemetry.io~1container-names"}]'
  1. Delete k8s object
helm uninstall tempo
kubectl delete -f otel/collector.yaml
kubectl delete -f otel/instrumentation.yaml
kubectl delete -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml

About

Repository to store scripts related to VTT talk about tracing

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published