From 209375abf70e74e0dc79f278c91c83e2c6951a3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Vonheiden?= <bjoern.vonheiden@hotmail.de>
Date: Mon, 8 Jun 2020 16:01:31 +0200
Subject: [PATCH] Structure use case infrastructe better with kustomize

Reorder the structure of the use cases to use a base and customize
this accordingly to their needs.
---
 execution/run_uc1-new.sh                      | 16 +++---
 execution/run_uc2-new.sh                      | 13 ++---
 execution/run_uc3-new.sh                      | 12 ++--
 execution/run_uc4-new.sh                      | 12 ++--
 .../base}/aggregation-deployment.yaml         |  4 +-
 .../base}/aggregation-service.yaml            |  0
 .../base}/jmx-configmap.yaml                  |  0
 .../base}/kustomization.yaml                  |  3 -
 .../base}/service-monitor.yaml                |  0
 .../uc1-application/kustomization.yaml        | 15 +++++
 .../uc1-application}/set_paramters.yaml       |  4 +-
 .../uc2-application/kustomization.yaml        | 15 +++++
 .../uc2-application}/set_paramters.yaml       |  4 +-
 .../uc3-application/kustomization.yaml        | 15 +++++
 .../uc3-application/set_paramters.yaml        |  2 +-
 .../uc4-application/kustomization.yaml        | 15 +++++
 .../uc4-application/set_paramters.yaml        |  4 +-
 execution/uc1-application/kustomization.yaml  | 15 -----
 .../aggregation-deployment.yaml               | 53 -----------------
 .../uc2-application/aggregation-service.yaml  | 17 ------
 execution/uc2-application/jmx-configmap.yaml  | 10 ----
 .../uc2-application/service-monitor.yaml      | 14 -----
 .../aggregation-deployment.yaml               | 55 ------------------
 .../uc3-application/aggregation-service.yaml  | 17 ------
 execution/uc3-application/jmx-configmap.yaml  | 10 ----
 execution/uc3-application/kustomization.yaml  | 15 -----
 .../uc3-application/service-monitor.yaml      | 14 -----
 .../aggregation-deployment.yaml               | 57 -------------------
 .../uc4-application/aggregation-service.yaml  | 17 ------
 execution/uc4-application/jmx-configmap.yaml  | 10 ----
 execution/uc4-application/kustomization.yaml  | 15 -----
 .../uc4-application/service-monitor.yaml      | 14 -----
 32 files changed, 95 insertions(+), 372 deletions(-)
 rename execution/{uc1-application => uc-application/base}/aggregation-deployment.yaml (95%)
 rename execution/{uc1-application => uc-application/base}/aggregation-service.yaml (100%)
 rename execution/{uc1-application => uc-application/base}/jmx-configmap.yaml (100%)
 rename execution/{uc2-application => uc-application/base}/kustomization.yaml (76%)
 rename execution/{uc1-application => uc-application/base}/service-monitor.yaml (100%)
 create mode 100644 execution/uc-application/overlay/uc1-application/kustomization.yaml
 rename execution/{uc2-application => uc-application/overlay/uc1-application}/set_paramters.yaml (83%)
 create mode 100644 execution/uc-application/overlay/uc2-application/kustomization.yaml
 rename execution/{uc1-application => uc-application/overlay/uc2-application}/set_paramters.yaml (83%)
 create mode 100644 execution/uc-application/overlay/uc3-application/kustomization.yaml
 rename execution/{ => uc-application/overlay}/uc3-application/set_paramters.yaml (90%)
 create mode 100644 execution/uc-application/overlay/uc4-application/kustomization.yaml
 rename execution/{ => uc-application/overlay}/uc4-application/set_paramters.yaml (83%)
 delete mode 100644 execution/uc1-application/kustomization.yaml
 delete mode 100644 execution/uc2-application/aggregation-deployment.yaml
 delete mode 100644 execution/uc2-application/aggregation-service.yaml
 delete mode 100644 execution/uc2-application/jmx-configmap.yaml
 delete mode 100644 execution/uc2-application/service-monitor.yaml
 delete mode 100644 execution/uc3-application/aggregation-deployment.yaml
 delete mode 100644 execution/uc3-application/aggregation-service.yaml
 delete mode 100644 execution/uc3-application/jmx-configmap.yaml
 delete mode 100644 execution/uc3-application/kustomization.yaml
 delete mode 100644 execution/uc3-application/service-monitor.yaml
 delete mode 100644 execution/uc4-application/aggregation-deployment.yaml
 delete mode 100644 execution/uc4-application/aggregation-service.yaml
 delete mode 100644 execution/uc4-application/jmx-configmap.yaml
 delete mode 100644 execution/uc4-application/kustomization.yaml
 delete mode 100644 execution/uc4-application/service-monitor.yaml

diff --git a/execution/run_uc1-new.sh b/execution/run_uc1-new.sh
index 83e540bc4..ee981554d 100755
--- a/execution/run_uc1-new.sh
+++ b/execution/run_uc1-new.sh
@@ -42,15 +42,15 @@ spec:
       - name: workload-generator
         env:
         - name: NUM_SENSORS
-          value: $NUM_SENSORS
+          value: "$NUM_SENSORS"
         - name: INSTANCES
-          value: $WL_INSTANCES
+          value: "$WL_INSTANCES"
 EOF
 kubectl apply -k uc1-workload-generator
 
 # Start application
 REPLICAS=$INSTANCES
-cat <<EOF >uc1-application/set_paramters.yaml
+cat <<EOF >uc-application/overlay/uc1-application/set_paramters.yaml
 apiVersion: apps/v1
 kind: Deployment
 metadata:
@@ -59,17 +59,17 @@ spec:
   template:
     spec:
       containers:
-      - name: uc1-application
+      - name: uc-application
         env:
         - name: COMMIT_INTERVAL_MS
-          value: $KAFKA_STREAMS_COMMIT_INTERVAL_MS
+          value: "$KAFKA_STREAMS_COMMIT_INTERVAL_MS"
         resources:
           limits:
             memory: $MEMORY_LIMIT
             cpu: $CPU_LIMIT
 EOF
-kubectl apply -k uc1-application
-kubectl scale deployment titan-ccp-aggregation --replicas=$REPLICAS
+kubectl apply -k uc-application/overlay/uc1-application
+kubectl scale deployment uc1-titan-ccp-aggregation --replicas=$REPLICAS
 
 # Execute for certain time
 sleep ${EXECUTION_MINUTES}m
@@ -81,7 +81,7 @@ deactivate
 
 # Stop workload generator and app
 kubectl delete -k uc1-workload-generator
-kubectl delete -k uc1-application
+kubectl delete -k uc-application/overlay/uc1-application
 
 
 # Delete topics instead of Kafka
diff --git a/execution/run_uc2-new.sh b/execution/run_uc2-new.sh
index 42ce812b8..06dca8f32 100755
--- a/execution/run_uc2-new.sh
+++ b/execution/run_uc2-new.sh
@@ -45,8 +45,7 @@ kubectl apply -k uc2-workload-generator
 
 # Start application
 REPLICAS=$INSTANCES
-# When not using `sed` anymore, use `kubectl apply -f uc2-application`
-cat <<EOF >uc2-application/set_paramters.yaml
+cat <<EOF >uc-application/overlay/uc1-application/set_paramters.yaml
 apiVersion: apps/v1
 kind: Deployment
 metadata:
@@ -55,17 +54,17 @@ spec:
   template:
     spec:
       containers:
-      - name: uc1-application
+      - name: uc-application
         env:
         - name: COMMIT_INTERVAL_MS
-          value: $KAFKA_STREAMS_COMMIT_INTERVAL_MS
+          value: "$KAFKA_STREAMS_COMMIT_INTERVAL_MS"
         resources:
           limits:
             memory: $MEMORY_LIMIT
             cpu: $CPU_LIMIT
 EOF
-kubectl apply -k uc2-application
-kubectl scale deployment titan-ccp-aggregation --replicas=$REPLICAS
+kubectl apply -k uc-application/overlay/uc2-application
+kubectl scale deployment uc2-titan-ccp-aggregation --replicas=$REPLICAS
 
 # Execute for certain time
 sleep ${EXECUTION_MINUTES}m
@@ -77,7 +76,7 @@ deactivate
 
 # Stop workload generator and app
 kubectl delete -k uc2-workload-generator
-kubectl delete -k uc2-application
+kubectl delete -k uc-application/overlay/uc2-application
 
 
 # Delete topics instead of Kafka
diff --git a/execution/run_uc3-new.sh b/execution/run_uc3-new.sh
index 9af96fbcb..2526791ea 100755
--- a/execution/run_uc3-new.sh
+++ b/execution/run_uc3-new.sh
@@ -51,7 +51,7 @@ kubectl apply -k uc3-workload-generator
 
 # Start application
 REPLICAS=$INSTANCES
-cat <<EOF >uc3-application/set_paramters.yaml
+cat <<EOF >uc-application/overlay/uc3-application/set_paramters.yaml
 apiVersion: apps/v1
 kind: Deployment
 metadata:
@@ -60,17 +60,17 @@ spec:
   template:
     spec:
       containers:
-      - name: uc1-application
+      - name: uc-application
         env:
         - name: COMMIT_INTERVAL_MS
-          value: $KAFKA_STREAMS_COMMIT_INTERVAL_MS
+          value: "$KAFKA_STREAMS_COMMIT_INTERVAL_MS"
         resources:
           limits:
             memory: $MEMORY_LIMIT
             cpu: $CPU_LIMIT
 EOF
-kubectl apply -k uc3-application
-kubectl scale deployment titan-ccp-aggregation --replicas=$REPLICAS
+kubectl apply -k uc-application/overlay/uc3-application
+kubectl scale deployment uc3-titan-ccp-aggregation --replicas=$REPLICAS
 
 # Execute for certain time
 sleep ${EXECUTION_MINUTES}m
@@ -82,7 +82,7 @@ deactivate
 
 # Stop workload generator and app
 kubectl delete -k uc1-workload-generator
-kubectl delete -k uc1-application
+kubectl delete -k uc-application/overlay/uc3-application
 
 # Delete topics instead of Kafka
 #kubectl exec kafka-client -- bash -c "kafka-topics --zookeeper my-confluent-cp-zookeeper:2181 --delete --topic 'input,output,configuration,titan-.*'"
diff --git a/execution/run_uc4-new.sh b/execution/run_uc4-new.sh
index c22e49644..76da28d9a 100755
--- a/execution/run_uc4-new.sh
+++ b/execution/run_uc4-new.sh
@@ -45,7 +45,7 @@ kubectl apply -k uc4-workload-generator
 
 # Start application
 REPLICAS=$INSTANCES
-cat <<EOF >uc1-application/set_paramters.yaml
+cat <<EOF >uc-application/overlay/uc1-application/set_paramters.yaml
 apiVersion: apps/v1
 kind: Deployment
 metadata:
@@ -54,17 +54,17 @@ spec:
   template:
     spec:
       containers:
-      - name: uc1-application
+      - name: uc-application
         env:
         - name: COMMIT_INTERVAL_MS
-          value: $KAFKA_STREAMS_COMMIT_INTERVAL_MS
+          value: "$KAFKA_STREAMS_COMMIT_INTERVAL_MS"
         resources:
           limits:
             memory: $MEMORY_LIMIT
             cpu: $CPU_LIMIT
 EOF
-kubectl apply -k uc4-application
-kubectl scale deployment titan-ccp-aggregation --replicas=$REPLICAS
+kubectl apply -k uc-application/overlay/uc4-application
+kubectl scale deployment uc4-titan-ccp-aggregation --replicas=$REPLICAS
 
 # Execute for certain time
 sleep ${EXECUTION_MINUTES}m
@@ -76,7 +76,7 @@ deactivate
 
 # Stop workload generator and app
 kubectl delete -k uc4-workload-generator
-kubectl delete -k uc4-application
+kubectl delete -k uc-application/overlay/uc4-application
 
 
 # Delete topics instead of Kafka
diff --git a/execution/uc1-application/aggregation-deployment.yaml b/execution/uc-application/base/aggregation-deployment.yaml
similarity index 95%
rename from execution/uc1-application/aggregation-deployment.yaml
rename to execution/uc-application/base/aggregation-deployment.yaml
index 5232e83b8..129a9be64 100644
--- a/execution/uc1-application/aggregation-deployment.yaml
+++ b/execution/uc-application/base/aggregation-deployment.yaml
@@ -14,8 +14,8 @@ spec:
     spec:
       terminationGracePeriodSeconds: 0
       containers:
-      - name: uc1-application
-        image: "soerenhenning/uc1-app:latest"
+      - name: uc-application
+        image: "uc-app:latest"
         ports:
         - containerPort: 5555
           name: jmx
diff --git a/execution/uc1-application/aggregation-service.yaml b/execution/uc-application/base/aggregation-service.yaml
similarity index 100%
rename from execution/uc1-application/aggregation-service.yaml
rename to execution/uc-application/base/aggregation-service.yaml
diff --git a/execution/uc1-application/jmx-configmap.yaml b/execution/uc-application/base/jmx-configmap.yaml
similarity index 100%
rename from execution/uc1-application/jmx-configmap.yaml
rename to execution/uc-application/base/jmx-configmap.yaml
diff --git a/execution/uc2-application/kustomization.yaml b/execution/uc-application/base/kustomization.yaml
similarity index 76%
rename from execution/uc2-application/kustomization.yaml
rename to execution/uc-application/base/kustomization.yaml
index ab5c91fbc..24c89cfda 100644
--- a/execution/uc2-application/kustomization.yaml
+++ b/execution/uc-application/base/kustomization.yaml
@@ -10,6 +10,3 @@ resources:
   - aggregation-service.yaml
   - service-monitor.yaml
   - jmx-configmap.yaml
-
-patchesStrategicMerge:
-- set_paramters.yaml # Patch setting the resource parameters
diff --git a/execution/uc1-application/service-monitor.yaml b/execution/uc-application/base/service-monitor.yaml
similarity index 100%
rename from execution/uc1-application/service-monitor.yaml
rename to execution/uc-application/base/service-monitor.yaml
diff --git a/execution/uc-application/overlay/uc1-application/kustomization.yaml b/execution/uc-application/overlay/uc1-application/kustomization.yaml
new file mode 100644
index 000000000..5dc746cc2
--- /dev/null
+++ b/execution/uc-application/overlay/uc1-application/kustomization.yaml
@@ -0,0 +1,15 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+
+namePrefix: uc1-
+
+images:
+  - name: uc-app
+    newName: soerenhenning/uc1-app
+    newTag: latest
+
+bases:
+- ../../base
+
+patchesStrategicMerge:
+- set_paramters.yaml # Patch setting the resource parameters
diff --git a/execution/uc2-application/set_paramters.yaml b/execution/uc-application/overlay/uc1-application/set_paramters.yaml
similarity index 83%
rename from execution/uc2-application/set_paramters.yaml
rename to execution/uc-application/overlay/uc1-application/set_paramters.yaml
index cee53281f..57611fabd 100644
--- a/execution/uc2-application/set_paramters.yaml
+++ b/execution/uc-application/overlay/uc1-application/set_paramters.yaml
@@ -6,10 +6,10 @@ spec:
   template:
     spec:
       containers:
-      - name: uc2-application
+      - name: uc-application
         env:
         - name: COMMIT_INTERVAL_MS
-          value: 100
+          value: "100"
         resources:
           limits:
             memory: 4Gi
diff --git a/execution/uc-application/overlay/uc2-application/kustomization.yaml b/execution/uc-application/overlay/uc2-application/kustomization.yaml
new file mode 100644
index 000000000..8c62daebd
--- /dev/null
+++ b/execution/uc-application/overlay/uc2-application/kustomization.yaml
@@ -0,0 +1,15 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+
+namePrefix: uc2-
+
+images:
+  - name: uc-app
+    newName: soerenhenning/uc2-app
+    newTag: latest
+
+bases:
+- ../../base
+
+patchesStrategicMerge:
+- set_paramters.yaml # Patch setting the resource parameters
diff --git a/execution/uc1-application/set_paramters.yaml b/execution/uc-application/overlay/uc2-application/set_paramters.yaml
similarity index 83%
rename from execution/uc1-application/set_paramters.yaml
rename to execution/uc-application/overlay/uc2-application/set_paramters.yaml
index af64785a6..57611fabd 100644
--- a/execution/uc1-application/set_paramters.yaml
+++ b/execution/uc-application/overlay/uc2-application/set_paramters.yaml
@@ -6,10 +6,10 @@ spec:
   template:
     spec:
       containers:
-      - name: uc1-application
+      - name: uc-application
         env:
         - name: COMMIT_INTERVAL_MS
-          value: 100
+          value: "100"
         resources:
           limits:
             memory: 4Gi
diff --git a/execution/uc-application/overlay/uc3-application/kustomization.yaml b/execution/uc-application/overlay/uc3-application/kustomization.yaml
new file mode 100644
index 000000000..0a898a9ca
--- /dev/null
+++ b/execution/uc-application/overlay/uc3-application/kustomization.yaml
@@ -0,0 +1,15 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+
+namePrefix: uc3-
+
+images:
+  - name: uc-app
+    newName: soerenhenning/uc3-app
+    newTag: latest
+
+bases:
+- ../../base
+
+patchesStrategicMerge:
+- set_paramters.yaml # Patch setting the resource parameters
diff --git a/execution/uc3-application/set_paramters.yaml b/execution/uc-application/overlay/uc3-application/set_paramters.yaml
similarity index 90%
rename from execution/uc3-application/set_paramters.yaml
rename to execution/uc-application/overlay/uc3-application/set_paramters.yaml
index 2738e0c17..d25865a7f 100644
--- a/execution/uc3-application/set_paramters.yaml
+++ b/execution/uc-application/overlay/uc3-application/set_paramters.yaml
@@ -6,7 +6,7 @@ spec:
   template:
     spec:
       containers:
-      - name: uc3-application
+      - name: uc-application
         env:
         - name: COMMIT_INTERVAL_MS
           value: 100
diff --git a/execution/uc-application/overlay/uc4-application/kustomization.yaml b/execution/uc-application/overlay/uc4-application/kustomization.yaml
new file mode 100644
index 000000000..00ad540e6
--- /dev/null
+++ b/execution/uc-application/overlay/uc4-application/kustomization.yaml
@@ -0,0 +1,15 @@
+apiVersion: kustomize.config.k8s.io/v1beta1
+kind: Kustomization
+
+namePrefix: uc4-
+
+images:
+  - name: uc-app
+    newName: soerenhenning/uc4-app
+    newTag: latest
+
+bases:
+- ../../base
+
+patchesStrategicMerge:
+- set_paramters.yaml # Patch setting the resource parameters
diff --git a/execution/uc4-application/set_paramters.yaml b/execution/uc-application/overlay/uc4-application/set_paramters.yaml
similarity index 83%
rename from execution/uc4-application/set_paramters.yaml
rename to execution/uc-application/overlay/uc4-application/set_paramters.yaml
index 38c80d9ff..57611fabd 100644
--- a/execution/uc4-application/set_paramters.yaml
+++ b/execution/uc-application/overlay/uc4-application/set_paramters.yaml
@@ -6,10 +6,10 @@ spec:
   template:
     spec:
       containers:
-      - name: uc4-application
+      - name: uc-application
         env:
         - name: COMMIT_INTERVAL_MS
-          value: 100
+          value: "100"
         resources:
           limits:
             memory: 4Gi
diff --git a/execution/uc1-application/kustomization.yaml b/execution/uc1-application/kustomization.yaml
deleted file mode 100644
index ab5c91fbc..000000000
--- a/execution/uc1-application/kustomization.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-apiVersion: kustomize.config.k8s.io/v1beta1
-kind: Kustomization
-
-commonLabels:
-  app: titan-ccp-aggregation
-
-# Use all resources to compose them into one file
-resources:
-  - aggregation-deployment.yaml
-  - aggregation-service.yaml
-  - service-monitor.yaml
-  - jmx-configmap.yaml
-
-patchesStrategicMerge:
-- set_paramters.yaml # Patch setting the resource parameters
diff --git a/execution/uc2-application/aggregation-deployment.yaml b/execution/uc2-application/aggregation-deployment.yaml
deleted file mode 100644
index a0f8b4354..000000000
--- a/execution/uc2-application/aggregation-deployment.yaml
+++ /dev/null
@@ -1,53 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: titan-ccp-aggregation
-spec:
-  selector:
-    matchLabels:
-      app: titan-ccp-aggregation
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        app: titan-ccp-aggregation
-    spec:
-      terminationGracePeriodSeconds: 0
-      containers:
-      - name: uc2-application
-        image: "benediktwetzel/uc2-app:latest"
-        ports:
-        - containerPort: 5555
-          name: jmx
-        env:
-        - name: KAFKA_BOOTSTRAP_SERVERS
-          value: "my-confluent-cp-kafka:9092"
-        - name: COMMIT_INTERVAL_MS
-          value: 100
-        - name: JAVA_OPTS
-          value: "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=5555"
-        resources:
-          limits:
-            memory: 4Gi
-            cpu: 1000m
-      - name: prometheus-jmx-exporter
-        image: "solsson/kafka-prometheus-jmx-exporter@sha256:6f82e2b0464f50da8104acd7363fb9b995001ddff77d248379f8788e78946143"
-        command:
-          - java
-          - -XX:+UnlockExperimentalVMOptions
-          - -XX:+UseCGroupMemoryLimitForHeap
-          - -XX:MaxRAMFraction=1
-          - -XshowSettings:vm
-          - -jar
-          - jmx_prometheus_httpserver.jar
-          - "5556"
-          - /etc/jmx-aggregation/jmx-kafka-prometheus.yml
-        ports:
-          - containerPort: 5556
-        volumeMounts:
-          - name: jmx-config
-            mountPath: /etc/jmx-aggregation
-      volumes:
-        - name: jmx-config
-          configMap:
-            name: aggregation-jmx-configmap
diff --git a/execution/uc2-application/aggregation-service.yaml b/execution/uc2-application/aggregation-service.yaml
deleted file mode 100644
index 85432d04f..000000000
--- a/execution/uc2-application/aggregation-service.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:  
-  name: titan-ccp-aggregation
-  labels:
-    app: titan-ccp-aggregation
-spec:
-  #type: NodePort
-  selector:    
-    app: titan-ccp-aggregation
-  ports:  
-  - name: http
-    port: 80
-    targetPort: 80
-    protocol: TCP
-  - name: metrics
-    port: 5556
diff --git a/execution/uc2-application/jmx-configmap.yaml b/execution/uc2-application/jmx-configmap.yaml
deleted file mode 100644
index 78496a86b..000000000
--- a/execution/uc2-application/jmx-configmap.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aggregation-jmx-configmap
-data:
-  jmx-kafka-prometheus.yml: |+
-    jmxUrl: service:jmx:rmi:///jndi/rmi://localhost:5555/jmxrmi
-    lowercaseOutputName: true
-    lowercaseOutputLabelNames: true
-    ssl: false
diff --git a/execution/uc2-application/service-monitor.yaml b/execution/uc2-application/service-monitor.yaml
deleted file mode 100644
index 4e7e758ca..000000000
--- a/execution/uc2-application/service-monitor.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-apiVersion: monitoring.coreos.com/v1
-kind: ServiceMonitor
-metadata:
-  labels:
-    app: titan-ccp-aggregation
-    appScope: titan-ccp
-  name: titan-ccp-aggregation
-spec:
-  selector:
-    matchLabels:
-        app: titan-ccp-aggregation
-  endpoints:
-    - port: metrics
-      interval: 10s
diff --git a/execution/uc3-application/aggregation-deployment.yaml b/execution/uc3-application/aggregation-deployment.yaml
deleted file mode 100644
index 23d77086a..000000000
--- a/execution/uc3-application/aggregation-deployment.yaml
+++ /dev/null
@@ -1,55 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: titan-ccp-aggregation
-spec:
-  selector:
-    matchLabels:
-      app: titan-ccp-aggregation
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        app: titan-ccp-aggregation
-    spec:
-      terminationGracePeriodSeconds: 0
-      containers:
-      - name: uc3-application
-        image: "soerenhenning/uc3-app:latest"
-        ports:
-        - containerPort: 5555
-          name: jmx
-        env:
-        - name: KAFKA_BOOTSTRAP_SERVERS
-          value: "my-confluent-cp-kafka:9092"
-        - name: KAFKA_WINDOW_DURATION_MINUTES
-          value: "1"
-        - name: COMMIT_INTERVAL_MS
-          value: 100
-        - name: JAVA_OPTS
-          value: "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=5555"
-        resources:
-          limits:
-            memory: 4Gi
-            cpu: 1000m
-      - name: prometheus-jmx-exporter
-        image: "solsson/kafka-prometheus-jmx-exporter@sha256:6f82e2b0464f50da8104acd7363fb9b995001ddff77d248379f8788e78946143"
-        command:
-          - java
-          - -XX:+UnlockExperimentalVMOptions
-          - -XX:+UseCGroupMemoryLimitForHeap
-          - -XX:MaxRAMFraction=1
-          - -XshowSettings:vm
-          - -jar
-          - jmx_prometheus_httpserver.jar
-          - "5556"
-          - /etc/jmx-aggregation/jmx-kafka-prometheus.yml
-        ports:
-          - containerPort: 5556
-        volumeMounts:
-          - name: jmx-config
-            mountPath: /etc/jmx-aggregation
-      volumes:
-        - name: jmx-config
-          configMap:
-            name: aggregation-jmx-configmap
diff --git a/execution/uc3-application/aggregation-service.yaml b/execution/uc3-application/aggregation-service.yaml
deleted file mode 100644
index 85432d04f..000000000
--- a/execution/uc3-application/aggregation-service.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:  
-  name: titan-ccp-aggregation
-  labels:
-    app: titan-ccp-aggregation
-spec:
-  #type: NodePort
-  selector:    
-    app: titan-ccp-aggregation
-  ports:  
-  - name: http
-    port: 80
-    targetPort: 80
-    protocol: TCP
-  - name: metrics
-    port: 5556
diff --git a/execution/uc3-application/jmx-configmap.yaml b/execution/uc3-application/jmx-configmap.yaml
deleted file mode 100644
index 78496a86b..000000000
--- a/execution/uc3-application/jmx-configmap.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aggregation-jmx-configmap
-data:
-  jmx-kafka-prometheus.yml: |+
-    jmxUrl: service:jmx:rmi:///jndi/rmi://localhost:5555/jmxrmi
-    lowercaseOutputName: true
-    lowercaseOutputLabelNames: true
-    ssl: false
diff --git a/execution/uc3-application/kustomization.yaml b/execution/uc3-application/kustomization.yaml
deleted file mode 100644
index ab5c91fbc..000000000
--- a/execution/uc3-application/kustomization.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-apiVersion: kustomize.config.k8s.io/v1beta1
-kind: Kustomization
-
-commonLabels:
-  app: titan-ccp-aggregation
-
-# Use all resources to compose them into one file
-resources:
-  - aggregation-deployment.yaml
-  - aggregation-service.yaml
-  - service-monitor.yaml
-  - jmx-configmap.yaml
-
-patchesStrategicMerge:
-- set_paramters.yaml # Patch setting the resource parameters
diff --git a/execution/uc3-application/service-monitor.yaml b/execution/uc3-application/service-monitor.yaml
deleted file mode 100644
index 4e7e758ca..000000000
--- a/execution/uc3-application/service-monitor.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-apiVersion: monitoring.coreos.com/v1
-kind: ServiceMonitor
-metadata:
-  labels:
-    app: titan-ccp-aggregation
-    appScope: titan-ccp
-  name: titan-ccp-aggregation
-spec:
-  selector:
-    matchLabels:
-        app: titan-ccp-aggregation
-  endpoints:
-    - port: metrics
-      interval: 10s
diff --git a/execution/uc4-application/aggregation-deployment.yaml b/execution/uc4-application/aggregation-deployment.yaml
deleted file mode 100644
index be0718266..000000000
--- a/execution/uc4-application/aggregation-deployment.yaml
+++ /dev/null
@@ -1,57 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: titan-ccp-aggregation
-spec:
-  selector:
-    matchLabels:
-      app: titan-ccp-aggregation
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        app: titan-ccp-aggregation
-    spec:
-      terminationGracePeriodSeconds: 0
-      containers:
-      - name: uc4-application
-        image: "soerenhenning/uc4-app:latest"
-        ports:
-        - containerPort: 5555
-          name: jmx
-        env:
-        - name: KAFKA_BOOTSTRAP_SERVERS
-          value: "my-confluent-cp-kafka:9092"
-        - name: AGGREGATION_DURATION_DAYS
-          value: "3" #AGGREGATION_DURATION_DAYS
-        - name: AGGREGATION_DURATION_ADVANCE
-          value: "1"
-        - name: COMMIT_INTERVAL_MS
-          value: 100
-        - name: JAVA_OPTS
-          value: "-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=5555"
-        resources:
-          limits:
-            memory: 4Gi
-            cpu: 1000m
-      - name: prometheus-jmx-exporter
-        image: "solsson/kafka-prometheus-jmx-exporter@sha256:6f82e2b0464f50da8104acd7363fb9b995001ddff77d248379f8788e78946143"
-        command:
-          - java
-          - -XX:+UnlockExperimentalVMOptions
-          - -XX:+UseCGroupMemoryLimitForHeap
-          - -XX:MaxRAMFraction=1
-          - -XshowSettings:vm
-          - -jar
-          - jmx_prometheus_httpserver.jar
-          - "5556"
-          - /etc/jmx-aggregation/jmx-kafka-prometheus.yml
-        ports:
-          - containerPort: 5556
-        volumeMounts:
-          - name: jmx-config
-            mountPath: /etc/jmx-aggregation
-      volumes:
-        - name: jmx-config
-          configMap:
-            name: aggregation-jmx-configmap
diff --git a/execution/uc4-application/aggregation-service.yaml b/execution/uc4-application/aggregation-service.yaml
deleted file mode 100644
index 85432d04f..000000000
--- a/execution/uc4-application/aggregation-service.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:  
-  name: titan-ccp-aggregation
-  labels:
-    app: titan-ccp-aggregation
-spec:
-  #type: NodePort
-  selector:    
-    app: titan-ccp-aggregation
-  ports:  
-  - name: http
-    port: 80
-    targetPort: 80
-    protocol: TCP
-  - name: metrics
-    port: 5556
diff --git a/execution/uc4-application/jmx-configmap.yaml b/execution/uc4-application/jmx-configmap.yaml
deleted file mode 100644
index 78496a86b..000000000
--- a/execution/uc4-application/jmx-configmap.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: aggregation-jmx-configmap
-data:
-  jmx-kafka-prometheus.yml: |+
-    jmxUrl: service:jmx:rmi:///jndi/rmi://localhost:5555/jmxrmi
-    lowercaseOutputName: true
-    lowercaseOutputLabelNames: true
-    ssl: false
diff --git a/execution/uc4-application/kustomization.yaml b/execution/uc4-application/kustomization.yaml
deleted file mode 100644
index ab5c91fbc..000000000
--- a/execution/uc4-application/kustomization.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-apiVersion: kustomize.config.k8s.io/v1beta1
-kind: Kustomization
-
-commonLabels:
-  app: titan-ccp-aggregation
-
-# Use all resources to compose them into one file
-resources:
-  - aggregation-deployment.yaml
-  - aggregation-service.yaml
-  - service-monitor.yaml
-  - jmx-configmap.yaml
-
-patchesStrategicMerge:
-- set_paramters.yaml # Patch setting the resource parameters
diff --git a/execution/uc4-application/service-monitor.yaml b/execution/uc4-application/service-monitor.yaml
deleted file mode 100644
index 4e7e758ca..000000000
--- a/execution/uc4-application/service-monitor.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-apiVersion: monitoring.coreos.com/v1
-kind: ServiceMonitor
-metadata:
-  labels:
-    app: titan-ccp-aggregation
-    appScope: titan-ccp
-  name: titan-ccp-aggregation
-spec:
-  selector:
-    matchLabels:
-        app: titan-ccp-aggregation
-  endpoints:
-    - port: metrics
-      interval: 10s
-- 
GitLab