Skip to content

Commit

Permalink
19 deploy otel collector in platform chart (#21)
Browse files Browse the repository at this point in the history
* Updated bootstrap config

* Updated cluster otel chart values

* updated platform chart

* override otel export endpoint

* added jaeger simplest yaml

* added jaeger operator, ingress

* Updated jaeger exporter link in otel

* updated otel exporter name

* Updated jaeger def

* minor change

* permission changed

* fixed requirement script

* updated requirements file

* updated ap chart

* updated scripts

* Fix: bootstrap-config.yaml with Anchors

---------

Co-authored-by: Rajesh Dutta <[email protected]>
  • Loading branch information
rkdutta and Rajesh Dutta authored Mar 15, 2023
1 parent 05be16c commit 8d13038
Show file tree
Hide file tree
Showing 571 changed files with 55,762 additions and 42 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ gremlin/
*.bak
values-*.yaml
.dump/
opentelemetry-demo
opentelemetry/
nohup.out
istio-*/
Expand Down
12 changes: 9 additions & 3 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ CLUSTER_NAME=${3:-"sre-playground"}

KIND_CONFIG_FILE=`mktemp`
OVERRIDE_CONFIG_FILE=`mktemp`
PLAYGROUND_CONFIG_FILE=`mktemp`

CPU_ARCH="$(uname -m)"
PLAYGROUND_CONFIG_FILE="kind/bootstrap-config.yaml"
PLAYGROUND_CONFIG_FILE_URI="kind/bootstrap-config.yaml"

# reading the raw bootstrap config file and resolve the aliases
yq 'explode(.)' $PLAYGROUND_CONFIG_FILE_URI > $PLAYGROUND_CONFIG_FILE

# reading kind cluster common configuration
yq .common-config.$CPU_ARCH $PLAYGROUND_CONFIG_FILE > $KIND_CONFIG_FILE
Expand Down Expand Up @@ -64,7 +69,8 @@ echo "`date` >>>>> METALLB_IP_RANGE:$METALLB_IP_RANGE"

# install cluster
yq .override-config.$KUBEPROXY_OPTS.$CNI.cni-patch $PLAYGROUND_CONFIG_FILE > $OVERRIDE_CONFIG_FILE
echo "`date` >>>>> OVERRIDE_CONFIG_FILE:$OVERRIDE_CONFIG_FILE"

#install the cluster
helm dependency update sreplayground-cluster
helm upgrade --install sreplayground-cluster sreplayground-cluster \
--dependency-update \
Expand All @@ -87,7 +93,7 @@ helm upgrade --install sreplayground-platform sreplayground-platform \
--create-namespace \
--dependency-update \
--wait


# install app
kubectl create namespace app --dry-run=client -o yaml | kubectl apply -f -
Expand Down
18 changes: 3 additions & 15 deletions kind/bootstrap-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
common-config:
arm64:
common: &common
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: kindest/node:v1.26.0
extraPortMappings:
- containerPort: 80
hostPort: 80
protocol: TCP
listenAddress: "127.0.0.1"
- containerPort: 443
hostPort: 443
protocol: TCP
listenAddress: "127.0.0.1"
extraMounts:
- hostPath: kind/tracing
containerPath: /etc/kubernetes/tracing
Expand All @@ -24,10 +15,6 @@ common-config:
apiVersion: kubeadm.k8s.io/v1beta3
kind: ClusterConfiguration
apiServer:
apiServer:
dns:
servers:
- 10.96.0.10
extraArgs:
tracing-config-file: /etc/kubernetes/tracing/kube-apiserver-tracing-config.yaml
extraVolumes:
Expand Down Expand Up @@ -78,7 +65,8 @@ common-config:
featureGates:
APIServerTracing: true
KubeletTracing: true

x86_64: *common
arm64: *common
override-config:
with-kubeproxy:
kindnet:
Expand Down
8 changes: 5 additions & 3 deletions requirements.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -eo pipefail


# install netcat, apache,git and kubectl
sudo apt update && sudo apt install -y netcat apache2 kubectl git yq
sudo apt update && sudo apt install -y netcat apache2 kubectl git

# install helm
curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null
Expand All @@ -13,8 +13,8 @@ sudo apt-get update
sudo apt-get install helm

# install kind
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.17.0/kind-linux-amd64
chmod +x ./kind
sudo curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.17.0/kind-linux-amd64
sudo chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind


Expand All @@ -24,6 +24,8 @@ sudo mv ./kind /usr/local/bin/kind
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
sudo apt-get install build-essential

sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
sudo chmod a+x /usr/local/bin/yq

# install docker

Expand Down
23 changes: 23 additions & 0 deletions sreplayground-app/charts/opentelemetry-demo/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
15 changes: 15 additions & 0 deletions sreplayground-app/charts/opentelemetry-demo/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
dependencies:
- name: opentelemetry-collector
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
version: 0.49.1
- name: jaeger
repository: https://jaegertracing.github.io/helm-charts
version: 0.67.6
- name: prometheus
repository: https://prometheus-community.github.io/helm-charts
version: 19.7.2
- name: grafana
repository: https://grafana.github.io/helm-charts
version: 6.51.2
digest: sha256:70149fdf53acfc2b727edc8017e5908aa14854231c02a4f8ea1a9b4d2445511b
generated: "2023-03-01T21:49:19.776835-05:00"
31 changes: 31 additions & 0 deletions sreplayground-app/charts/opentelemetry-demo/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: v2
appVersion: 1.3.1
dependencies:
- condition: observability.otelcol.enabled
name: opentelemetry-collector
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
version: 0.49.1
- condition: observability.jaeger.enabled
name: jaeger
repository: https://jaegertracing.github.io/helm-charts
version: 0.67.6
- condition: observability.prometheus.enabled
name: prometheus
repository: https://prometheus-community.github.io/helm-charts
version: 19.7.2
- condition: observability.grafana.enabled
name: grafana
repository: https://grafana.github.io/helm-charts
version: 6.51.2
description: opentelemetry demo helm chart
home: https://opentelemetry.io/
icon: https://opentelemetry.io/img/logos/opentelemetry-logo-nav.png
maintainers:
- name: dmitryax
- name: puckpuck
- name: tylerhelmuth
name: opentelemetry-demo
sources:
- https://github.com/open-telemetry/opentelemetry-demo
type: application
version: 0.19.6
Loading

0 comments on commit 8d13038

Please sign in to comment.