From b04ffb579456a8bb16a288e89e74dad473bd8502 Mon Sep 17 00:00:00 2001 From: odra Date: Tue, 30 Jul 2024 10:53:27 -0300 Subject: [PATCH] bluechi service dependency (#31) * bluechi service dependency Signed-off-by: Leonardo Rossetti * fix bluechi dockerfile Signed-off-by: Leonardo Rossetti --------- Signed-off-by: Leonardo Rossetti --- eclipse-bluechi/.devcontainer/Dockerfile | 12 ++++-------- eclipse-bluechi/workspace/workloads/agemo.kube | 7 +++++-- eclipse-bluechi/workspace/workloads/chariott.kube | 5 ++--- eclipse-bluechi/workspace/workloads/freyja.kube | 7 +++++-- eclipse-bluechi/workspace/workloads/ibeji.kube | 7 +++++-- eclipse-bluechi/workspace/workloads/mosquitto.kube | 4 ++-- .../workloads/smart_trailer_application.kube | 3 +++ .../workloads/trailer_connected_provider.kube | 7 +++++-- .../workloads/trailer_properties_provider.kube | 7 +++++-- 9 files changed, 36 insertions(+), 23 deletions(-) diff --git a/eclipse-bluechi/.devcontainer/Dockerfile b/eclipse-bluechi/.devcontainer/Dockerfile index 13b3258..c9fdee9 100644 --- a/eclipse-bluechi/.devcontainer/Dockerfile +++ b/eclipse-bluechi/.devcontainer/Dockerfile @@ -16,17 +16,13 @@ ARG TARGETARCH # Based on the target architecture, download the correct grpcurl binary RUN if [ "$TARGETARCH" = "amd64" ]; then \ - GRPCURL_URL="https://github.com/fullstorydev/grpcurl/releases/download/v1.8.7/grpcurl_1.8.7_linux_x86_64.tar.gz"; \ + export GRPCURL_URL="https://github.com/fullstorydev/grpcurl/releases/download/v1.8.7/grpcurl_1.8.7_linux_x86_64.tar.gz"; \ elif [ "$TARGETARCH" = "arm64" ]; then \ - GRPCURL_URL="https://github.com/fullstorydev/grpcurl/releases/download/v1.8.7/grpcurl_1.8.7_linux_arm64.tar.gz"; \ + export GRPCURL_URL="https://github.com/fullstorydev/grpcurl/releases/download/v1.8.7/grpcurl_1.8.7_linux_arm64.tar.gz"; \ else \ echo "Unsupported architecture"; \ exit 1; \ fi; \ - mkdir /usr/bin/grpcurl.d && \ - curl -sSL ${GRPCURL_URL} | tar -xvz --directory /usr/bin/grpcurl.d && \ + mkdir -p /usr/bin/grpcurl.d && \ + curl -sSL "${GRPCURL_URL}" | tar -xvz --directory /usr/bin/grpcurl.d && \ ln /usr/bin/grpcurl.d/grpcurl /usr/bin/grpcurl - -RUN mkdir /usr/bin/grpcurl.d && \ -curl -sSL ${GRPCURL_URL} | tar -xvz --directory /usr/bin/grpcurl.d && \ -ln /usr/bin/grpcurl.d/grpcurl /usr/bin/grpcurl diff --git a/eclipse-bluechi/workspace/workloads/agemo.kube b/eclipse-bluechi/workspace/workloads/agemo.kube index 6b293d8..6464694 100644 --- a/eclipse-bluechi/workspace/workloads/agemo.kube +++ b/eclipse-bluechi/workspace/workloads/agemo.kube @@ -16,5 +16,8 @@ Yaml=agemo.yml # Commented to disable the service to automatically start -# [Install] -# WantedBy=default.target +[Install] +WantedBy=default.target + +[Unit] +Wants=chariott.service mosquitto.service diff --git a/eclipse-bluechi/workspace/workloads/chariott.kube b/eclipse-bluechi/workspace/workloads/chariott.kube index 1bff5b9..1cab458 100644 --- a/eclipse-bluechi/workspace/workloads/chariott.kube +++ b/eclipse-bluechi/workspace/workloads/chariott.kube @@ -15,6 +15,5 @@ [Kube] Yaml=chariott.yml -# Commented to disable the service to automatically start -# [Install] -# WantedBy=default.target +[Install] +WantedBy=default.target diff --git a/eclipse-bluechi/workspace/workloads/freyja.kube b/eclipse-bluechi/workspace/workloads/freyja.kube index 440884b..5a63fea 100644 --- a/eclipse-bluechi/workspace/workloads/freyja.kube +++ b/eclipse-bluechi/workspace/workloads/freyja.kube @@ -16,5 +16,8 @@ Yaml=freyja.yml # Commented to disable the service to automatically start -# [Install] -# WantedBy=default.target +[Install] +WantedBy=default.target + +[Unit] +Wants=chariott.service ibeji.service diff --git a/eclipse-bluechi/workspace/workloads/ibeji.kube b/eclipse-bluechi/workspace/workloads/ibeji.kube index f0db574..3870fcb 100644 --- a/eclipse-bluechi/workspace/workloads/ibeji.kube +++ b/eclipse-bluechi/workspace/workloads/ibeji.kube @@ -16,5 +16,8 @@ Yaml=ibeji.yml # Commented to disable the service to automatically start -# [Install] -# WantedBy=default.target +[Install] +WantedBy=default.target + +[Unit] +Wants=chariott.service agemo.service diff --git a/eclipse-bluechi/workspace/workloads/mosquitto.kube b/eclipse-bluechi/workspace/workloads/mosquitto.kube index c8352ab..b9cf039 100644 --- a/eclipse-bluechi/workspace/workloads/mosquitto.kube +++ b/eclipse-bluechi/workspace/workloads/mosquitto.kube @@ -16,5 +16,5 @@ Yaml=mosquitto.yml # Commented to disable the service to automatically start -# [Install] -# WantedBy=default.target +[Install] +WantedBy=default.target diff --git a/eclipse-bluechi/workspace/workloads/smart_trailer_application.kube b/eclipse-bluechi/workspace/workloads/smart_trailer_application.kube index 40858f3..81448ff 100644 --- a/eclipse-bluechi/workspace/workloads/smart_trailer_application.kube +++ b/eclipse-bluechi/workspace/workloads/smart_trailer_application.kube @@ -11,3 +11,6 @@ Yaml=smart_trailer_application.yml # Commented to disable the service to automatically start [Install] WantedBy=default.target + +[Unit] +Wants=ibeji.service diff --git a/eclipse-bluechi/workspace/workloads/trailer_connected_provider.kube b/eclipse-bluechi/workspace/workloads/trailer_connected_provider.kube index 982fdca..6b5074b 100644 --- a/eclipse-bluechi/workspace/workloads/trailer_connected_provider.kube +++ b/eclipse-bluechi/workspace/workloads/trailer_connected_provider.kube @@ -9,5 +9,8 @@ Yaml=trailer_connected_provider.yml # Commented to disable the service to automatically start -# [Install] -# WantedBy=default.target +[Install] +WantedBy=default.target + +[Unit] +Wants=ibeji.service diff --git a/eclipse-bluechi/workspace/workloads/trailer_properties_provider.kube b/eclipse-bluechi/workspace/workloads/trailer_properties_provider.kube index 0d028ec..ba6b6d2 100644 --- a/eclipse-bluechi/workspace/workloads/trailer_properties_provider.kube +++ b/eclipse-bluechi/workspace/workloads/trailer_properties_provider.kube @@ -9,5 +9,8 @@ Yaml=trailer_properties_provider.yml # Commented to disable the service to automatically start -# [Install] -# WantedBy=default.target +[Install] +WantedBy=default.target + +[Unit] +Wants=ibeji.service