From 4ca1feb148b26bc289805ee690b188732b3a01db Mon Sep 17 00:00:00 2001 From: mc-b Date: Sun, 19 Jan 2020 14:25:46 +0100 Subject: [PATCH] Erweiterung um schreiben ML Daten in ml-data.csv --- Dockerfile.consumer | 4 ++++ iot-kafka-consumer.yaml | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/Dockerfile.consumer b/Dockerfile.consumer index 5384ff4..d5e68f2 100644 --- a/Dockerfile.consumer +++ b/Dockerfile.consumer @@ -5,4 +5,8 @@ LABEL description="IoT Consumer" COPY target/consumer-service-0.1-jar-with-dependencies.jar /opt/consumer-service.jar +# Datenverzeichnis +RUN mkdir /data +WORKDIR /data + CMD java -jar /opt/consumer-service.jar \ No newline at end of file diff --git a/iot-kafka-consumer.yaml b/iot-kafka-consumer.yaml index 5d18f0e..da87d93 100644 --- a/iot-kafka-consumer.yaml +++ b/iot-kafka-consumer.yaml @@ -18,3 +18,13 @@ spec: - name: iot-kafka-consumer image: misegr/iot-kafka-consumer imagePullPolicy: IfNotPresent + # Volumes im Container + volumeMounts: + - mountPath: "/data" + subPath: mlg + name: "mlg-data" + # Volumes in Host + volumes: + - name: "mlg-data" + persistentVolumeClaim: + claimName: data-claim \ No newline at end of file