Skip to content

Commit dbeabc7

Browse files
Add clean,deploy and port-forward scripts and values for Jaeger + OpenSearch + OTel Demo (#7516)
## Which problem is this PR solving? part of mentorship work - #7326 ## Description of the changes Summary This PR introduces a complete, repeatable deployment for the OpenTelemetry Demo with Jaeger , HotROD app and OpenSearch (including Dashboards) under examples/otel-demo. It provides a single entrypoint script that supports both upgrade and clean install modes, plus the necessary Helm values and a ClusterIP service for Jaeger Query. Deployment script • Added deploy-all.sh with modes: upgrade (default) and clean (uninstall + fresh install) ◦ Pre-flight checks for required CLIs (bash, git, curl, kubectl, helm) and cluster availability ◦ Validates presence of required values files ◦ Clones jaegertracing/helm-charts v2 and builds dependencies ◦ Deploys in order: OpenSearch -> OpenSearch Dashboards -> Jaeger (all-in-one) -> OTel Demo ◦ Waits for StatefulSets/Deployments to be ready with rollout status and timeouts ◦ Creates a dedicated ClusterIP service for Jaeger Query Added values files: ◦ opensearch-values.yaml ◦ opensearch-dashboard-values.yaml ◦ jaeger-values.yaml ◦ jaeger-config.yaml (userconfig for Jaeger) ◦ otel-demo-values.yaml • Added Jaeger Query service: ◦ jaeger-query-service.yaml (ClusterIP service in jaeger namespace) ## How was this change tested? - Tested in Local Minikube Cluster as well as production Oracle Cluster ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [x] I have added unit tests for the new functionality - [x] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `npm run lint` and `npm run test` --------- Signed-off-by: danish9039 <[email protected]> Signed-off-by: hippie-danish <[email protected]> Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
1 parent de827cf commit dbeabc7

17 files changed

+1260
-0
lines changed

examples/otel-demo/README.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# OpenTelemetry Demo app + HotRODapp + Jaeger + OpenSearch
2+
3+
This example provides a one-command deployment of a complete observability stack on Kubernetes:
4+
- Jaeger (all-in-one) for tracing
5+
- OpenSearch and OpenSearch Dashboards
6+
- OpenTelemetry Demo application (multi-service web store)
7+
- HotRod application
8+
9+
It is driven by `deploy-all.sh`, which supports both clean installs and upgrades.
10+
11+
## Prerequisites
12+
- Kubernetes cluster reachable via `kubectl`
13+
- Installed CLIs: `bash`, `git`, `curl`, `kubectl`, `helm`
14+
- Network access to Helm repositories
15+
16+
## Quick start
17+
- Clean install (removes previous releases/namespaces, then installs everything):
18+
```bash path=null start=null
19+
./deploy-all.sh clean
20+
```
21+
- Upgrade (default) — installs if missing, upgrades if present:
22+
```bash path=null start=null
23+
./deploy-all.sh
24+
# or explicitly
25+
./deploy-all.sh upgrade
26+
```
27+
- Specify Jaeger all-in-one image tag:
28+
```bash path=null start=null
29+
./deploy-all.sh upgrade <image-tag>
30+
# Example
31+
./deploy-all.sh upgrade latest
32+
```
33+
34+
Environment variables:
35+
- ROLLOUT_TIMEOUT: rollout wait timeout in seconds (default 600)
36+
37+
```bash path=null start=null
38+
ROLLOUT_TIMEOUT=900 ./deploy-all.sh clean
39+
```
40+
41+
## What gets deployed
42+
- Namespace `opensearch`:
43+
- OpenSearch (single node) StatefulSet
44+
- OpenSearch Dashboards Deployment
45+
- Namespace `jaeger`:
46+
- Jaeger all-in-one Deployment (storage=none)
47+
- HOTROD application
48+
- Jaeger Query ClusterIP service (jaeger-query-clusterip)
49+
- Namespace `otel-demo`:
50+
- OpenTelemetry Demo (frontend, load-generator, and supporting services)
51+
52+
53+
## Verifying the deployment
54+
- Pods status:
55+
```bash path=null start=null
56+
kubectl get pods -n opensearch
57+
kubectl get pods -n jaeger
58+
kubectl get pods -n otel-demo
59+
```
60+
- Services:
61+
```bash path=null start=null
62+
kubectl get svc -n opensearch
63+
kubectl get svc -n jaeger
64+
kubectl get svc -n otel-demo
65+
```
66+
67+
68+
## Automatic port-forward using scrpit
69+
- OpenSearch Dashboards:
70+
```bash path=null start=null
71+
./start-port-forward.sh
72+
73+
74+
## Customization
75+
- Helm values provided in this directory:
76+
- `opensearch-values.yaml`
77+
- `opensearch-dashboard-values.yaml`
78+
- `jaeger-values.yaml`
79+
- `jaeger-config.yaml`
80+
- `otel-demo-values.yaml`
81+
- `jaeger-query-service.yaml`
82+
83+
You can adjust these files and re-run `./deploy-all.sh upgrade` to apply changes.
84+
85+
## Clean-up
86+
- Clean uninstall using cleanup.sh :
87+
```bash path=null start=null
88+
./cleanup.sh
89+
```
90+
- Manual teardown:
91+
```bash path=null start=null
92+
helm uninstall opensearch -n opensearch || true
93+
helm uninstall opensearch-dashboards -n opensearch || true
94+
helm uninstall jaeger -n jaeger || true
95+
helm uninstall otel-demo -n otel-demo || true
96+
kubectl delete namespace opensearch jaeger otel-demo --ignore-not-found=true
97+
```
98+
99+
100+

examples/otel-demo/cleanup.sh

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#!/bin/bash
2+
3+
# Copyright (c) 2025 The Jaeger Authors.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
# OpenSearch Observability Stack Cleanup Script
7+
8+
main() {
9+
echo "Starting OpenSearch Observability Stack Cleanup"
10+
11+
# Stop any existing port forwards
12+
echo "Stopping any existing port-forward processes..."
13+
pkill -f "kubectl port-forward" 2>/dev/null || true
14+
echo "✅ Port-forward processes stopped"
15+
16+
# Uninstall OTEL Demo
17+
echo " Uninstalling OTEL Demo..."
18+
if helm list -n otel-demo | grep -q otel-demo; then
19+
helm uninstall otel-demo -n otel-demo
20+
echo "✅ OTEL Demo uninstalled"
21+
else
22+
echo "⚠️ OTEL Demo not found or already uninstalled"
23+
fi
24+
25+
# Uninstall Jaeger
26+
echo "Uninstalling Jaeger..."
27+
if helm list -n jaeger | grep -q jaeger; then
28+
helm uninstall jaeger -n jaeger
29+
echo "✅ Jaeger uninstalled"
30+
else
31+
echo "⚠️ Jaeger not found or already uninstalled"
32+
fi
33+
34+
# Uninstall OpenSearch Dashboards
35+
echo "Uninstalling OpenSearch Dashboards..."
36+
if helm list -n opensearch | grep -q opensearch-dashboards; then
37+
helm uninstall opensearch-dashboards -n opensearch
38+
echo "✅ OpenSearch Dashboards uninstalled"
39+
else
40+
echo "⚠️ OpenSearch Dashboards not found or already uninstalled"
41+
fi
42+
43+
# Uninstall OpenSearch
44+
echo " Uninstalling OpenSearch..."
45+
if helm list -n opensearch | grep -q opensearch; then
46+
helm uninstall opensearch -n opensearch
47+
echo "✅ OpenSearch uninstalled"
48+
else
49+
echo "⚠️ OpenSearch not found or already uninstalled"
50+
fi
51+
52+
# Wait for pods to terminate
53+
echo "Waiting for pods to terminate..."
54+
sleep 10
55+
56+
# Delete namespaces
57+
echo "Deleting namespaces..."
58+
for ns in otel-demo jaeger opensearch; do
59+
if kubectl get namespace "$ns" > /dev/null 2>&1; then
60+
kubectl delete namespace "$ns" --force --grace-period=0 2>/dev/null || true
61+
echo "✅ Namespace $ns deleted"
62+
else
63+
echo "⚠️ Namespace $ns not found or already deleted"
64+
fi
65+
done
66+
67+
# Clean up any remaining resources (PVCs, etc.)
68+
echo "Cleaning up any remaining PVCs..."
69+
kubectl get pvc -A | grep -E "(opensearch|jaeger|otel-demo)" || echo "No remaining PVCs found"
70+
71+
# Final verification
72+
echo "Performing final verification..."
73+
remaining_pods=$(kubectl get pods -A | grep -E "(opensearch|jaeger|otel-demo)" || true)
74+
if [ -z "$remaining_pods" ]; then
75+
echo "All components cleaned up successfully!"
76+
else
77+
echo "⚠️ Some pods may still be terminating:"
78+
echo "$remaining_pods"
79+
echo "This is normal and they should disappear shortly"
80+
fi
81+
82+
echo ""
83+
echo "✅ Cleanup Complete!"
84+
echo ""
85+
echo " All OpenSearch observability stack components have been removed"
86+
echo ""
87+
}
88+
89+
main "$@"

0 commit comments

Comments
 (0)