-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add clean,deploy and port-forward scripts and values for Jaeger + OpenSearch + OTel Demo #7516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
1a1c3e6
01f2944
7630948
4ff2ee3
63ea39d
4008bbb
794f492
c9e5064
44aaac0
7898d7d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,100 @@ | ||||||
# OpenTelemetry Demo app + HotRODapp + Jaeger + OpenSearch | ||||||
|
||||||
This example provides a one-command deployment of a complete observability stack on Kubernetes: | ||||||
- Jaeger (all-in-one) for tracing | ||||||
- OpenSearch and OpenSearch Dashboards | ||||||
- OpenTelemetry Demo application (multi-service web store) | ||||||
- HotRod application | ||||||
|
||||||
It is driven by `deploy-all.sh`, which supports both clean installs and upgrades. | ||||||
|
||||||
## Prerequisites | ||||||
- Kubernetes cluster reachable via `kubectl` | ||||||
- Installed CLIs: `bash`, `git`, `curl`, `kubectl`, `helm` | ||||||
- Network access to Helm repositories | ||||||
|
||||||
## Quick start | ||||||
- Clean install (removes previous releases/namespaces, then installs everything): | ||||||
```bash path=null start=null | ||||||
./deploy-all.sh clean | ||||||
``` | ||||||
- Upgrade (default) — installs if missing, upgrades if present: | ||||||
```bash path=null start=null | ||||||
./deploy-all.sh | ||||||
# or explicitly | ||||||
./deploy-all.sh upgrade | ||||||
``` | ||||||
- Specify Jaeger all-in-one image tag: | ||||||
```bash path=null start=null | ||||||
./deploy-all.sh upgrade <image-tag> | ||||||
# Example | ||||||
./deploy-all.sh upgrade latest | ||||||
``` | ||||||
|
||||||
Environment variables: | ||||||
- ROLLOUT_TIMEOUT: rollout wait timeout in seconds (default 600) | ||||||
|
||||||
```bash path=null start=null | ||||||
ROLLOUT_TIMEOUT=900 ./deploy-all.sh clean | ||||||
``` | ||||||
|
||||||
## What gets deployed | ||||||
- Namespace `opensearch`: | ||||||
- OpenSearch (single node) StatefulSet | ||||||
- OpenSearch Dashboards Deployment | ||||||
- Namespace `jaeger`: | ||||||
- Jaeger all-in-one Deployment (storage=none) | ||||||
- HOTROD application | ||||||
- Jaeger Query ClusterIP service (jaeger-query-clusterip) | ||||||
- Namespace `otel-demo`: | ||||||
- OpenTelemetry Demo (frontend, load-generator, and supporting services) | ||||||
|
||||||
|
||||||
## Verifying the deployment | ||||||
- Pods status: | ||||||
```bash path=null start=null | ||||||
kubectl get pods -n opensearch | ||||||
kubectl get pods -n jaeger | ||||||
kubectl get pods -n otel-demo | ||||||
``` | ||||||
- Services: | ||||||
```bash path=null start=null | ||||||
kubectl get svc -n opensearch | ||||||
kubectl get svc -n jaeger | ||||||
kubectl get svc -n otel-demo | ||||||
``` | ||||||
|
||||||
|
||||||
## Automatic port-forward using scrpit | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's a small typo in the heading:
Suggested change
Spotted by Diamond |
||||||
- OpenSearch Dashboards: | ||||||
```bash path=null start=null | ||||||
./start-port-forward.sh | ||||||
|
||||||
|
||||||
## Customization | ||||||
- Helm values provided in this directory: | ||||||
- `opensearch-values.yaml` | ||||||
- `opensearch-dashboard-values.yaml` | ||||||
- `jaeger-values.yaml` | ||||||
- `jaeger-config.yaml` | ||||||
- `otel-demo-values.yaml` | ||||||
- `jaeger-query-service.yaml` | ||||||
|
||||||
You can adjust these files and re-run `./deploy-all.sh upgrade` to apply changes. | ||||||
|
||||||
## Clean-up | ||||||
- Clean uninstall using cleanup.sh : | ||||||
```bash path=null start=null | ||||||
./cleanup.sh | ||||||
``` | ||||||
- Manual teardown: | ||||||
```bash path=null start=null | ||||||
helm uninstall opensearch -n opensearch || true | ||||||
helm uninstall opensearch-dashboards -n opensearch || true | ||||||
helm uninstall jaeger -n jaeger || true | ||||||
helm uninstall otel-demo -n otel-demo || true | ||||||
kubectl delete namespace opensearch jaeger otel-demo --ignore-not-found=true | ||||||
``` | ||||||
|
||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,89 @@ | ||||||
#!/bin/bash | ||||||
|
||||||
# Copyright (c) 2025 The Jaeger Authors. | ||||||
# SPDX-License-Identifier: Apache-2.0 | ||||||
|
||||||
# OpenSearch Observability Stack Cleanup Script | ||||||
|
||||||
main() { | ||||||
echo "Starting OpenSearch Observability Stack Cleanup" | ||||||
|
||||||
# Stop any existing port forwards | ||||||
echo "Stopping any existing port-forward processes..." | ||||||
pkill -f "kubectl port-forward" 2>/dev/null || true | ||||||
echo "✅ Port-forward processes stopped" | ||||||
|
||||||
# Uninstall OTEL Demo | ||||||
echo " Uninstalling OTEL Demo..." | ||||||
if helm list -n otel-demo | grep -q otel-demo; then | ||||||
helm uninstall otel-demo -n otel-demo | ||||||
echo "✅ OTEL Demo uninstalled" | ||||||
else | ||||||
echo "⚠️ OTEL Demo not found or already uninstalled" | ||||||
fi | ||||||
|
||||||
# Uninstall Jaeger | ||||||
echo "Uninstalling Jaeger..." | ||||||
if helm list -n jaeger | grep -q jaeger; then | ||||||
helm uninstall jaeger -n jaeger | ||||||
echo "✅ Jaeger uninstalled" | ||||||
else | ||||||
echo "⚠️ Jaeger not found or already uninstalled" | ||||||
fi | ||||||
|
||||||
# Uninstall OpenSearch Dashboards | ||||||
echo "Uninstalling OpenSearch Dashboards..." | ||||||
if helm list -n opensearch | grep -q opensearch-dashboards; then | ||||||
helm uninstall opensearch-dashboards -n opensearch | ||||||
echo "✅ OpenSearch Dashboards uninstalled" | ||||||
else | ||||||
echo "⚠️ OpenSearch Dashboards not found or already uninstalled" | ||||||
fi | ||||||
|
||||||
# Uninstall OpenSearch | ||||||
echo " Uninstalling OpenSearch..." | ||||||
if helm list -n opensearch | grep -q opensearch; then | ||||||
helm uninstall opensearch -n opensearch | ||||||
echo "✅ OpenSearch uninstalled" | ||||||
else | ||||||
echo "⚠️ OpenSearch not found or already uninstalled" | ||||||
fi | ||||||
|
||||||
# Wait for pods to terminate | ||||||
echo "Waiting for pods to terminate..." | ||||||
sleep 10 | ||||||
|
||||||
# Delete namespaces | ||||||
echo "Deleting namespaces..." | ||||||
for ns in otel-demo jaeger opensearch; do | ||||||
if kubectl get namespace "$ns" > /dev/null 2>&1; then | ||||||
kubectl delete namespace "$ns" --force --grace-period=0 2>/dev/null || true | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dangerous use of --force --grace-period=0 flags for namespace deletion. This forces immediate termination without allowing pods to shut down gracefully, which can lead to data corruption, incomplete cleanup of resources, and potential resource leaks. The --force flag should be removed to allow proper graceful shutdown, or used only as a last resort with additional safety checks.
Suggested change
Spotted by Diamond |
||||||
echo "✅ Namespace $ns deleted" | ||||||
else | ||||||
echo "⚠️ Namespace $ns not found or already deleted" | ||||||
fi | ||||||
done | ||||||
|
||||||
# Clean up any remaining resources (PVCs, etc.) | ||||||
echo "Cleaning up any remaining PVCs..." | ||||||
kubectl get pvc -A | grep -E "(opensearch|jaeger|otel-demo)" || echo "No remaining PVCs found" | ||||||
|
||||||
# Final verification | ||||||
echo "Performing final verification..." | ||||||
remaining_pods=$(kubectl get pods -A | grep -E "(opensearch|jaeger|otel-demo)" || true) | ||||||
if [ -z "$remaining_pods" ]; then | ||||||
echo "All components cleaned up successfully!" | ||||||
else | ||||||
echo "⚠️ Some pods may still be terminating:" | ||||||
echo "$remaining_pods" | ||||||
echo "This is normal and they should disappear shortly" | ||||||
fi | ||||||
|
||||||
echo "" | ||||||
echo "✅ Cleanup Complete!" | ||||||
echo "" | ||||||
echo " All OpenSearch observability stack components have been removed" | ||||||
echo "" | ||||||
} | ||||||
|
||||||
main "$@" |
Uh oh!
There was an error while loading. Please reload this page.