Skip to content

Commit c1f0f36

Browse files
Separate scripts for deployment upgrade and clean install of Jaeger Demo deployment and enable G-Tracking in Jaeger UI (#7440)
## Which problem is this PR solving? - Part of #7115 . - Added another script that does clean install of deployments , this would be needed if we do changes in config's of jaeger or prometheus stack . - Added G-tracking for Jaeger UI . - Added functionality in the github workflow to run different scripts based on event triggered . ## Checklist - [ ] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [ ] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] 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: chahat sagar <[email protected]>
1 parent 62a12a8 commit c1f0f36

File tree

4 files changed

+43
-11
lines changed

4 files changed

+43
-11
lines changed

.github/workflows/ci-deploy-demo.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ jobs:
3131
- name: Checkout jaeger repository
3232
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
3333

34-
- name: Deploy using Jaeger's deploy-all.sh
34+
- name: Deploy using appropriate script
3535
run: |
3636
cd ./examples/oci
37-
bash ./deploy-all.sh
37+
if [ "${{ github.event_name }}" = "schedule" ]; then
38+
echo "🕒 Scheduled run - using deploy-all.sh (upgrade mode)"
39+
bash ./deploy-all.sh
40+
else
41+
echo "🔄 Manual run - using deploy-all.sh with clean mode (uninstall/install)"
42+
bash ./deploy-all.sh clean
43+
fi

examples/oci/config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ extensions:
2424
endpoint: 0.0.0.0:13133
2525
jaeger_query:
2626
base_path: /jaeger
27+
ui:
28+
config_file: /etc/jaeger/ui-config/ui-config.json
29+
log_access: true
2730
storage:
2831
traces: some_storage
2932
metrics: some_metrics_storage

examples/oci/deploy-all.sh

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@
55

66
set -euo pipefail
77

8+
MODE="${1:-upgrade}"
9+
10+
if [[ "$MODE" == "upgrade" ]]; then
11+
HELM_JAEGER_CMD="upgrade --install --force"
12+
HELM_PROM_CMD="upgrade --install --force"
13+
else
14+
echo "🟣 Clean mode: Uninstalling Jaeger and Prometheus..."
15+
helm uninstall jaeger --ignore-not-found || true
16+
helm uninstall prometheus --ignore-not-found || true
17+
for name in jaeger prometheus; do
18+
while helm list --filter "^${name}$" | grep "$name" &>/dev/null; do
19+
echo "Waiting for Helm release $name to be deleted..."
20+
done
21+
done
22+
HELM_JAEGER_CMD="install"
23+
HELM_PROM_CMD="install"
24+
fi
25+
826
# Clone Jaeger Helm Charts (v2 branch) if not already present
927
if [ ! -d "helm-charts" ]; then
1028
echo "📥 Cloning Jaeger Helm Charts..."
@@ -33,19 +51,18 @@ if [[ "$(basename $PWD)" != "oci" ]]; then
3351
fi
3452
fi
3553

36-
# Deploy Jaeger (All-in-One with memory storage)
37-
echo "🟣 Step 1: Installing Jaeger..."
38-
helm upgrade --install --force jaeger ./helm-charts/charts/jaeger \
54+
echo "🟣 Deploying Jaeger..."
55+
helm $HELM_JAEGER_CMD jaeger ./helm-charts/charts/jaeger \
3956
--set provisionDataStore.cassandra=false \
4057
--set allInOne.enabled=true \
4158
--set storage.type=memory \
4259
--set-file userconfig="./config.yaml" \
60+
--set-file uiconfig="./ui-config.json" \
4361
-f ./jaeger-values.yaml
4462

45-
# Deploy Prometheus Monitoring Stack
46-
echo "🟢 Step 2: Deploying Prometheus Monitoring stack..."
63+
echo "🟢 Deploying Prometheus..."
4764
kubectl apply -f prometheus-svc.yaml
48-
helm upgrade --install --force prometheus -f monitoring-values.yaml prometheus-community/kube-prometheus-stack
65+
helm $HELM_PROM_CMD prometheus -f monitoring-values.yaml prometheus-community/kube-prometheus-stack
4966

5067
# Create ConfigMap for Trace Generator
5168
echo "🔵 Step 3: Creating ConfigMap for Trace Generator..."
@@ -55,8 +72,8 @@ kubectl create configmap trace-script --from-file=./load-generator/generate_trac
5572
echo "🟡 Step 4: Deploying Trace Generator Pod..."
5673
kubectl apply -f ./load-generator/load-generator.yaml
5774

58-
#Deploy ingress changes
59-
echo "🟡 Step 4: Deploying Ingress Resource..."
75+
# Deploy ingress changes
76+
echo "🟡 Step 5: Deploying Ingress Resource..."
6077
kubectl apply -f ingress.yaml
6178

6279
# Output Port-forward Instructions
@@ -73,4 +90,4 @@ echo "Then open:"
7390
echo "🔍 Jaeger: http://localhost:16686/jaeger"
7491
echo "📈 Prometheus: http://localhost:9090"
7592
echo "📊 Grafana: http://localhost:9091"
76-
echo "🚕 HotROD: http://localhost:8080"
93+
echo "🚕 HotROD: http://localhost:8080"

examples/oci/ui-config.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"tracking": {
3+
"gaID": "G-S88L6V684T",
4+
"trackErrors": true
5+
}
6+
}

0 commit comments

Comments
 (0)