litmus/monitoring/tutorials/otel-demo
Suhyen Im faa6e482a5
feat: add otel-demo tutorial (#4858)
* feat: add otel-demo tutorial

Co-authored-by: Suhyen Im <suhyenim.kor@gmail.com>
Co-authored-by: Jaeyeon Park <donionbs7@gmail.com>
Signed-off-by: Suhyen Im <suhyenim.kor@gmail.com>
Signed-off-by: Jaeyeon Park <donionbs7@gmail.com>

* feat: add otel-demo screenshots

Co-authored-by: Suhyen Im <suhyenim.kor@gmail.com>
Co-authored-by: Jaeyeon Park <donionbs7@gmail.com>
Signed-off-by: Suhyen Im <suhyenim.kor@gmail.com>
Signed-off-by: Jaeyeon Park <donionbs7@gmail.com>

* chore: update tutorial and architecture image

Co-authored-by: Suhyen Im <suhyenim.kor@gmail.com>
Co-authored-by: Jaeyeon Park <donionbs7@gmail.com>
Signed-off-by: Suhyen Im <suhyenim.kor@gmail.com>
Signed-off-by: Jaeyeon Park <donionbs7@gmail.com>

---------

Signed-off-by: Suhyen Im <suhyenim.kor@gmail.com>
Signed-off-by: Jaeyeon Park <donionbs7@gmail.com>
Co-authored-by: Jaeyeon Park <donionbs7@gmail.com>
Co-authored-by: Namkyu Park <53862866+namkyu1999@users.noreply.github.com>
2024-11-22 13:08:32 +05:30
..
cart-service feat: add otel-demo tutorial (#4858) 2024-11-22 13:08:32 +05:30
recommendation-service feat: add otel-demo tutorial (#4858) 2024-11-22 13:08:32 +05:30
screenshots feat: add otel-demo tutorial (#4858) 2024-11-22 13:08:32 +05:30
README.md feat: add otel-demo tutorial (#4858) 2024-11-22 13:08:32 +05:30
chaos-exporter-dashboard.json feat: add otel-demo tutorial (#4858) 2024-11-22 13:08:32 +05:30
custom_otel_demo_values.yml feat: add otel-demo tutorial (#4858) 2024-11-22 13:08:32 +05:30

README.md

Otel-demo tutorial

This tutorial provides a step-by-step guide for injecting chaos into target applications using LitmusChaos and observing the chaos with OpenTelemetry.

otel_demo_tutorial_architecture

0. Prerequisites

  • Kubernetes 1.24+
  • 8 GB of free RAM
  • Helm 3.9+

1. Install Litmus

  1. Create the litmus namespace.
    kubectl create ns litmus
    
  2. Add the Litmus Helm repository.
    helm repo add litmuschaos https://litmuschaos.github.io/litmus-helm/
    
  3. Install Litmus using Helm.
    helm install chaos litmuschaos/litmus \
    --namespace=litmus \
    --set portal.frontend.service.type=NodePort \
    --set mongodb.image.registry=ghcr.io/zcube \
    --set mongodb.image.repository=bitnami-compat/mongodb \
    --set mongodb.image.tag=6.0.5
    
  4. Verify the installation.
    kubectl get all -n litmus
    
  5. Forward the Litmus frontend service port.
    kubectl port-forward svc/chaos-litmus-frontend-service 9091:9091 -n litmus
    
    Access the Litmus frontend at http://localhost:9091 and log in with admin / litmus.

2. Set Up Litmus Environment

  1. Create a new environment.
    • Environment Name: local
    • Environment Type: Production
  2. Configure a new chaos infrastructure.
    • Name: local
    • Chaos Components Installation: Cluster-wide access
    • Installation Location (Namespace): litmus
    • Service Account Name: litmus
  3. Deploy the new chaos infrastructure.
    cd ~/Downloads
    kubectl apply -f local-litmus-chaos-enable.yml
    
    Wait until the status shows CONNECTED.

3. Install Otel-demo microservices & Observability tools

  1. Create the otel-demo namespace.
    kubectl create ns otel-demo
    
  2. Add the OpenTelemetry Helm repository.
    helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
    
  3. Install Otel-demo microservices and Observability tools using Helm.
    cd litmus/monitoring/tutorials/otel-demo
    helm install my-otel-demo open-telemetry/opentelemetry-demo --namespace otel-demo --values custom_otel_demo_values.yml
    
    It contains Otel-demo microservices, OpenTelemetry(with chaos metrics), Prometheus, Jaeger and Grafana.
  4. Verify the installation.
    kubectl get all -n otel-demo
    
  5. Forward the Otel-demo frontend proxy port.
    kubectl port-forward svc/my-otel-demo-frontendproxy 8080:8080 -n otel-demo
    
  6. Access the following services.

4. Add Grafana Panel

Import the chaos-experiments-dashboard.json file into Grafana to visualize the results of chaos experiments.

5. Observe chaos

Explore the following experiments to observe chaos on the Otel-demo microservices.

  • Pod Network Latency

    Performs a pod network latency experiment on the cart service.

  • Pod Delete

    Performs a pod delete experiment on the recommendation service.