-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Validate Jaeger demo configurations in CI workflow #7464
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
Changes from 58 commits
2bdfe28
95e1763
8c57e22
7c0c256
63c3ef8
2f3e4aa
223c4f5
98fd199
6132012
219bb40
8378ca8
ea579a7
b2ee5cd
8e5ca4c
c5e13cb
b045b54
174100b
f047d11
c0935d8
04d9dff
8bb31c7
a8b0a3f
da6a60a
a332851
bb792b1
6c5c6c6
5d966bf
f118fae
b4df1e1
a1632b2
fb28659
bd92135
44c7cfc
3784daa
04cd926
c721951
bfe5989
02754d8
996c6ba
d2bdc77
ecc7edc
a132218
692c330
9d48bc9
c2e53c3
88e7cc5
fdff655
ef37e17
59061d8
1f5315e
70d2926
8d15815
0b6c08e
a029072
b8c047f
5bcd4f6
1e5d02d
7c952d2
c3cd827
3dd24e3
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 |
|---|---|---|
| @@ -1,17 +1,69 @@ | ||
| # Hot R.O.D. - Rides on Demand on Kubernetes | ||
|
|
||
| Example k8s manifests for deploying the [hotrod app](..) to your k8s environment of choice. e.g. minikube, k3s, EKS, GKE | ||
| Example deployment for the [hotrod app](..) using Helm charts in your Kubernetes environment (Kind, minikube, k3s, EKS, GKE). | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Kubernetes cluster | ||
| - Helm 3.x installed | ||
| - kubectl configured | ||
|
|
||
| ## Usage | ||
|
|
||
| ### Deploy with Default Configuration | ||
|
|
||
| ```bash | ||
| kustomize build . | kubectl apply -f - | ||
| kubectl port-forward -n example-hotrod service/example-hotrod 8080:frontend | ||
| # In another terminal | ||
| kubectl port-forward -n example-hotrod service/jaeger 16686:frontend | ||
| cd examples/oci | ||
| ./deploy-all.sh clean | ||
| ``` | ||
|
|
||
| ### Deploy with Local Images (for development) | ||
|
|
||
| # To cleanup | ||
| kustomize build . | kubectl delete -f - | ||
| ```bash | ||
| # For Jaeger v2 with local images | ||
| cd examples/oci | ||
| ./deploy-all.sh local <image-tag> | ||
| ``` | ||
|
|
||
| Access Jaeger UI at <http://localhost:16686> and HotROD app at <http://localhost:8080> | ||
| ### Deploy Modes | ||
|
|
||
| - **`upgrade`** (default): Upgrade existing deployment or install if not present | ||
| - **`local`**: Deploy using local registry images (localhost:5000) | ||
| - **`clean`**: Clean install (removes existing deployment first) | ||
|
|
||
| ### Access Applications | ||
|
|
||
| After deployment completes, use port-forwarding: | ||
|
|
||
| ```bash | ||
| # Jaeger UI | ||
| kubectl port-forward svc/jaeger-query 16686:16686 | ||
|
|
||
| # HotROD application | ||
| kubectl port-forward svc/jaeger-hotrod 8080:80 | ||
|
|
||
| # Prometheus (optional) | ||
| kubectl port-forward svc/prometheus 9090:9090 | ||
|
|
||
| # Grafana (optional) | ||
| kubectl port-forward svc/prometheus-grafana 9091:80 | ||
| ``` | ||
|
|
||
| Then access: | ||
| - 🔍 **Jaeger UI**: http://localhost:16686/jaeger | ||
| - 🚕 **HotROD App**: http://localhost:8080 | ||
| - 📈 **Prometheus**: http://localhost:9090 | ||
| - 📊 **Grafana**: http://localhost:9091 | ||
|
|
||
| ## Configuration | ||
|
|
||
| The deployment uses: | ||
| - **Helm charts** from [jaeger-helm-charts](https://github.com/jaegertracing/helm-charts) | ||
| - **Prometheus** for metrics collection | ||
| - **Load generator** for creating sample traces | ||
|
|
||
| Configuration files: | ||
| - `jaeger-values.yaml` - Jaeger Helm chart values | ||
| - `config.yaml` - Jaeger configuration | ||
| - `ui-config.json` - Jaeger UI configuration | ||
| - `monitoring-values.yaml` - Prometheus configuration | ||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ | |
| set -euo pipefail | ||
|
|
||
| MODE="${1:-upgrade}" | ||
|
Member
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. add comments explaining valid values |
||
| IMAGE_TAG="${2:-latest}" | ||
|
|
||
| if [[ "$MODE" == "upgrade" ]]; then | ||
| HELM_JAEGER_CMD="upgrade --install --force" | ||
|
|
@@ -23,11 +24,15 @@ else | |
| HELM_PROM_CMD="install" | ||
| fi | ||
|
|
||
| # Clone Jaeger Helm Charts (v2 branch) if not already present | ||
| # Navigate to the script's directory (examples/oci) | ||
| cd $(dirname $0) | ||
|
|
||
| # Clone Jaeger Helm Charts 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 | ||
| echo "Using v2 branch for Jaeger v2..." | ||
| git checkout v2 | ||
yurishkuro marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| echo "Adding required Helm repositories..." | ||
| helm repo add bitnami https://charts.bitnami.com/bitnami | ||
|
|
@@ -40,25 +45,34 @@ 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 | ||
| # Set image repositories and deploy based on mode | ||
| if [[ "$MODE" == "local" ]]; then | ||
|
|
||
| echo "🟣 Deploying Jaeger..." | ||
| helm $HELM_JAEGER_CMD jaeger ./helm-charts/charts/jaeger \ | ||
| --set provisionDataStore.cassandra=false \ | ||
| --set allInOne.enabled=true \ | ||
| --set storage.type=memory \ | ||
| --set-file userconfig="./config.yaml" \ | ||
| --set-file uiconfig="./ui-config.json" \ | ||
| -f ./jaeger-values.yaml | ||
| echo "🟣 Deploying Jaeger with local registry images..." | ||
| helm $HELM_JAEGER_CMD jaeger ./helm-charts/charts/jaeger \ | ||
| --set provisionDataStore.cassandra=false \ | ||
| --set allInOne.enabled=true \ | ||
| --set storage.type=memory \ | ||
| --set hotrod.enabled=true \ | ||
| --set allInOne.image.repository="localhost:5000/jaegertracing/jaeger" \ | ||
| --set allInOne.image.tag="${IMAGE_TAG}" \ | ||
| --set allInOne.image.pullPolicy="Never" \ | ||
| --set hotrod.image.repository="localhost:5000/jaegertracing/example-hotrod" \ | ||
| --set hotrod.image.tag="${IMAGE_TAG}" \ | ||
| --set hotrod.image.pullPolicy="Never" \ | ||
| --set-file userconfig="./config.yaml" \ | ||
| --set-file uiconfig="./ui-config.json" \ | ||
| -f ./jaeger-values.yaml | ||
| else | ||
| echo "🟣 Deploying Jaeger..." | ||
| helm $HELM_JAEGER_CMD jaeger ./helm-charts/charts/jaeger \ | ||
| --set provisionDataStore.cassandra=false \ | ||
| --set allInOne.enabled=true \ | ||
| --set storage.type=memory \ | ||
| --set-file userconfig="./config.yaml" \ | ||
| --set-file uiconfig="./ui-config.json" \ | ||
| -f ./jaeger-values.yaml | ||
| fi | ||
|
|
||
| echo "🟢 Deploying Prometheus..." | ||
| kubectl apply -f prometheus-svc.yaml | ||
|
|
@@ -90,4 +104,8 @@ echo "Then open:" | |
| echo "🔍 Jaeger: http://localhost:16686/jaeger" | ||
| echo "📈 Prometheus: http://localhost:9090" | ||
| echo "📊 Grafana: http://localhost:9091" | ||
| echo "🚕 HotROD: http://localhost:8080" | ||
| echo "🚕 HotROD: http://localhost:8080" | ||
| echo "" | ||
| echo "📝 Note: If you made changes to Jaeger configuration files (e.g., config.yaml, ui-config.json), you may need to run this script in clean mode:" | ||
| echo " ./deploy-all.sh clean" | ||
| echo "Or manually restart the CI workflow to ensure your changes are applied." | ||
Uh oh!
There was an error while loading. Please reload this page.