From ff25772d4565fbc8a2855b091ef51c4df5bcba17 Mon Sep 17 00:00:00 2001 From: Ariya Sontrapornpol Date: Tue, 2 Apr 2024 00:14:26 +0700 Subject: [PATCH] Helm templating all base images --- .github/workflows/build_push_docker_hub.yaml | 5 +++-- .../templates/data-producer-deployment.yaml | 2 +- .../forecast-service-deployment-service.yaml | 2 +- .../templates/mlflow-deployment-service.yaml | 2 +- sfmlops-helm/templates/ray-cluster.yaml | 4 ++-- .../training-service-deployment-service.yaml | 2 +- .../templates/web-ui-deployment-service.yaml | 2 +- sfmlops-helm/values.yaml | 15 +++++++-------- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build_push_docker_hub.yaml b/.github/workflows/build_push_docker_hub.yaml index 8ca60cf..2d407f1 100644 --- a/.github/workflows/build_push_docker_hub.yaml +++ b/.github/workflows/build_push_docker_hub.yaml @@ -67,7 +67,6 @@ jobs: # to put this into matrix build-args: | AIRFLOW_HOME=/opt/airflow - MLFLOW_ARTIFACT_ROOT=/storage/mlruns build_and_push_ray_arm64: # Job for building and pushing the images name: Build and Push Ray arm64 Image @@ -108,10 +107,11 @@ jobs: ## for amd64 (x86_64) please leave ARCH_TRAILING_IMG_NAME empty like ## ARCH_TRAILING_IMG_NAME= build-args: | + MLFLOW_ARTIFACT_ROOT=/storage/mlruns ARCH_TRAILING_IMG_NAME=-aarch64 build_and_push_ray_amd64: # Job for building and pushing the images - name: Build and Push Ray arm64 Image + name: Build and Push Ray amd64 Image runs-on: ubuntu-latest needs: shared_steps # Dependency on the shared steps steps: @@ -147,4 +147,5 @@ jobs: # Hardcoded all build-args here, couldn't find a proper way # to put this into matrix build-args: | + MLFLOW_ARTIFACT_ROOT=/storage/mlruns ARCH_TRAILING_IMG_NAME= diff --git a/sfmlops-helm/templates/data-producer-deployment.yaml b/sfmlops-helm/templates/data-producer-deployment.yaml index 4fb2613..aaa600a 100644 --- a/sfmlops-helm/templates/data-producer-deployment.yaml +++ b/sfmlops-helm/templates/data-producer-deployment.yaml @@ -14,7 +14,7 @@ spec: spec: containers: - name: data-producer - image: ariya23156/sfmlops-data-producer + image: {{ .Values.containerMainImage.dataProducer }} imagePullPolicy: Always resources: requests: diff --git a/sfmlops-helm/templates/forecast-service-deployment-service.yaml b/sfmlops-helm/templates/forecast-service-deployment-service.yaml index 672123c..fa1b00a 100644 --- a/sfmlops-helm/templates/forecast-service-deployment-service.yaml +++ b/sfmlops-helm/templates/forecast-service-deployment-service.yaml @@ -18,7 +18,7 @@ spec: claimName: {{ .Values.mlflowPvcName }} containers: - name: forecast-service - image: ariya23156/sfmlops-forecast-service + image: {{ .Values.containerMainImage.forecastService }} imagePullPolicy: Always ports: - containerPort: {{ .Values.forecastServicePort }} diff --git a/sfmlops-helm/templates/mlflow-deployment-service.yaml b/sfmlops-helm/templates/mlflow-deployment-service.yaml index 2ed7741..a2e4957 100644 --- a/sfmlops-helm/templates/mlflow-deployment-service.yaml +++ b/sfmlops-helm/templates/mlflow-deployment-service.yaml @@ -18,7 +18,7 @@ spec: claimName: {{ .Values.mlflowPvcName }} containers: - name: mlflow - image: ariya23156/sfmlops-mlflow + image: {{ .Values.containerMainImage.mlflow }} ports: - containerPort: {{ .Values.mlflowPort }} volumeMounts: diff --git a/sfmlops-helm/templates/ray-cluster.yaml b/sfmlops-helm/templates/ray-cluster.yaml index 4821427..1ce5dc0 100644 --- a/sfmlops-helm/templates/ray-cluster.yaml +++ b/sfmlops-helm/templates/ray-cluster.yaml @@ -34,7 +34,7 @@ spec: spec: containers: - name: ray-head - image: ariya23156/sfmlops-ray + image: {{ .Values.containerMainImage.ray }} imagePullPolicy: Always ports: - containerPort: 6379 @@ -109,7 +109,7 @@ spec: spec: containers: - name: ray-worker - image: ariya23156/sfmlops-ray + image: {{ .Values.containerMainImage.ray }} imagePullPolicy: Always lifecycle: preStop: diff --git a/sfmlops-helm/templates/training-service-deployment-service.yaml b/sfmlops-helm/templates/training-service-deployment-service.yaml index 28635b0..9a7fb35 100644 --- a/sfmlops-helm/templates/training-service-deployment-service.yaml +++ b/sfmlops-helm/templates/training-service-deployment-service.yaml @@ -14,7 +14,7 @@ spec: spec: containers: - name: training-service - image: ariya23156/sfmlops-training-service + image: {{ .Values.containerMainImage.trainingService }} imagePullPolicy: Always ports: - containerPort: {{ .Values.trainingServicePort }} diff --git a/sfmlops-helm/templates/web-ui-deployment-service.yaml b/sfmlops-helm/templates/web-ui-deployment-service.yaml index ee9551e..f7647f7 100644 --- a/sfmlops-helm/templates/web-ui-deployment-service.yaml +++ b/sfmlops-helm/templates/web-ui-deployment-service.yaml @@ -14,7 +14,7 @@ spec: spec: containers: - name: web-ui - image: ariya23156/sfmlops-web-ui + image: {{ .Values.containerMainImage.webUi }} imagePullPolicy: Always ports: - containerPort: {{ .Values.webUiPort }} diff --git a/sfmlops-helm/values.yaml b/sfmlops-helm/values.yaml index 8f49ac8..0be1233 100644 --- a/sfmlops-helm/values.yaml +++ b/sfmlops-helm/values.yaml @@ -1,11 +1,10 @@ -containerBaseImage: - dataProducer: - trainingService: - forecastService: - mlflow: - ray: - webUi: - +containerMainImage: + dataProducer: ariya23156/sfmlops-data-producer + trainingService: ariya23156/sfmlops-training-service + forecastService: ariya23156/sfmlops-forecast-service + mlflow: ariya23156/sfmlops-mlflow + ray: ariya23156/sfmlops-ray:latest-amd64 + webUi: ariya23156/sfmlops-web-ui kafkaReleaseName: kafka-release kafkaNamespace: kafka