This repository contains the files utilized during the tutorial presented in the dedicated IsItObservable episode related to Keptn LifeCycle Toolkit.
What you will learn
- How to use the Keptn LifeCycle Toolkit
This repository showcase the usage of Keptn LifeCycle Toolkit with :
- The Otel-demo
- The OpenTelemetry Operator
- Nginx ingress controller
- Dynatrace
We will send all Telemetry data produced by the Otel-demo , and KLT to Dynatrace.
The following tools need to be install on your machine :
- jq
- kubectl
- git
- gcloud ( if you are using GKE)
- Helm
You will first need a Kubernetes cluster with 2 Nodes. You can either deploy on Minikube or K3s or follow the instructions to create GKE cluster:
PROJECT_ID="<your-project-id>"
gcloud services enable container.googleapis.com --project ${PROJECT_ID}
gcloud services enable monitoring.googleapis.com \
cloudtrace.googleapis.com \
clouddebugger.googleapis.com \
cloudprofiler.googleapis.com \
--project ${PROJECT_ID}
ZONE=europe-west3-a
NAME=isitobservable-keptn-lifecycle-tookit
gcloud container clusters create "${NAME}" --zone ${ZONE} --machine-type=e2-medium --num-nodes=3
If you don't have any Dyntrace tenant , then i suggest to create a trial using the following link : Dynatrace Trial
Once you have your Tenant save the Dynatrace (including https) tenant URL in the variable DT_TENANT_URL
(for example : https://dedededfrf.live.dynatrace.com)
DT_TENANT_URL=<YOUR TENANT URL>
Create a Dynatrace token with the following scope ( left menu Acces Token):
- ingest metrics
- ingest OpenTelemetry traces
DATA_INGEST_TOKEN=<YOUR TOKEN VALUE>
https://github.com/isItObservable/keptn-lifecycle-Toolkit
cd keptn-lifecycle-Toolkit
The application will deploy the otel demo v1.2.1
chmod 777 deployment.sh
./deployment.sh --clustername "${NAME}" --dturl "${DT_TENANT_URL}" --dttoken "${DATA_INGEST_TOKEN}"
We will change the otel collector url define in the KLS in 2 deployments :
kubectl edit deployment klc-controller-manager -n keptn-lifecycle-toolkit-system
Change the OTEL_COLLECTOR_URL
to use oteld-collector.default.svc.cluster.local:4317
kubectl edit deployment keptn-scheduler -n keptn-lifecycle-toolkit-system
Change the OTEL_COLLECTOR_URL
to use oteld-collector.default.svc.cluster.local:4317
kubectl apply -f keptn/grafana-dashboard-keptn-overview.yaml
kubectl apply -f keptn/grafana-dashboard-keptn-workloads.yaml
kubectl apply -f keptn/grafana_dashboard-keptn-application.yaml
kubectl create ns otel-demo
kubectl apply -f keptn/v1/application.yaml -n otel-demo
kubectl apply -f kubernetes-manifests/openTelemetry-sidecar.yaml -n otel-demo
kubectl annotate ns otel-demo keptn.sh/lifecycle-toolkit="enabled"
kubectl apply -f keptn/keptn-predeployment_adservice.yaml -n otel-demo
kubectl apply -f keptn/keptn-predeployment_cartservice.yaml -n otel-demo
kubectl apply -f keptn/keptn-predeployment_checkoutservice.yaml -n otel-demo
kubectl apply -f keptn/keptn-predeployment_currency.yaml -n otel-demo
kubectl apply -f keptn/keptn-predeployment_featureflag.yaml -n otel-demo
kubectl apply -f keptn/keptn-predeployment_frontend.yaml -n otel-demo
kubectl apply -f keptn/keptn-predeployment_kafka.yaml -n otel-demo
kubectl apply -f keptn/keptn-predeployment_paymentservice.yaml -n otel-demo
kubectl apply -f keptn/keptn-predeployment_postgres.yaml -n otel-demo
kubectl apply -f keptn/keptn-predeployment_productcatalogserice.yaml -n otel-demo
kubectl apply -f keptn/keptn-predeployment_recommendation.yaml -n otel-demo
kubectl apply -f keptn/keptn-predeployment_redis.yaml -n otel-demo
kubectl apply -f keptn/keptn-predeployment_shipping.yaml -n otel-demo
kubectl apply -f keptn/v1/K8sdemo.yaml -n otel-demo
kubectl get keptnworkloadinstance -n otel-demo
if we look at the pod running we will see the pods handling are various tasks
kubectl get pods -n otel-demo
ubectl apply -f keptn/v2/application.yaml -n otel-demo
kubectl apply -f keptn/v2/keptn-postdeployment_http.yaml -n otel-demo
kubectl apply -f keptn/v2/post-deployment-eval.yaml -n otel-demo
kubectl apply -f keptn/v2/pre-deployment-eval.yaml -n otel-demo
kubectl apply -f keptn/v2/provider.yaml -n otel-demo
kubectl apply -f keptn/v2/K8sdemo.yaml -n otel-demo