forked from BaseAdresseNationale/addok-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-216-dual.sh
More file actions
executable file
Β·43 lines (35 loc) Β· 1.74 KB
/
deploy-216-dual.sh
File metadata and controls
executable file
Β·43 lines (35 loc) Β· 1.74 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
#!/bin/bash
# Deploy Addok 2.1.6-dual to Kubernetes
set -euo pipefail
NAMESPACE="addok-ban"
DEPLOYMENT="addok-ban"
NEW_IMAGE="registry.gitlab.com/atafaya971/packsol/addok-ban:2.1.6-dual"
echo "π Deploying Addok 2.1.6-dual with dual observability to Kubernetes..."
# Update the deployment image
kubectl set image deployment/${DEPLOYMENT} addok-ban=${NEW_IMAGE} -n ${NAMESPACE}
# Wait for rollout to complete
echo "β³ Waiting for rollout to complete..."
kubectl rollout status deployment/${DEPLOYMENT} -n ${NAMESPACE} --timeout=300s
# Verify deployment
echo "β
Verifying deployment..."
kubectl get pods -n ${NAMESPACE} -l app=${DEPLOYMENT}
# Check observability configuration
echo "π Checking observability configuration..."
echo "OpenTelemetry endpoint:"
kubectl get deployment ${DEPLOYMENT} -n ${NAMESPACE} -o jsonpath='{.spec.template.spec.containers[0].env[?(@.name=="OTEL_EXPORTER_OTLP_ENDPOINT")].value}'
echo ""
echo "Datadog configuration:"
kubectl get deployment ${DEPLOYMENT} -n ${NAMESPACE} -o jsonpath='{.spec.template.spec.containers[0].env[?(@.name=="DD_AGENT_HOST")].value}'
echo ""
echo ""
echo "π Dual observability deployment completed successfully!"
echo ""
echo "π Monitor OpenTelemetry traces at: http://grafana/explore (Tempo)"
echo "π Monitor OpenTelemetry metrics at: http://grafana/dashboard"
echo "πΆ Monitor Datadog traces at: https://app.datadoghq.com/apm/services"
echo "π Monitor Datadog metrics at: https://app.datadoghq.com/infrastructure"
echo "π Check logs: kubectl logs -f deployment/${DEPLOYMENT} -n ${NAMESPACE}"
echo ""
echo "π§ Validate dual stack:"
echo " curl http://addok-ban/search?q=paris (should generate traces in both systems)"
echo " curl http://addok-ban/metrics (should show Prometheus metrics)"