forked from open-telemetry/opentelemetry-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dash0] scripts for deploying the otel demo to k8s locally
Either deploy to one namespace or to two different namespaces (just to make the deployment topology a bit more "interesting").
- Loading branch information
Showing
13 changed files
with
243 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dash0-values.yaml | ||
ns1-values.yaml | ||
ns2-values.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Helper Scripts to Deploy the Dash0 fork of the OpenTelemetry Demo to Kubernetes Locally | ||
======================================================================================= | ||
|
||
See <https://docs.google.com/document/d/1ASCn8AUR0ehqSynsUkTqvH2biTYsFAxz1rXi1Lkh3DE/edit#heading=h.sku3rt6c70ac>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: opentelemetry-demo-in-ns2-emailservice | ||
namespace: otel-demo-ns1 | ||
spec: | ||
type: ExternalName | ||
externalName: opentelemetry-demo-ns2-emailservice.otel-demo-ns2.svc.cluster.local | ||
ports: | ||
- port: 8080 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: opentelemetry-demo-in-ns2-paymentservice | ||
namespace: otel-demo-ns1 | ||
spec: | ||
type: ExternalName | ||
externalName: opentelemetry-demo-ns2-paymentservice.otel-demo-ns2.svc.cluster.local | ||
ports: | ||
- port: 8080 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: opentelemetry-demo-in-ns2-shippingservice | ||
namespace: otel-demo-ns1 | ||
spec: | ||
type: ExternalName | ||
externalName: opentelemetry-demo-ns2-shippingservice.otel-demo-ns2.svc.cluster.local | ||
ports: | ||
- port: 8080 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: opentelemetry-demo-in-ns1-featureflagservice | ||
namespace: otel-demo-ns2 | ||
spec: | ||
type: ExternalName | ||
externalName: opentelemetry-demo-ns1-featureflagservice.otel-demo-ns1.svc.cluster.local | ||
ports: | ||
- name: grpc | ||
port: 50053 | ||
- name: http | ||
port: 8081 | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: opentelemetry-demo-in-ns1-quoteservice | ||
namespace: otel-demo-ns2 | ||
spec: | ||
type: ExternalName | ||
externalName: opentelemetry-demo-ns1-quoteservice.otel-demo-ns1.svc.cluster.local | ||
ports: | ||
- port: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.otelDemo.helm | | ||
.default.image.pullSecrets=[{"name": "regcred"}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
cd -P -- "$(dirname -- "$0")" | ||
|
||
./teardown.sh | ||
|
||
sleep 5 | ||
|
||
yq --from-file ns1.yq ../../../dash0-configuration/demo/environments/aws/demo-eu-west-1-demo.yaml > ns1-values.yaml | ||
yq --from-file ns2.yq ../../../dash0-configuration/demo/environments/aws/demo-eu-west-1-demo.yaml > ns2-values.yaml | ||
|
||
helm install --namespace otel-demo-ns1 --create-namespace opentelemetry-demo-postgresql oci://registry-1.docker.io/bitnamicharts/postgresql --values postgres-values.yaml | ||
helm install --namespace otel-demo-ns1 --create-namespace opentelemetry-demo-ns1 open-telemetry/opentelemetry-demo --values ns1-values.yaml | ||
helm install --namespace otel-demo-ns2 --create-namespace opentelemetry-demo-ns2 open-telemetry/opentelemetry-demo --values ns2-values.yaml | ||
kubectl apply -f cross-namespace-service-names.yaml | ||
kubectl apply --namespace otel-demo-ns1 -f postgres-service-two-namespaces.yaml | ||
|
||
kubectl cp ../../src/ffspostgres/init-scripts/10-ffs_schema.sql --namespace otel-demo-ns1 opentelemetry-demo-postgresql-0:/tmp/ | ||
kubectl cp ../../src/ffspostgres/init-scripts/20-ffs_data.sql --namespace otel-demo-ns1 opentelemetry-demo-postgresql-0:/tmp/ | ||
kubectl exec --namespace otel-demo-ns1 opentelemetry-demo-postgresql-0 -- psql postgresql://ffs:ffs@localhost/ffs -a -f /tmp/10-ffs_schema.sql | ||
kubectl exec --namespace otel-demo-ns1 opentelemetry-demo-postgresql-0 -- psql postgresql://ffs:ffs@localhost/ffs -a -f /tmp/20-ffs_data.sql | ||
|
||
kubectl port-forward --namespace otel-demo-ns1 service/opentelemetry-demo-ns1-frontendproxy 8080:8080 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
cd -P -- "$(dirname -- "$0")" | ||
|
||
./teardown.sh | ||
|
||
sleep 5 | ||
|
||
yq --from-file dash0-one-ns.yq ../../../dash0-configuration/demo/environments/aws/demo-eu-west-1-demo.yaml > dash0-values.yaml | ||
|
||
helm install --namespace otel-demo-ns --create-namespace opentelemetry-demo-postgresql oci://registry-1.docker.io/bitnamicharts/postgresql --values postgres-values.yaml | ||
helm install \ | ||
--namespace otel-demo-ns \ | ||
--create-namespace \ | ||
opentelemetry-demo \ | ||
open-telemetry/opentelemetry-demo \ | ||
--values dash0-values.yaml | ||
kubectl apply --namespace otel-demo-ns -f postgres-service.yaml | ||
|
||
kubectl cp ../../src/ffspostgres/init-scripts/10-ffs_schema.sql --namespace otel-demo-ns opentelemetry-demo-postgresql-0:/tmp/ | ||
kubectl cp ../../src/ffspostgres/init-scripts/20-ffs_data.sql --namespace otel-demo-ns opentelemetry-demo-postgresql-0:/tmp/ | ||
kubectl exec --namespace otel-demo-ns opentelemetry-demo-postgresql-0 -- psql postgresql://ffs:ffs@localhost/ffs -a -f /tmp/10-ffs_schema.sql | ||
kubectl exec --namespace otel-demo-ns opentelemetry-demo-postgresql-0 -- psql postgresql://ffs:ffs@localhost/ffs -a -f /tmp/20-ffs_data.sql | ||
|
||
kubectl port-forward --namespace otel-demo-ns service/opentelemetry-demo-frontendproxy 8080:8080 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.otelDemo.helm | | ||
.default.image.pullSecrets=[{"name": "regcred"}] | | ||
del(.default.envOverrides) | | ||
.components.ffsPostgres.enabled=false | | ||
.components.accountingService.enabled=true | | ||
.components.adService.enabled=true | | ||
.components.cartService.enabled=true | | ||
.components.checkoutService.enabled=true | | ||
.components.currencyService.enabled=true | | ||
.components.emailService.enabled=true | | ||
.components.cartService.enabled=true | | ||
.components.checkoutService.enabled=true | | ||
.components.checkoutService.envOverrides=[ | ||
{ "name": "FEATURE_FLAG_GRPC_SERVICE_ADDR", "value": "opentelemetry-demo-featureflagservice:50053" }, { "name": "EMAIL_SERVICE_ADDR", "value": "http://opentelemetry-demo-in-ns2-emailservice:8080" }, { "name": "PAYMENT_SERVICE_ADDR", "value": "opentelemetry-demo-in-ns2-paymentservice:8080" }, {"name": "SHIPPING_SERVICE_ADDR", "value": "opentelemetry-demo-in-ns2-shippingservice:8080" } ] | | ||
.components.currencyService.enabled=true | | ||
.components.emailService.enabled=false | | ||
.components.featureflagService.enabled=true | | ||
.components.frauddetectionService.enabled=true | | ||
.components.frontend.enabled=true | | ||
.components.frontend.envOverrides=[{ "name": "SHIPPING_SERVICE_ADDR", "value": "opentelemetry-demo-in-ns2-shippingservice:8080" } ] | | ||
.components.frontendProxy.enabled=true | | ||
.components.kafka.enabled=true | | ||
.components.loadgenerator.enabled=true | | ||
.components.paymentService.enabled=false | | ||
.components.productCatalogService.enabled=true | | ||
.components.quoteService.enabled=true | | ||
.components.recommendationService.enabled=true | | ||
.components.redis.enabled=true | | ||
.components.shippingService.enabled=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.otelDemo.helm | | ||
del(.prometheus) | | ||
.default.image.pullSecrets=[{"name": "regcred"}] | | ||
del(.default.envOverrides) | | ||
.components.ffsPostgres.enabled=false | | ||
.components.accountingService.enabled=false | | ||
.components.adService.enabled=false | | ||
.components.cartService.enabled=false | | ||
.components.checkoutService.enabled=false | | ||
.components.currencyService.enabled=false | | ||
.components.emailService.enabled=false | | ||
.components.cartService.enabled=false | | ||
.components.checkoutService.enabled=false | | ||
.components.currencyService.enabled=false | | ||
.components.emailService.enabled=true | | ||
.components.featureflagService.enabled=false | | ||
.components.frauddetectionService.enabled=false | | ||
.components.frontend.enabled=false | | ||
.components.frontendProxy.enabled=false | | ||
.components.kafka.enabled=false | | ||
.components.loadgenerator.enabled=false | | ||
.components.paymentService.enabled=true | | ||
.components.paymentService.envOverrides=[{ "name": "FEATURE_FLAG_GRPC_SERVICE_ADDR", "value": "opentelemetry-demo-in-ns1-featureflagservice:50053" } ] | | ||
.components.productCatalogService.enabled=false | | ||
.components.quoteService.enabled=false | | ||
.components.recommendationService.enabled=false | | ||
.components.redis.enabled=false | | ||
.components.shippingService.enabled=true | | ||
.components.shippingService.envOverrides=[{ "name": "FEATURE_FLAG_GRPC_SERVICE_ADDR", "value": "opentelemetry-demo-in-ns1-featureflagservice:50053" }, { "name": "QUOTE_SERVICE_ADDR", "value": "http://opentelemetry-demo-in-ns1-quoteservice:8080" }] | | ||
del(.grafana) | | ||
.jaeger.enabled=false | | ||
.prometheus.enabled=false | | ||
.grafana.enabled=false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: opentelemetry-demo-ns1-ffspostgres | ||
spec: | ||
ports: | ||
- name: tcp-postgresql | ||
port: 5432 | ||
protocol: TCP | ||
targetPort: tcp-postgresql | ||
selector: | ||
app.kubernetes.io/component: primary | ||
app.kubernetes.io/instance: opentelemetry-demo-postgresql | ||
app.kubernetes.io/name: postgresql | ||
type: ClusterIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: opentelemetry-demo-ffspostgres | ||
spec: | ||
ports: | ||
- name: tcp-postgresql | ||
port: 5432 | ||
protocol: TCP | ||
targetPort: tcp-postgresql | ||
selector: | ||
app.kubernetes.io/component: primary | ||
app.kubernetes.io/instance: opentelemetry-demo-postgresql | ||
app.kubernetes.io/name: postgresql | ||
type: ClusterIP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
global: | ||
postgresql: | ||
auth: | ||
username: "ffs" | ||
password: "ffs" | ||
database: "ffs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
cd -P -- "$(dirname -- "$0")" | ||
|
||
pwd | ||
|
||
# tear down things installed by deploy.sh | ||
helm uninstall --namespace otel-demo-ns --ignore-not-found opentelemetry-demo-postgresql | ||
helm uninstall --namespace otel-demo-ns --ignore-not-found opentelemetry-demo | ||
kubectl delete --namespace otel-demo-ns --ignore-not-found -f postgres-service.yaml | ||
kubectl delete --namespace otel-demo-ns --ignore-not-found -f postgres-service-two-namespaces.yaml | ||
|
||
# tear down things installed by deploy-two-namespaces.sh | ||
helm uninstall --namespace otel-demo-ns1 --ignore-not-found opentelemetry-demo-ns1 | ||
helm uninstall --namespace otel-demo-ns2 --ignore-not-found opentelemetry-demo-ns2 | ||
helm uninstall --namespace otel-demo-ns1 --ignore-not-found opentelemetry-demo-postgresql | ||
kubectl delete --namespace otel-demo-ns1 --ignore-not-found -f postgres-service.yaml | ||
kubectl delete --ignore-not-found -f cross-namespace-service-names.yaml | ||
|