Skip to content

Commit

Permalink
[FIX] Support non admin installations and fix minio S3 endpoint (mlru…
Browse files Browse the repository at this point in the history
  • Loading branch information
GiladShapira94 authored Oct 24, 2023
1 parent 62942a4 commit bb0cb89
Show file tree
Hide file tree
Showing 31 changed files with 287 additions and 57 deletions.
2 changes: 1 addition & 1 deletion charts/mlrun-ce/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
version: 0.6.3-rc3
version: 0.6.3-rc4
name: mlrun-ce
description: MLRUn Open Source Stack
home: https://iguazio.com
Expand Down
45 changes: 45 additions & 0 deletions charts/mlrun-ce/admin_installation_values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Use this Values file for installing MLRun CE cluster resources such as: crd, cluster role on a namespace that will not use for
# the deployment's installation.
# After you installed the helm chart using this values file you will need to use the non_admin_cluster_ip_installtion_values.yaml
# or the non_admin__installtion_values.yaml for installing the mlrun ce deployments (support MLRun. mpi, nuclio and kfp pipeline installation)

# We use global values scope to multiplex the docker-registry details to both mlrun and nuclio
global:
# External host/ip to reach the k8s node. This might take various values if k8s is run in a VM or a cloud env
registry:
url: false

nuclio:
# coupled with mlrun.nuclio.dashboardName template in mlrun chart
controller:
enabled: false
dashboard:
enabled: false
rbac:
create: false
platform: false

mlrun:
enabled: false

jupyterNotebook:
enabled: false

mpi-operator:
rbac:
namespaced:
create: false
deployment:
create: false

minio:
enabled: false

spark-operator:
enabled: false

pipelines:
enabled: false

kube-prometheus-stack:
enabled: false
60 changes: 60 additions & 0 deletions charts/mlrun-ce/non_admin_cluster_ip_installation_values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Use this Values file for installing MLRun CE resources such as: deployments, non cluster resources (.e.g. crd, cluter role) and installing service as clusterIP.
# remember to use a different namespace that used for the cluster resource installation. (support MLRun. mpi, nuclio and kfp pipeline installation)

# We use global values scope to multiplex the docker-registry details to both mlrun and nuclio
global:
nuclio:
dashboard:
nodePort: ""

nuclio:
crd:
create: false

mlrun:
api:
service:
type: ClusterIP
nodePort: ""
ui:
service:
type: ClusterIP
nodePort: ""
jupyterNotebook:
service:
type: ClusterIP
nodePort: ""
port: 8888

mpi-operator:
fullnameOverride: mpi-operator
crd:
create: false
rbac:
clusterResources:
create: false

minio:
service:
type: ClusterIP
port: 9000
nodePort: ""
consoleService:
type: ClusterIP
port: 9001
nodePort: ""

spark-operator:
enabled: false

pipelines:
service:
type : ClusterIP
nodePort: ""
crd:
enabled: false
priority_class:
enabled: false

kube-prometheus-stack:
enabled: false
60 changes: 60 additions & 0 deletions charts/mlrun-ce/non_admin_installation_values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Use this Values file for installing MLRun CE resources such as: deployments, non cluster resources (.e.g. crd, cluter role) and installing service as clusterIP.
# remember to use a different namespace that used for the cluster resource installation. (support MLRun. mpi, nuclio and kfp pipeline installation)

# We use global values scope to multiplex the docker-registry details to both mlrun and nuclio
global:
nuclio:
dashboard:
nodePort: 30050

nuclio:
crd:
create: false

mlrun:
api:
service:
type: NodePort
nodePort: 30070
ui:
service:
type: NodePort
nodePort: 30060
jupyterNotebook:
service:
type: NodePort
nodePort: 30040
port: 8888

mpi-operator:
fullnameOverride: mpi-operator
crd:
create: false
rbac:
clusterResources:
create: false

minio:
service:
type: NodePort
port: 9000
nodePort: 30080
consoleService:
type: NodePort
port: 9001
nodePort: 30090

spark-operator:
enabled: false

pipelines:
service:
type : NodePort
nodePort: 30010
crd:
enabled: false
priority_class:
enabled: false

kube-prometheus-stack:
enabled: false
6 changes: 3 additions & 3 deletions charts/mlrun-ce/requirements.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies:
- name: nuclio
repository: https://nuclio.github.io/nuclio/charts
version: 0.17.13
version: 0.18.3
- name: mlrun
repository: https://v3io.github.io/helm-charts/stable
version: 0.9.16
Expand All @@ -17,5 +17,5 @@ dependencies:
- name: kube-prometheus-stack
repository: https://prometheus-community.github.io/helm-charts
version: 41.7.2
digest: sha256:ef115a3d4eab8b4d568208ab979efd1cfbe8f854e232e0300c04a1c9b53ed79f
generated: "2023-08-21T16:01:38.348435+03:00"
digest: sha256:1fe93cb969f5c1e6676a58feb4c8b18210158a12cfe6fc8a6acf58ad1b2c4327
generated: "2023-10-04T11:56:24.400537+03:00"
4 changes: 2 additions & 2 deletions charts/mlrun-ce/requirements.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
dependencies:
- name: nuclio
version: "0.17.13"
version: "0.18.3"
repository: "https://nuclio.github.io/nuclio/charts"
- name: mlrun
version: "0.9.16"
repository: "https://v3io.github.io/helm-charts/stable"
condition: mlrun.enabled
- name: mpi-operator
version: "0.6.0"
repository: "https://v3io.github.io/helm-charts/stable"
Expand All @@ -20,4 +21,3 @@ dependencies:
repository: "https://prometheus-community.github.io/helm-charts"
version: "41.7.2"
condition: kube-prometheus-stack.enabled

19 changes: 11 additions & 8 deletions charts/mlrun-ce/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
{{- if or (.Values.jupyterNotebook.enabled) (.Values.mlrun.enabled) (.Values.minio.enabled) (.Values.pipelines.enabled) ( index .Values "kube-prometheus-stack" "enabled")}}
You're up and running !

{{- if .Values.jupyterNotebook.enabled }}
1. Jupyter UI is available at:
http://{{ .Values.global.externalHostAddress }}:{{ .Values.jupyterNotebook.service.nodePort }}

{{- end}}
{{- if .Values.nuclio.dashboard.enabled }}
2. Nuclio UI is available at:
http://{{ .Values.global.externalHostAddress }}:{{ .Values.global.nuclio.dashboard.nodePort }}

{{- end}}
{{- if .Values.mlrun.enabled }}
3. MLRun UI is available at:
http://{{ .Values.global.externalHostAddress }}:{{ .Values.mlrun.ui.service.nodePort }}

4. MLRun API is exposed externally at:
http://{{ .Values.global.externalHostAddress }}:{{ .Values.mlrun.api.service.nodePort }}

{{- end}}
{{- if .Values.minio.enabled }}

5. Minio API is exposed externally at:
Expand All @@ -29,18 +32,18 @@ You're up and running !
{{- if .Values.pipelines.enabled }}

7. Pipelines UI is available at:
http://{{ .Values.global.externalHostAddress }}:30100
http://{{ .Values.global.externalHostAddress }}:{{ .Values.pipelines.service.nodePort }}
{{- end }}

{{- if index .Values "kube-prometheus-stack" "enabled" }}

8. Grafana UI is available at:
http://{{ .Values.global.externalHostAddress }}:30110
http://{{ .Values.global.externalHostAddress }}:{{ index .Values "kube-prometheus-stack" "grafana" "service" "nodePort"}}

9. Prometheus UI is available at:
http://{{ .Values.global.externalHostAddress }}:30120
http://{{ .Values.global.externalHostAddress }}:{{ index .Values "kube-prometheus-stack" "prometheus" "service" "nodePort"}}

{{- end }}


Happy MLOPSing !!! :]
{{- end}}
7 changes: 5 additions & 2 deletions charts/mlrun-ce/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{/*
Create fully qualified names.
*/}}

{{- define "mlrun-ce.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
Expand Down Expand Up @@ -118,9 +119,11 @@ Create chart name and version as used by the chart label.
Minio Service URL
*/}}
{{- define "mlrun-ce.minio.service.url" -}}
http://minio.mlrun.svc.cluster.local:{{ .Values.minio.service.port }}
http://minio.{{.Release.Namespace}}.svc.cluster.local:{{ .Values.minio.service.port }}
{{- end -}}
{{- define "mlrun-ce.minio-pipeline.service.url" -}}
minio.{{.Release.Namespace}}.svc.cluster.local
{{- end -}}


{{/*
Mlrun DB labels
Expand Down
10 changes: 10 additions & 0 deletions charts/mlrun-ce/templates/config/jupyter-env-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{ if .Values.jupyterNotebook.enabled}}
apiVersion: v1
kind: ConfigMap
metadata:
name: jupyter-common-env
data:
S3_ENDPOINT_URL: {{ include "mlrun-ce.minio.service.url" . }}
AWS_SECRET_ACCESS_KEY: {{ .Values.minio.rootPassword }}
AWS_ACCESS_KEY_ID: {{ .Values.minio.rootUser }}
{{- end}}
3 changes: 2 additions & 1 deletion charts/mlrun-ce/templates/config/mlrun-env-configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if .Values.mlrun.enabled}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand All @@ -19,4 +20,4 @@ data:
MLRUN_FEATURE_STORE__DEFAULT_TARGETS: parquet
MLRUN_MODEL_ENDPOINT_MONITORING__STORE_TYPE: sql
MLRUN_MODEL_ENDPOINT_MONITORING__ENDPOINT_STORE_CONNECTION: "{{ template "mlrun-ce.mlrun.modelMonitoring.DSN" . }}"

{{- end}}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ kind: ConfigMap
metadata:
name: mlrun-pipelines-config
data:
MLRUN_KFP_URL: http://ml-pipeline.mlrun.svc.cluster.local:8888
MLRUN_KFP_URL: http://ml-pipeline.{{.Release.Namespace}}.svc.cluster.local:8888
{{- end -}}
11 changes: 11 additions & 0 deletions charts/mlrun-ce/templates/jupyter-notebook/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ spec:
{{- if .Values.jupyterNotebook.extraEnv }}
{{ toYaml .Values.jupyterNotebook.extraEnv | nindent 8 }}
{{- end }}
{{- if .Values.jupyterNotebook.extraEnvKeyValue }}
{{- range $name, $value := .Values.jupyterNotebook.extraEnvKeyValue }}
- name: {{ $name }}
value: {{ $value | quote }}
{{- end }}
{{- end }}
{{- if .Values.jupyterNotebook.envFrom }}
envFrom:
{{ toYaml .Values.jupyterNotebook.envFrom | nindent 10 }}
{{- end }}
volumeMounts:
- mountPath: /home/jovyan/data
name: notebooks
Expand All @@ -69,6 +79,7 @@ spec:
name: http
command: [ "start-notebook.sh" ]
args:
- --NotebookApp.allow_origin="*"
- --ip="0.0.0.0"
- --port=8888
- --NotebookApp.token=''
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{- if .Values.pipelines.enabled -}}
apiVersion: v1
data:
minioServiceHost: "{{ .Values.pipelines.minio.endpoint }}"
minioServiceHost: {{ include "mlrun-ce.minio-pipeline.service.url" . }}
minioServicePort: "{{ .Values.pipelines.minio.endpointPort }}"
ConMaxLifeTime: 120s
appName: pipeline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ data:
artifactRepository: |
archiveLogs: true
s3:
endpoint: "{{ .Values.pipelines.minio.endpoint }}:{{ .Values.pipelines.minio.endpointPort }}"
endpoint: "{{ include "mlrun-ce.minio-pipeline.service.url" . }}:{{ .Values.pipelines.minio.endpointPort }}"
bucket: "{{ .Values.pipelines.minio.bucket }}"
insecure: true
accessKeySecret:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.pipelines.enabled -}}
{{- if .Values.pipelines.crd.enabled -}}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.pipelines.enabled -}}
{{- if .Values.pipelines.crd.enabled -}}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.pipelines.enabled -}}
{{- if .Values.pipelines.crd.enabled -}}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.pipelines.enabled -}}
{{- if .Values.pipelines.crd.enabled -}}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.pipelines.enabled -}}
{{- if .Values.pipelines.crd.enabled -}}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.pipelines.enabled -}}
{{- if .Values.pipelines.crd.enabled -}}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.pipelines.enabled -}}
{{- if .Values.pipelines.crd.enabled -}}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
Expand Down
Loading

0 comments on commit bb0cb89

Please sign in to comment.