Skip to content

Commit

Permalink
Merge remote-tracking branch 'schohn/KubernetesExperimentation' into …
Browse files Browse the repository at this point in the history
…HEAD
  • Loading branch information
lewijacn committed Oct 10, 2024
2 parents bee316d + 9c6f6f4 commit e33f89a
Show file tree
Hide file tree
Showing 46 changed files with 1,111 additions and 0 deletions.
Empty file.
39 changes: 39 additions & 0 deletions deployment/k8s/MigrationAssistant/migrationconsole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: migration-console
spec:
replicas: 1
selector:
matchLabels:
app: migration-console
template:
metadata:
labels:
app: migration-console
spec:
containers:
- name: migration-console
image: 'migrations/migration_console:latest'
env:
- name: MIGRATION_KAFKA_BROKER_ENDPOINTS
value: "kafka:9092"
- name: AWS_PROFILE
value: "default"
volumeMounts:
- name: shared-replayer-output
mountPath: /shared-replayer-output
- name: aws-config
mountPath: /root/.aws
- name: services-config
mountPath: /etc/migration_services.yaml
volumes:
- name: shared-replayer-output
persistentVolumeClaim:
claimName: shared-console-pvc
- name: aws-config
hostPath:
path: /home/user/.aws
- name: services-config
hostPath:
path: /path/to/local/migrationConsole/lib/console_link/services.yaml
25 changes: 25 additions & 0 deletions deployment/k8s/MigrationAssistant/replayer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: replayer
spec:
replicas: 1
selector:
matchLabels:
app: replayer
template:
metadata:
labels:
app: replayer
spec:
containers:
- name: replayer
image: 'migrations/traffic_replayer:latest'
command: ["/bin/sh", "-c", "/runJavaWithClasspath.sh org.opensearch.migrations.replay.TrafficReplayer --speedup-factor 2 https://opensearchtarget:9200 --auth-header-value Basic\\ YWRtaW46bXlTdHJvbmdQYXNzd29yZDEyMyE= --insecure --kafka-traffic-brokers kafka:9092 --kafka-traffic-topic logging-traffic-topic --kafka-traffic-group-id logging-group-default --otelCollectorEndpoint http://otel-collector:4317"]
volumeMounts:
- name: shared-replayer-output
mountPath: /shared-replayer-output
volumes:
- name: shared-replayer-output
persistentVolumeClaim:
claimName: replayer-pvc
38 changes: 38 additions & 0 deletions deployment/k8s/MockCustomerClusters/captureproxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: capture-proxy
spec:
replicas: 1
selector:
matchLabels:
app: capture-proxy
template:
metadata:
labels:
app: capture-proxy
env: v1
spec:
containers:
- name: captureproxy
image: migrations/capture_proxy:latest
imagePullPolicy: IfNotPresent
# command: ["/bin/sh", "-c", "tail -f /dev/null"]
# command: ["/bin/sh", "-c", "'/runJavaWithClasspath.sh org.opensearch.migrations.trafficcapture.proxyserver.CaptureProxy --kafkaConnection kafka:9092 --destinationUri https://elasticsearch:9200 --insecureDestination --listenPort 9200 --sslConfigFile /usr/share/elasticsearch/config/proxy_tls.yml --otelCollectorEndpoint http://otel-collector:4317'"]
command: ["/bin/sh", "-c", "/runJavaWithClasspath.sh org.opensearch.migrations.trafficcapture.proxyserver.CaptureProxy --noCapture --destinationUri https://elasticsearch:9200 --insecureDestination --listenPort 9200 --sslConfigFile /usr/share/elasticsearch/config/proxy_tls.yml --otelCollectorEndpoint http://otel-collector:4317"]
ports:
- containerPort: 9200
---
apiVersion: v1
kind: Service
metadata:
name: capture-proxy
spec:
selector:
app: capture-proxy
env: v1
ports:
- protocol: TCP
port: 9200
targetPort: 9200
type: ClusterIP
35 changes: 35 additions & 0 deletions deployment/k8s/MockCustomerClusters/elasticsearch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: elasticsearch
spec:
replicas: 1
selector:
matchLabels:
app: elasticsearch-source
template:
metadata:
labels:
app: elasticsearch-source
env: v1
spec:
containers:
- name: elasticsearch
image: migrations/elasticsearch_searchguard:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9200
---
apiVersion: v1
kind: Service
metadata:
name: elasticsearch
spec:
selector:
app: elasticsearch-source
env: v1
ports:
- protocol: TCP
port: 9200
targetPort: 9200
type: ClusterIP
40 changes: 40 additions & 0 deletions deployment/k8s/MockCustomerClusters/opensearch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: opensearch
spec:
replicas: 1
selector:
matchLabels:
app: opensearch-target
template:
metadata:
labels:
app: opensearch-target
env: v1
spec:
containers:
- name: opensearch
image: opensearchproject/opensearch:2.15.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9200
env:
- name: discovery.type
value: single-node
- name: OPENSEARCH_INITIAL_ADMIN_PASSWORD
value: myStrongPassword123!
---
apiVersion: v1
kind: Service
metadata:
name: opensearch
spec:
selector:
app: opensearch-target
env: v1
ports:
- protocol: TCP
port: 9200
targetPort: 9200
type: ClusterIP
50 changes: 50 additions & 0 deletions deployment/k8s/Observability/grafana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-config
data:
GF_SECURITY_ADMIN_PASSWORD: admin

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana
spec:
replicas: 1
selector:
matchLabels:
app: grafana
template:
metadata:
labels:
app: grafana
spec:
containers:
- name: grafana
image: 'migrations/grafana:latest'
ports:
- containerPort: 3000
envFrom:
- configMapRef:
name: grafana-config
volumeMounts:
- name: grafana-data
mountPath: /var/lib/grafana
volumes:
- name: grafana-data
persistentVolumeClaim:
claimName: grafana-pvc

---
apiVersion: v1
kind: Service
metadata:
name: grafana
spec:
type: ClusterIP
ports:
- port: 3000
targetPort: 3000
selector:
app: grafana
44 changes: 44 additions & 0 deletions deployment/k8s/Observability/jaeger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: jaeger
spec:
replicas: 1
selector:
matchLabels:
app: jaeger
template:
metadata:
labels:
app: jaeger
spec:
containers:
- name: jaeger
image: jaegertracing/all-in-one:1.58.1
ports:
- containerPort: 16686
- containerPort: 4317
- containerPort: 4318
env:
- name: COLLECTOR_OTLP_ENABLED
value: "true"

---
apiVersion: v1
kind: Service
metadata:
name: jaeger
spec:
type: ClusterIP
ports:
- name: ui
port: 16686
targetPort: 16686
- name: grpc
port: 4317
targetPort: 4317
- name: http
port: 4318
targetPort: 4318
selector:
app: jaeger
51 changes: 51 additions & 0 deletions deployment/k8s/Observability/prometheus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: prometheus-config
data:
# prometheus.yml: |-
# # Contents of prometheus.yaml

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: prometheus
spec:
replicas: 1
selector:
matchLabels:
app: prometheus
template:
metadata:
labels:
app: prometheus
spec:
containers:
- name: prometheus
image: prom/prometheus:v2.53.0
ports:
- containerPort: 9090
volumeMounts:
- name: config-volume
mountPath: /etc/prometheus
args:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--enable-feature=exemplar-storage"
volumes:
- name: config-volume
configMap:
name: prometheus-config

---
apiVersion: v1
kind: Service
metadata:
name: prometheus
spec:
type: ClusterIP
ports:
- port: 9090
targetPort: 9090
selector:
app: prometheus
2 changes: 2 additions & 0 deletions deployment/k8s/charts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*/charts/**/*tgz
*/Chart.lock
3 changes: 3 additions & 0 deletions deployment/k8s/charts/captureProxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
apiVersion: v2
name: capture-proxy
version: 0.1.0
36 changes: 36 additions & 0 deletions deployment/k8s/charts/captureProxy/templates/proxyService.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: capture-proxy
spec:
replicas: 1
selector:
matchLabels:
app: capture-proxy
template:
metadata:
labels:
app: capture-proxy
env: v1
spec:
containers:
- name: captureproxy
image: migrations/capture_proxy:latest
imagePullPolicy: IfNotPresent
command: ["/bin/sh", "-c", "/runJavaWithClasspath.sh org.opensearch.migrations.trafficcapture.proxyserver.CaptureProxy --noCapture --destinationUri {{ .Values.destinationUrl }} --insecureDestination --listenPort 9200 --sslConfigFile /usr/share/elasticsearch/config/proxy_tls.yml --otelCollectorEndpoint http://otel-collector:4317"]
ports:
- containerPort: 9200
---
apiVersion: v1
kind: Service
metadata:
name: capture-proxy
spec:
selector:
app: capture-proxy
env: v1
ports:
- protocol: TCP
port: 9200
targetPort: 9200
type: ClusterIP
1 change: 1 addition & 0 deletions deployment/k8s/charts/captureProxy/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
destinationUrl: "https://elasticsearch:9200"
Loading

0 comments on commit e33f89a

Please sign in to comment.