forked from jaegertracing/jaeger
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-all.sh
More file actions
72 lines (63 loc) · 2.57 KB
/
deploy-all.sh
File metadata and controls
72 lines (63 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
# Copyright (c) 2025 The Jaeger Authors.
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail
# Clone Jaeger Helm Charts (v2 branch) if not already present
if [ ! -d "helm-charts" ]; then
echo "📥 Cloning Jaeger Helm Charts..."
git clone https://github.com/jaegertracing/helm-charts.git
cd helm-charts
git checkout v2
echo "Adding required Helm repositories..."
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo add incubator https://charts.helm.sh/incubator
helm repo update
helm dependency build ./charts/jaeger
cd ..
else
echo "📁 Jaeger Helm Charts already exist. Skipping clone."
fi
# Navigate into examples/oci if not already in it
if [[ "$(basename $PWD)" != "oci" ]]; then
if [ -d "./examples/oci" ]; then
echo "📂 Changing to ./examples/oci directory..."
cd ./examples/oci
else
echo "❌ Cannot find ./examples/oci directory. Exiting."
exit 1
fi
fi
# Deploy Jaeger (All-in-One with memory storage)
echo "🟣 Step 1: Installing Jaeger..."
helm upgrade --install --force jaeger ./helm-charts/charts/jaeger \
--set provisionDataStore.cassandra=false \
--set allInOne.enabled=true \
--set storage.type=memory \
--set-file userconfig="./config.yaml" \
-f ./jaeger-values.yaml
# Deploy Prometheus Monitoring Stack
echo "🟢 Step 2: Deploying Prometheus Monitoring stack..."
kubectl apply -f prometheus-svc.yaml
helm upgrade --install --force prometheus -f monitoring-values.yaml prometheus-community/kube-prometheus-stack
# Create ConfigMap for Trace Generator
echo "🔵 Step 3: Creating ConfigMap for Trace Generator..."
kubectl create configmap trace-script --from-file=./load-generator/generate_traces.py --dry-run=client -o yaml | kubectl apply -f -
# Deploy Trace Generator Pod
echo "🟡 Step 4: Deploying Trace Generator Pod..."
kubectl apply -f ./load-generator/load-generator.yaml
# Output Port-forward Instructions
echo "✅ Deployment Complete!"
echo ""
echo "📡 Port-forward the following to access UIs locally:"
echo ""
echo "kubectl port-forward svc/jaeger-query 16686:16686 # Jaeger UI"
echo "kubectl port-forward svc/prometheus 9090:9090 # Prometheus UI"
echo "kubectl port-forward svc/prometheus-grafana 9091:80 # Grafana UI"
echo "kubectl port-forward svc/jaeger-hotrod 8080:80 # HotROD UI"
echo ""
echo "Then open:"
echo "🔍 Jaeger: http://localhost:16686"
echo "📈 Prometheus: http://localhost:9090"
echo "📊 Grafana: http://localhost:9091"
echo "🚕 HotROD: http://localhost:8080"