From 63e3268d63a8af6c505a39a2767849c6631437da Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 18 Oct 2023 19:34:59 -0500 Subject: [PATCH 1/8] fix: all rhods broken things --- components/configs/aggragates/rhods/kustomization.yaml | 1 + .../custom-notebook-images/base/opencv/buildconfig.yaml | 2 +- components/configs/kustomized/rhods/rhods-admins-group.yaml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/configs/aggragates/rhods/kustomization.yaml b/components/configs/aggragates/rhods/kustomization.yaml index bc287a53..edbcd40d 100644 --- a/components/configs/aggragates/rhods/kustomization.yaml +++ b/components/configs/aggragates/rhods/kustomization.yaml @@ -4,6 +4,7 @@ kind: Kustomization resources: - ../../../configs/cluster/console/overlays/default - ../../../operators/rhods-operator/operator/overlays/stable + - ../../../operators/openshift-pipelines-operator-rh/operator/overlays/latest - ../../kustomized/rhods - ../../kustomized/rhods-projects - ../../kustomized/custom-notebook-images/overlays/rhods diff --git a/components/configs/kustomized/custom-notebook-images/base/opencv/buildconfig.yaml b/components/configs/kustomized/custom-notebook-images/base/opencv/buildconfig.yaml index fea1092e..df95fba1 100644 --- a/components/configs/kustomized/custom-notebook-images/base/opencv/buildconfig.yaml +++ b/components/configs/kustomized/custom-notebook-images/base/opencv/buildconfig.yaml @@ -13,7 +13,7 @@ spec: dockerStrategy: from: kind: ImageStreamTag - name: tensorflow:2023.1-cuda-11.8 + name: tensorflow:2023.1 namespace: custom-notebooks dockerfilePath: Containerfile output: diff --git a/components/configs/kustomized/rhods/rhods-admins-group.yaml b/components/configs/kustomized/rhods/rhods-admins-group.yaml index 83ce81e5..00f7b0ba 100644 --- a/components/configs/kustomized/rhods/rhods-admins-group.yaml +++ b/components/configs/kustomized/rhods/rhods-admins-group.yaml @@ -3,5 +3,6 @@ apiVersion: user.openshift.io/v1 metadata: name: rhods-admins users: + - b64:kube:admin - admin - opentlc-mgr From ffb772de601ff00ba2f66bd5829ad0f1ac33704f Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 18 Oct 2023 21:52:27 -0500 Subject: [PATCH 2/8] add: console examples --- clusters/default/kustomization.yaml | 1 + .../configs/cluster/console-samples/kustomization.yaml | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 components/configs/cluster/console-samples/kustomization.yaml diff --git a/clusters/default/kustomization.yaml b/clusters/default/kustomization.yaml index f1d7ad98..0f70b101 100644 --- a/clusters/default/kustomization.yaml +++ b/clusters/default/kustomization.yaml @@ -7,3 +7,4 @@ resources: - ../../components/configs/cluster/rbac/overlays/default - ../../components/operators/web-terminal/operator/overlays/fast - ../../components/configs/cluster/web-terminal/overlays/enhanced +- ../../components/configs/cluster/console-samples diff --git a/components/configs/cluster/console-samples/kustomization.yaml b/components/configs/cluster/console-samples/kustomization.yaml new file mode 100644 index 00000000..1dd8b8f5 --- /dev/null +++ b/components/configs/cluster/console-samples/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: +- sample-build-config-dockerfile.yaml +- sample-custom-s2i-quickstart.yaml From b1986c44a85ff7c520c8c1c4d29bd1bbd955d1bf Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 18 Oct 2023 21:55:58 -0500 Subject: [PATCH 3/8] update: repath --- .../hugepages-1g/hugepages-1g-mcp.yml | 0 .../hugepages-1g/hugepages-1g-ms.yml | 0 .../hugepages-1g/hugepages-1g-tuned-boottime.yml | 0 .../hugepages-2m/hugepages-2m-mc-50.yml | 0 .../hugepages-2m/hugepages-2m-mcp.yml | 0 .../hugepages-2m/hugepages-2m-ms.yml | 0 .../hugepages-2m/hugepages-2m-tuned-boottime.yml | 0 .../configs/cluster/rbac/base/kustomization.yaml | 2 ++ .../cluster/rbac/base/workshop-admins-group.yaml | 5 +++++ .../cluster/rbac/base/workshop-users-group.yaml | 5 +++++ .../default/patch-cluster-admins-group.yaml | 5 ----- .../default/patch-cluster-readers-group.yaml | 3 --- .../cluster/rbac/overlays/rhdp/kustomization.yaml | 14 -------------- .../cluster/rbac/overlays/rhdp/patch-ssh.yaml | 9 --------- .../aggragates => demos}/rhods/kustomization.yaml | 12 ++++++------ .../rhods/patch-workshop-users.yaml | 0 16 files changed, 18 insertions(+), 37 deletions(-) rename components/configs/cluster/{machine => machine-config}/hugepages-1g/hugepages-1g-mcp.yml (100%) rename components/configs/cluster/{machine => machine-config}/hugepages-1g/hugepages-1g-ms.yml (100%) rename components/configs/cluster/{machine => machine-config}/hugepages-1g/hugepages-1g-tuned-boottime.yml (100%) rename components/configs/cluster/{machine => machine-config}/hugepages-2m/hugepages-2m-mc-50.yml (100%) rename components/configs/cluster/{machine => machine-config}/hugepages-2m/hugepages-2m-mcp.yml (100%) rename components/configs/cluster/{machine => machine-config}/hugepages-2m/hugepages-2m-ms.yml (100%) rename components/configs/cluster/{machine => machine-config}/hugepages-2m/hugepages-2m-tuned-boottime.yml (100%) create mode 100644 components/configs/cluster/rbac/base/workshop-admins-group.yaml create mode 100644 components/configs/cluster/rbac/base/workshop-users-group.yaml delete mode 100644 components/configs/cluster/rbac/overlays/default/patch-cluster-admins-group.yaml delete mode 100644 components/configs/cluster/rbac/overlays/default/patch-cluster-readers-group.yaml delete mode 100644 components/configs/cluster/rbac/overlays/rhdp/patch-ssh.yaml rename {components/configs/aggragates => demos}/rhods/kustomization.yaml (52%) rename {components/configs/aggragates => demos}/rhods/patch-workshop-users.yaml (100%) diff --git a/components/configs/cluster/machine/hugepages-1g/hugepages-1g-mcp.yml b/components/configs/cluster/machine-config/hugepages-1g/hugepages-1g-mcp.yml similarity index 100% rename from components/configs/cluster/machine/hugepages-1g/hugepages-1g-mcp.yml rename to components/configs/cluster/machine-config/hugepages-1g/hugepages-1g-mcp.yml diff --git a/components/configs/cluster/machine/hugepages-1g/hugepages-1g-ms.yml b/components/configs/cluster/machine-config/hugepages-1g/hugepages-1g-ms.yml similarity index 100% rename from components/configs/cluster/machine/hugepages-1g/hugepages-1g-ms.yml rename to components/configs/cluster/machine-config/hugepages-1g/hugepages-1g-ms.yml diff --git a/components/configs/cluster/machine/hugepages-1g/hugepages-1g-tuned-boottime.yml b/components/configs/cluster/machine-config/hugepages-1g/hugepages-1g-tuned-boottime.yml similarity index 100% rename from components/configs/cluster/machine/hugepages-1g/hugepages-1g-tuned-boottime.yml rename to components/configs/cluster/machine-config/hugepages-1g/hugepages-1g-tuned-boottime.yml diff --git a/components/configs/cluster/machine/hugepages-2m/hugepages-2m-mc-50.yml b/components/configs/cluster/machine-config/hugepages-2m/hugepages-2m-mc-50.yml similarity index 100% rename from components/configs/cluster/machine/hugepages-2m/hugepages-2m-mc-50.yml rename to components/configs/cluster/machine-config/hugepages-2m/hugepages-2m-mc-50.yml diff --git a/components/configs/cluster/machine/hugepages-2m/hugepages-2m-mcp.yml b/components/configs/cluster/machine-config/hugepages-2m/hugepages-2m-mcp.yml similarity index 100% rename from components/configs/cluster/machine/hugepages-2m/hugepages-2m-mcp.yml rename to components/configs/cluster/machine-config/hugepages-2m/hugepages-2m-mcp.yml diff --git a/components/configs/cluster/machine/hugepages-2m/hugepages-2m-ms.yml b/components/configs/cluster/machine-config/hugepages-2m/hugepages-2m-ms.yml similarity index 100% rename from components/configs/cluster/machine/hugepages-2m/hugepages-2m-ms.yml rename to components/configs/cluster/machine-config/hugepages-2m/hugepages-2m-ms.yml diff --git a/components/configs/cluster/machine/hugepages-2m/hugepages-2m-tuned-boottime.yml b/components/configs/cluster/machine-config/hugepages-2m/hugepages-2m-tuned-boottime.yml similarity index 100% rename from components/configs/cluster/machine/hugepages-2m/hugepages-2m-tuned-boottime.yml rename to components/configs/cluster/machine-config/hugepages-2m/hugepages-2m-tuned-boottime.yml diff --git a/components/configs/cluster/rbac/base/kustomization.yaml b/components/configs/cluster/rbac/base/kustomization.yaml index 0fdddb57..e09f5eb2 100644 --- a/components/configs/cluster/rbac/base/kustomization.yaml +++ b/components/configs/cluster/rbac/base/kustomization.yaml @@ -4,5 +4,7 @@ kind: Kustomization resources: - 99-master-ssh-machineconfig.yaml - 99-worker-ssh-machineconfig.yaml + - workshop-admins-group.yaml + - workshop-users-group.yaml # see components/configs/namespaces/base # - self-provisioner-clusterrolebinding.yaml diff --git a/components/configs/cluster/rbac/base/workshop-admins-group.yaml b/components/configs/cluster/rbac/base/workshop-admins-group.yaml new file mode 100644 index 00000000..6de19b7b --- /dev/null +++ b/components/configs/cluster/rbac/base/workshop-admins-group.yaml @@ -0,0 +1,5 @@ +kind: Group +apiVersion: user.openshift.io/v1 +metadata: + name: workshop-admins +users: [] diff --git a/components/configs/cluster/rbac/base/workshop-users-group.yaml b/components/configs/cluster/rbac/base/workshop-users-group.yaml new file mode 100644 index 00000000..2cd930c0 --- /dev/null +++ b/components/configs/cluster/rbac/base/workshop-users-group.yaml @@ -0,0 +1,5 @@ +kind: Group +apiVersion: user.openshift.io/v1 +metadata: + name: workshop-users +users: [] diff --git a/components/configs/cluster/rbac/overlays/default/patch-cluster-admins-group.yaml b/components/configs/cluster/rbac/overlays/default/patch-cluster-admins-group.yaml deleted file mode 100644 index c6eccb94..00000000 --- a/components/configs/cluster/rbac/overlays/default/patch-cluster-admins-group.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- op: add - path: /users - value: - - admin - - opentlc-mgr diff --git a/components/configs/cluster/rbac/overlays/default/patch-cluster-readers-group.yaml b/components/configs/cluster/rbac/overlays/default/patch-cluster-readers-group.yaml deleted file mode 100644 index 79a54cba..00000000 --- a/components/configs/cluster/rbac/overlays/default/patch-cluster-readers-group.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- op: replace - path: /users - value: [] diff --git a/components/configs/cluster/rbac/overlays/rhdp/kustomization.yaml b/components/configs/cluster/rbac/overlays/rhdp/kustomization.yaml index 63903420..0166df58 100644 --- a/components/configs/cluster/rbac/overlays/rhdp/kustomization.yaml +++ b/components/configs/cluster/rbac/overlays/rhdp/kustomization.yaml @@ -7,17 +7,3 @@ resources: - cluster-admins-custom-rolebinding.yaml - cluster-readers-custom-group.yaml - cluster-readers-custom-rolebinding.yaml - -patches: - - target: - group: machineconfiguration.openshift.io - version: v1 - kind: MachineConfig - name: 99-master-ssh - path: patch-ssh.yaml - - target: - group: machineconfiguration.openshift.io - version: v1 - kind: MachineConfig - name: 99-worker-ssh - path: patch-ssh.yaml diff --git a/components/configs/cluster/rbac/overlays/rhdp/patch-ssh.yaml b/components/configs/cluster/rbac/overlays/rhdp/patch-ssh.yaml deleted file mode 100644 index 5302ff80..00000000 --- a/components/configs/cluster/rbac/overlays/rhdp/patch-ssh.yaml +++ /dev/null @@ -1,9 +0,0 @@ -- op: remove - path: /spec/config/passwd/users/0/sshAuthorizedKeys/0 - -- op: add - path: /spec/config/passwd/users/0/sshAuthorizedKeys/- - value: >- - ssh-rsa - AAAAB3NzaC1yc2EAAAADAQABAAABgQC5Ydtf2FA4Pj48KO7bhg0X3OWOA9Fx38RcCMumr+s6Pr4T30tbdp9qyu4036yl4wUoXMKQW5Ql5pKBy+6APdG/E7xAf8W9IV1MKxuwtg9kuYKmKL9YbPZ4C37p/OaudZp2iiubBxCDa4CM7sX+DgUKq7uVCH0L1ukYqwciv9eF4FRSK4ARn+TQ8Zx3tMX/VTUniriDKOBbTWqQpqPTxT+oW5hypEtei89si8jB/7wtm1TngzQlVOcHYCT/x14r0INJJpX8gvkEr7f1aZPwsPsULxYrskuitXEK0MzZcRjh6xtVq5e/8T6M1pdY4k4m7BK6m5NY1prL25ELtuOYYgJAfpuUc0z+pt0mhGv5CbFAf86E4VkIWn1wo7GbtSKgc8p0TeCOYQIslzN1MH8O/BZW1WyAsQJXaodfoAbm0UTsP32G+1mzM1d4yL8smw1SJdg+BbCAtVBhMaELMI3993jkO93RM/KNNYKNQKU1krC3+HuxYtGqnBb5TTDXMTvg/FU= - koree@macntoss.sgu diff --git a/components/configs/aggragates/rhods/kustomization.yaml b/demos/rhods/kustomization.yaml similarity index 52% rename from components/configs/aggragates/rhods/kustomization.yaml rename to demos/rhods/kustomization.yaml index edbcd40d..c63319a9 100644 --- a/components/configs/aggragates/rhods/kustomization.yaml +++ b/demos/rhods/kustomization.yaml @@ -2,12 +2,12 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - ../../../configs/cluster/console/overlays/default - - ../../../operators/rhods-operator/operator/overlays/stable - - ../../../operators/openshift-pipelines-operator-rh/operator/overlays/latest - - ../../kustomized/rhods - - ../../kustomized/rhods-projects - - ../../kustomized/custom-notebook-images/overlays/rhods + - ../../clusters/default + - ../../components/operators/rhods-operator/operator/overlays/stable + - ../../components/operators/openshift-pipelines-operator-rh/operator/overlays/latest + - ../../components/configs/kustomized/rhods + - ../../components/configs/kustomized/rhods-projects + - ../../components/configs/kustomized/custom-notebook-images/overlays/rhods patches: - target: diff --git a/components/configs/aggragates/rhods/patch-workshop-users.yaml b/demos/rhods/patch-workshop-users.yaml similarity index 100% rename from components/configs/aggragates/rhods/patch-workshop-users.yaml rename to demos/rhods/patch-workshop-users.yaml From bedff953632478f394bababfcc580916d277e8dc Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 18 Oct 2023 22:43:56 -0500 Subject: [PATCH 4/8] update: custom serving runtime --- .../kustomized/model-serving-runtime/NOTES.md | 5 + .../model-serving-runtime/kustomization.yaml | 5 + .../triton/kustomization.yaml | 5 + .../triton/serving-runtime.yaml | 112 ++++++++++++++++++ demos/rhods/kustomization.yaml | 1 + .../workshop-users/admin-rolebinding.yaml | 0 .../workshop-users/kustomization.yaml | 0 .../workshops/workshop-users/namespace.yaml | 0 .../workshop-users/workshop-admins-group.yaml | 0 .../workshop-users/workshop-users-group.yaml | 0 10 files changed, 128 insertions(+) create mode 100644 components/configs/kustomized/model-serving-runtime/NOTES.md create mode 100644 components/configs/kustomized/model-serving-runtime/kustomization.yaml create mode 100644 components/configs/kustomized/model-serving-runtime/triton/kustomization.yaml create mode 100644 components/configs/kustomized/model-serving-runtime/triton/serving-runtime.yaml rename {components/configs => dump}/workshops/workshop-users/admin-rolebinding.yaml (100%) rename {components/configs => dump}/workshops/workshop-users/kustomization.yaml (100%) rename {components/configs => dump}/workshops/workshop-users/namespace.yaml (100%) rename {components/configs => dump}/workshops/workshop-users/workshop-admins-group.yaml (100%) rename {components/configs => dump}/workshops/workshop-users/workshop-users-group.yaml (100%) diff --git a/components/configs/kustomized/model-serving-runtime/NOTES.md b/components/configs/kustomized/model-serving-runtime/NOTES.md new file mode 100644 index 00000000..b950aaf5 --- /dev/null +++ b/components/configs/kustomized/model-serving-runtime/NOTES.md @@ -0,0 +1,5 @@ +# Notes + +## Links + +- https://github.com/jharmison-redhat/custom-serving-runtime-gitops/tree/main/bases/custom-serving-runtime diff --git a/components/configs/kustomized/model-serving-runtime/kustomization.yaml b/components/configs/kustomized/model-serving-runtime/kustomization.yaml new file mode 100644 index 00000000..b343c809 --- /dev/null +++ b/components/configs/kustomized/model-serving-runtime/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: +- triton diff --git a/components/configs/kustomized/model-serving-runtime/triton/kustomization.yaml b/components/configs/kustomized/model-serving-runtime/triton/kustomization.yaml new file mode 100644 index 00000000..ed539a59 --- /dev/null +++ b/components/configs/kustomized/model-serving-runtime/triton/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: +- serving-runtime.yaml diff --git a/components/configs/kustomized/model-serving-runtime/triton/serving-runtime.yaml b/components/configs/kustomized/model-serving-runtime/triton/serving-runtime.yaml new file mode 100644 index 00000000..1d8a8f37 --- /dev/null +++ b/components/configs/kustomized/model-serving-runtime/triton/serving-runtime.yaml @@ -0,0 +1,112 @@ +apiVersion: template.openshift.io/v1 +kind: Template +metadata: + annotations: + opendatahub.io/template-enabled: "true" + tags: triton-23.05,servingruntime + argocd.argoproj.io/sync-wave: "2" + description: Nvidia Triton Inference Server Runtime Definition + labels: + opendatahub.io/configurable: "true" + opendatahub.io/dashboard: "true" + # opendatahub.io/ootb: "true" + name: triton + namespace: redhat-ods-applications +objects: + - apiVersion: serving.kserve.io/v1alpha1 + kind: ServingRuntime + metadata: + name: triton + labels: + name: triton + annotations: + maxLoadingConcurrency: "2" + openshift.io/display-name: "Nvidia Triton Model Server" + spec: + supportedModelFormats: + - name: keras + version: "2" + autoSelect: true + - name: onnx + version: "1" + autoSelect: true + - name: pytorch + version: "1" + autoSelect: true + - name: tensorflow + version: "1" + autoSelect: true + - name: tensorflow + version: "2" + autoSelect: true + - name: tensorrt + version: "7" + autoSelect: true + + protocolVersions: + - grpc-v2 + multiModel: true + + grpcEndpoint: "port:8085" + grpcDataEndpoint: "port:8001" + + volumes: + - name: shm + emptyDir: + medium: Memory + sizeLimit: 2Gi + containers: + - name: triton + image: nvcr.io/nvidia/tritonserver:23.05-py3 + command: + - /bin/sh + - -c + - | + #!/bin/sh + mkdir -p /models/_triton_models + + chmod 775 /models/_triton_models + exec tritonserver \ + --model-repository=/models/_triton_models \ + --model-control-mode=explicit \ + --strict-model-config=false \ + --strict-readiness=false \ + --allow-http=true \ + --allow-sagemaker=false + + volumeMounts: + - name: shm + mountPath: /dev/shm + resources: + requests: + cpu: 500m + memory: 1Gi + limits: + cpu: "5" + memory: 2Gi + livenessProbe: + # the server is listening only on 127.0.0.1, so an httpGet probe sent + # from the kublet running on the node cannot connect to the server + # (not even with the Host header or host field) + # exec a curl call to have the request originate from localhost in the + # container + exec: + command: + - /bin/sh + - -c + - | + curl \ + --fail \ + --silent \ + --show-error \ + --max-time \ + "9" \ + http://localhost:8000/v2/health/live + initialDelaySeconds: 5 + periodSeconds: 30 + timeoutSeconds: 10 + builtInAdapter: + serverType: triton + runtimeManagementPort: 8001 + memBufferBytes: 134217728 + modelLoadingTimeoutMillis: 90000 diff --git a/demos/rhods/kustomization.yaml b/demos/rhods/kustomization.yaml index c63319a9..8a9d31ac 100644 --- a/demos/rhods/kustomization.yaml +++ b/demos/rhods/kustomization.yaml @@ -8,6 +8,7 @@ resources: - ../../components/configs/kustomized/rhods - ../../components/configs/kustomized/rhods-projects - ../../components/configs/kustomized/custom-notebook-images/overlays/rhods + - ../../components/configs/kustomized/model-serving-runtime patches: - target: diff --git a/components/configs/workshops/workshop-users/admin-rolebinding.yaml b/dump/workshops/workshop-users/admin-rolebinding.yaml similarity index 100% rename from components/configs/workshops/workshop-users/admin-rolebinding.yaml rename to dump/workshops/workshop-users/admin-rolebinding.yaml diff --git a/components/configs/workshops/workshop-users/kustomization.yaml b/dump/workshops/workshop-users/kustomization.yaml similarity index 100% rename from components/configs/workshops/workshop-users/kustomization.yaml rename to dump/workshops/workshop-users/kustomization.yaml diff --git a/components/configs/workshops/workshop-users/namespace.yaml b/dump/workshops/workshop-users/namespace.yaml similarity index 100% rename from components/configs/workshops/workshop-users/namespace.yaml rename to dump/workshops/workshop-users/namespace.yaml diff --git a/components/configs/workshops/workshop-users/workshop-admins-group.yaml b/dump/workshops/workshop-users/workshop-admins-group.yaml similarity index 100% rename from components/configs/workshops/workshop-users/workshop-admins-group.yaml rename to dump/workshops/workshop-users/workshop-admins-group.yaml diff --git a/components/configs/workshops/workshop-users/workshop-users-group.yaml b/dump/workshops/workshop-users/workshop-users-group.yaml similarity index 100% rename from components/configs/workshops/workshop-users/workshop-users-group.yaml rename to dump/workshops/workshop-users/workshop-users-group.yaml From e3e726822103fd9e1811d37c637a325da5a21177 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 18 Oct 2023 23:01:44 -0500 Subject: [PATCH 5/8] update: rhods example projects --- components/configs/kustomized/minio/namespace.yaml | 2 +- components/configs/kustomized/minio/setup-job.yaml | 2 +- .../rhods-projects/group-project/admin-rolebinding.yaml | 1 - .../rhods-projects/group-project/edit-rolebinding.yaml | 1 - .../kustomized/rhods-projects/group-project/kustomization.yaml | 2 ++ .../kustomized/rhods-projects/group-project/limit-range.yaml | 1 - .../kustomized/rhods-projects/group-project/namespace.yaml | 2 +- .../configs/kustomized/rhods-projects/group-project/quota.yaml | 2 -- .../rhods-projects/individual-project/admin-rolebinding.yaml | 1 - .../rhods-projects/individual-project/kustomization.yaml | 2 ++ .../kustomized/rhods-projects/individual-project/namespace.yaml | 2 +- .../rhods-projects/secret-project/admin-rolebinding.yaml | 1 - .../kustomized/rhods-projects/secret-project/kustomization.yaml | 2 ++ .../kustomized/rhods-projects/secret-project/namespace.yaml | 2 +- demos/rhods/kustomization.yaml | 2 +- 15 files changed, 12 insertions(+), 13 deletions(-) diff --git a/components/configs/kustomized/minio/namespace.yaml b/components/configs/kustomized/minio/namespace.yaml index e9974b1f..a2585275 100644 --- a/components/configs/kustomized/minio/namespace.yaml +++ b/components/configs/kustomized/minio/namespace.yaml @@ -6,5 +6,5 @@ metadata: labels: app: minio annotations: - openshift.io/display-name: "MinIO Object Storage" + openshift.io/display-name: "Minio Object Storage" argocd.argoproj.io/sync-wave: "0" diff --git a/components/configs/kustomized/minio/setup-job.yaml b/components/configs/kustomized/minio/setup-job.yaml index 6a655110..e714b00d 100644 --- a/components/configs/kustomized/minio/setup-job.yaml +++ b/components/configs/kustomized/minio/setup-job.yaml @@ -19,7 +19,7 @@ spec: args: - -ec - |- - if [ -n "$(oc get secret minio-root-user -oname 2>/dev/null)" ]; then + if [ -n "$(oc get secret minio-root-user -o name 2>/dev/null)" ]; then echo "Secret already exists. Skipping." >&2 exit 0 fi diff --git a/components/configs/kustomized/rhods-projects/group-project/admin-rolebinding.yaml b/components/configs/kustomized/rhods-projects/group-project/admin-rolebinding.yaml index 82b242ba..1fcd6391 100644 --- a/components/configs/kustomized/rhods-projects/group-project/admin-rolebinding.yaml +++ b/components/configs/kustomized/rhods-projects/group-project/admin-rolebinding.yaml @@ -2,7 +2,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: group-project-admin-rolebinding - namespace: group-project roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole diff --git a/components/configs/kustomized/rhods-projects/group-project/edit-rolebinding.yaml b/components/configs/kustomized/rhods-projects/group-project/edit-rolebinding.yaml index b31e304e..f912f1fa 100644 --- a/components/configs/kustomized/rhods-projects/group-project/edit-rolebinding.yaml +++ b/components/configs/kustomized/rhods-projects/group-project/edit-rolebinding.yaml @@ -2,7 +2,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: group-project-edit-rolebinding - namespace: group-project roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole diff --git a/components/configs/kustomized/rhods-projects/group-project/kustomization.yaml b/components/configs/kustomized/rhods-projects/group-project/kustomization.yaml index aa68f016..aa5fa3d0 100644 --- a/components/configs/kustomized/rhods-projects/group-project/kustomization.yaml +++ b/components/configs/kustomized/rhods-projects/group-project/kustomization.yaml @@ -1,6 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +namespace: ds-group-project + resources: - admin-rolebinding.yaml - edit-rolebinding.yaml diff --git a/components/configs/kustomized/rhods-projects/group-project/limit-range.yaml b/components/configs/kustomized/rhods-projects/group-project/limit-range.yaml index 146131eb..9aaa3902 100644 --- a/components/configs/kustomized/rhods-projects/group-project/limit-range.yaml +++ b/components/configs/kustomized/rhods-projects/group-project/limit-range.yaml @@ -2,7 +2,6 @@ apiVersion: v1 kind: LimitRange metadata: name: group-project-limit-range - namespace: group-project spec: limits: - type: Container diff --git a/components/configs/kustomized/rhods-projects/group-project/namespace.yaml b/components/configs/kustomized/rhods-projects/group-project/namespace.yaml index 03e34caf..64b037ea 100644 --- a/components/configs/kustomized/rhods-projects/group-project/namespace.yaml +++ b/components/configs/kustomized/rhods-projects/group-project/namespace.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Namespace metadata: - name: group-project + name: ds-group-project annotations: openshift.io/description: | A friendly, open project to allow collaboration around unrestricted data diff --git a/components/configs/kustomized/rhods-projects/group-project/quota.yaml b/components/configs/kustomized/rhods-projects/group-project/quota.yaml index 75b5a801..ebb63719 100644 --- a/components/configs/kustomized/rhods-projects/group-project/quota.yaml +++ b/components/configs/kustomized/rhods-projects/group-project/quota.yaml @@ -3,7 +3,6 @@ apiVersion: v1 kind: ResourceQuota metadata: name: group-project-quota-compute - namespace: group-project spec: hard: # requests.cpu: '1' @@ -15,7 +14,6 @@ apiVersion: v1 kind: ResourceQuota metadata: name: group-project-quota-storage - namespace: group-project spec: hard: requests.storage: 100Gi diff --git a/components/configs/kustomized/rhods-projects/individual-project/admin-rolebinding.yaml b/components/configs/kustomized/rhods-projects/individual-project/admin-rolebinding.yaml index 8f7da161..7a8021eb 100644 --- a/components/configs/kustomized/rhods-projects/individual-project/admin-rolebinding.yaml +++ b/components/configs/kustomized/rhods-projects/individual-project/admin-rolebinding.yaml @@ -2,7 +2,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: individual-project-admin-rolebinding - namespace: individual-project roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole diff --git a/components/configs/kustomized/rhods-projects/individual-project/kustomization.yaml b/components/configs/kustomized/rhods-projects/individual-project/kustomization.yaml index a3d734d8..1931fedb 100644 --- a/components/configs/kustomized/rhods-projects/individual-project/kustomization.yaml +++ b/components/configs/kustomized/rhods-projects/individual-project/kustomization.yaml @@ -1,6 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +namespace: ds-individual-project + resources: - admin-rolebinding.yaml - namespace.yaml diff --git a/components/configs/kustomized/rhods-projects/individual-project/namespace.yaml b/components/configs/kustomized/rhods-projects/individual-project/namespace.yaml index 95a67fb3..e5c3a36d 100644 --- a/components/configs/kustomized/rhods-projects/individual-project/namespace.yaml +++ b/components/configs/kustomized/rhods-projects/individual-project/namespace.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Namespace metadata: - name: individual-project + name: ds-individual-project annotations: openshift.io/description: | A personal project to explore alone diff --git a/components/configs/kustomized/rhods-projects/secret-project/admin-rolebinding.yaml b/components/configs/kustomized/rhods-projects/secret-project/admin-rolebinding.yaml index 3fe438fb..58c49940 100644 --- a/components/configs/kustomized/rhods-projects/secret-project/admin-rolebinding.yaml +++ b/components/configs/kustomized/rhods-projects/secret-project/admin-rolebinding.yaml @@ -2,7 +2,6 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: secret-project-admin-rolebinding - namespace: secret-project roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole diff --git a/components/configs/kustomized/rhods-projects/secret-project/kustomization.yaml b/components/configs/kustomized/rhods-projects/secret-project/kustomization.yaml index a3d734d8..c96706b7 100644 --- a/components/configs/kustomized/rhods-projects/secret-project/kustomization.yaml +++ b/components/configs/kustomized/rhods-projects/secret-project/kustomization.yaml @@ -1,6 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +namespace: ds-secret-project + resources: - admin-rolebinding.yaml - namespace.yaml diff --git a/components/configs/kustomized/rhods-projects/secret-project/namespace.yaml b/components/configs/kustomized/rhods-projects/secret-project/namespace.yaml index 06591f9a..eb57097d 100644 --- a/components/configs/kustomized/rhods-projects/secret-project/namespace.yaml +++ b/components/configs/kustomized/rhods-projects/secret-project/namespace.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Namespace metadata: - name: secret-project + name: ds-secret-project annotations: openshift.io/description: | A secret project to explore dark rainbows in space diff --git a/demos/rhods/kustomization.yaml b/demos/rhods/kustomization.yaml index 8a9d31ac..b0d6a6a6 100644 --- a/demos/rhods/kustomization.yaml +++ b/demos/rhods/kustomization.yaml @@ -9,6 +9,7 @@ resources: - ../../components/configs/kustomized/rhods-projects - ../../components/configs/kustomized/custom-notebook-images/overlays/rhods - ../../components/configs/kustomized/model-serving-runtime + - ../../components/configs/kustomized/minio patches: - target: @@ -20,7 +21,6 @@ patches: value: 'DEMO: Red Hat Open Data Science (RHODS)' - target: group: user.openshift.io - version: v1 kind: Group name: workshop-users path: patch-workshop-users.yaml From 7a6eab5b67e5bd7d4ca4ced64358e2dd42054e0e Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 18 Oct 2023 23:42:20 -0500 Subject: [PATCH 6/8] fix: all rhods --- .../rhods-model-instances/kustomization.yaml | 8 +++ .../openvino}/inference.yaml | 4 +- .../openvino}/kustomization.yaml | 2 + .../openvino}/runtime.yaml | 6 +-- .../triton/inference.yaml | 21 ++++++++ .../triton/kustomization.yaml | 8 +++ .../rhods-model-instances/triton/runtime.yaml | 54 +++++++++++++++++++ .../NOTES.md | 0 .../kustomization.yaml | 2 + .../triton/kustomization.yaml | 2 +- .../triton/runtime-template.yaml} | 12 ++--- demos/rhods/kustomization.yaml | 3 +- 12 files changed, 108 insertions(+), 14 deletions(-) create mode 100644 components/configs/kustomized/rhods-model-instances/kustomization.yaml rename components/configs/kustomized/{model-server => rhods-model-instances/openvino}/inference.yaml (90%) rename components/configs/kustomized/{model-server => rhods-model-instances/openvino}/kustomization.yaml (78%) rename components/configs/kustomized/{model-server => rhods-model-instances/openvino}/runtime.yaml (94%) create mode 100644 components/configs/kustomized/rhods-model-instances/triton/inference.yaml create mode 100644 components/configs/kustomized/rhods-model-instances/triton/kustomization.yaml create mode 100644 components/configs/kustomized/rhods-model-instances/triton/runtime.yaml rename components/configs/kustomized/{model-serving-runtime => rhods-model-runtimes}/NOTES.md (100%) rename components/configs/kustomized/{model-serving-runtime => rhods-model-runtimes}/kustomization.yaml (70%) rename components/configs/kustomized/{model-serving-runtime => rhods-model-runtimes}/triton/kustomization.yaml (76%) rename components/configs/kustomized/{model-serving-runtime/triton/serving-runtime.yaml => rhods-model-runtimes/triton/runtime-template.yaml} (92%) diff --git a/components/configs/kustomized/rhods-model-instances/kustomization.yaml b/components/configs/kustomized/rhods-model-instances/kustomization.yaml new file mode 100644 index 00000000..b837fb45 --- /dev/null +++ b/components/configs/kustomized/rhods-model-instances/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: ds-group-project + +resources: +- openvino +- triton diff --git a/components/configs/kustomized/model-server/inference.yaml b/components/configs/kustomized/rhods-model-instances/openvino/inference.yaml similarity index 90% rename from components/configs/kustomized/model-server/inference.yaml rename to components/configs/kustomized/rhods-model-instances/openvino/inference.yaml index 3eeefb0e..02cf13bd 100644 --- a/components/configs/kustomized/model-server/inference.yaml +++ b/components/configs/kustomized/rhods-model-instances/openvino/inference.yaml @@ -8,14 +8,14 @@ metadata: labels: name: stocks opendatahub.io/dashboard: "true" - name: stocks + name: openvino-stocks spec: predictor: model: modelFormat: name: onnx version: "1" - runtime: stocks + runtime: vino storage: key: minio-connection path: stocks.onnx \ No newline at end of file diff --git a/components/configs/kustomized/model-server/kustomization.yaml b/components/configs/kustomized/rhods-model-instances/openvino/kustomization.yaml similarity index 78% rename from components/configs/kustomized/model-server/kustomization.yaml rename to components/configs/kustomized/rhods-model-instances/openvino/kustomization.yaml index 58c9c20d..0dc50166 100644 --- a/components/configs/kustomized/model-server/kustomization.yaml +++ b/components/configs/kustomized/rhods-model-instances/openvino/kustomization.yaml @@ -1,6 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +namespace: ds-group-project + resources: - inference.yaml - runtime.yaml diff --git a/components/configs/kustomized/model-server/runtime.yaml b/components/configs/kustomized/rhods-model-instances/openvino/runtime.yaml similarity index 94% rename from components/configs/kustomized/model-server/runtime.yaml rename to components/configs/kustomized/rhods-model-instances/openvino/runtime.yaml index 9152d92d..07a89ef5 100644 --- a/components/configs/kustomized/model-server/runtime.yaml +++ b/components/configs/kustomized/rhods-model-instances/openvino/runtime.yaml @@ -8,11 +8,11 @@ metadata: opendatahub.io/disable-gpu: "true" opendatahub.io/template-display-name: OpenVINO Model Server opendatahub.io/template-name: ovms - openshift.io/display-name: stocks + openshift.io/display-name: vino labels: - name: stocks + name: vino opendatahub.io/dashboard: "true" - name: stocks + name: vino spec: builtInAdapter: memBufferBytes: 134217728 diff --git a/components/configs/kustomized/rhods-model-instances/triton/inference.yaml b/components/configs/kustomized/rhods-model-instances/triton/inference.yaml new file mode 100644 index 00000000..6c7bd605 --- /dev/null +++ b/components/configs/kustomized/rhods-model-instances/triton/inference.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: serving.kserve.io/v1beta1 +kind: InferenceService +metadata: + annotations: + openshift.io/display-name: stocks + serving.kserve.io/deploymentMode: ModelMesh + labels: + name: stocks + opendatahub.io/dashboard: "true" + name: triton-stocks +spec: + predictor: + model: + modelFormat: + name: tensorflow + version: "1" + runtime: triton + storage: + key: minio-connection + path: stocks.onnx \ No newline at end of file diff --git a/components/configs/kustomized/rhods-model-instances/triton/kustomization.yaml b/components/configs/kustomized/rhods-model-instances/triton/kustomization.yaml new file mode 100644 index 00000000..0dc50166 --- /dev/null +++ b/components/configs/kustomized/rhods-model-instances/triton/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: ds-group-project + +resources: +- inference.yaml +- runtime.yaml diff --git a/components/configs/kustomized/rhods-model-instances/triton/runtime.yaml b/components/configs/kustomized/rhods-model-instances/triton/runtime.yaml new file mode 100644 index 00000000..89c09ba4 --- /dev/null +++ b/components/configs/kustomized/rhods-model-instances/triton/runtime.yaml @@ -0,0 +1,54 @@ +--- +apiVersion: serving.kserve.io/v1alpha1 +kind: ServingRuntime +metadata: + annotations: + enable-auth: "false" + enable-route: "false" + opendatahub.io/disable-gpu: "true" + opendatahub.io/template-display-name: OpenVINO Model Server + opendatahub.io/template-name: triton + openshift.io/display-name: trition + labels: + name: triton + opendatahub.io/dashboard: "true" + name: triton +spec: + builtInAdapter: + memBufferBytes: 134217728 + modelLoadingTimeoutMillis: 90000 + runtimeManagementPort: 8888 + serverType: ovms + containers: + - args: + - --port=8001 + - --rest_port=8888 + - --config_path=/models/model_config_list.json + - --file_system_poll_wait_seconds=0 + - --grpc_bind_address=127.0.0.1 + - --rest_bind_address=127.0.0.1 + image: quay.io/opendatahub/openvino_model_server@sha256:20dbfbaf53d1afbd47c612d953984238cb0e207972ed544a5ea662c2404f276d + name: ovms + resources: + limits: + cpu: "2" + memory: 8Gi + requests: + cpu: "1" + memory: 4Gi + grpcDataEndpoint: port:8001 + grpcEndpoint: port:8085 + multiModel: true + protocolVersions: + - grpc-v1 + replicas: 1 + supportedModelFormats: + - autoSelect: true + name: openvino_ir + version: opset1 + - autoSelect: true + name: onnx + version: "1" + - autoSelect: true + name: tensorflow + version: "2" diff --git a/components/configs/kustomized/model-serving-runtime/NOTES.md b/components/configs/kustomized/rhods-model-runtimes/NOTES.md similarity index 100% rename from components/configs/kustomized/model-serving-runtime/NOTES.md rename to components/configs/kustomized/rhods-model-runtimes/NOTES.md diff --git a/components/configs/kustomized/model-serving-runtime/kustomization.yaml b/components/configs/kustomized/rhods-model-runtimes/kustomization.yaml similarity index 70% rename from components/configs/kustomized/model-serving-runtime/kustomization.yaml rename to components/configs/kustomized/rhods-model-runtimes/kustomization.yaml index b343c809..3a80eadb 100644 --- a/components/configs/kustomized/model-serving-runtime/kustomization.yaml +++ b/components/configs/kustomized/rhods-model-runtimes/kustomization.yaml @@ -1,5 +1,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +namespace: redhat-ods-applications + resources: - triton diff --git a/components/configs/kustomized/model-serving-runtime/triton/kustomization.yaml b/components/configs/kustomized/rhods-model-runtimes/triton/kustomization.yaml similarity index 76% rename from components/configs/kustomized/model-serving-runtime/triton/kustomization.yaml rename to components/configs/kustomized/rhods-model-runtimes/triton/kustomization.yaml index ed539a59..644134a0 100644 --- a/components/configs/kustomized/model-serving-runtime/triton/kustomization.yaml +++ b/components/configs/kustomized/rhods-model-runtimes/triton/kustomization.yaml @@ -2,4 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- serving-runtime.yaml +- runtime-template.yaml diff --git a/components/configs/kustomized/model-serving-runtime/triton/serving-runtime.yaml b/components/configs/kustomized/rhods-model-runtimes/triton/runtime-template.yaml similarity index 92% rename from components/configs/kustomized/model-serving-runtime/triton/serving-runtime.yaml rename to components/configs/kustomized/rhods-model-runtimes/triton/runtime-template.yaml index 1d8a8f37..59723c37 100644 --- a/components/configs/kustomized/model-serving-runtime/triton/serving-runtime.yaml +++ b/components/configs/kustomized/rhods-model-runtimes/triton/runtime-template.yaml @@ -7,11 +7,10 @@ metadata: argocd.argoproj.io/sync-wave: "2" description: Nvidia Triton Inference Server Runtime Definition labels: - opendatahub.io/configurable: "true" - opendatahub.io/dashboard: "true" - # opendatahub.io/ootb: "true" + opendatahub.io/configurable: "true" + opendatahub.io/dashboard: "true" + # opendatahub.io/ootb: "true" name: triton - namespace: redhat-ods-applications objects: - apiVersion: serving.kserve.io/v1alpha1 kind: ServingRuntime @@ -73,7 +72,7 @@ objects: --strict-readiness=false \ --allow-http=true \ --allow-sagemaker=false - + volumeMounts: - name: shm mountPath: /dev/shm @@ -99,8 +98,7 @@ objects: --fail \ --silent \ --show-error \ - --max-time \ - "9" \ + --max-time "8" \ http://localhost:8000/v2/health/live initialDelaySeconds: 5 periodSeconds: 30 diff --git a/demos/rhods/kustomization.yaml b/demos/rhods/kustomization.yaml index b0d6a6a6..24706eac 100644 --- a/demos/rhods/kustomization.yaml +++ b/demos/rhods/kustomization.yaml @@ -7,8 +7,9 @@ resources: - ../../components/operators/openshift-pipelines-operator-rh/operator/overlays/latest - ../../components/configs/kustomized/rhods - ../../components/configs/kustomized/rhods-projects + - ../../components/configs/kustomized/rhods-model-runtimes + # - ../../components/configs/kustomized/rhods-model-instances - ../../components/configs/kustomized/custom-notebook-images/overlays/rhods - - ../../components/configs/kustomized/model-serving-runtime - ../../components/configs/kustomized/minio patches: From 1a0449d4bb9e01a1e05f205b36faa23e6d7533cd Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Thu, 19 Oct 2023 08:41:11 -0500 Subject: [PATCH 7/8] update: rhods demo --- .../kustomized/minio/data-connector-rb.yaml | 15 ++++ .../kustomized/minio/kustomization.yaml | 5 +- ...etup-job.yaml => setup-root-user-job.yaml} | 15 +++- .../create-data-connection-job.yaml | 88 +++++++++++++++++++ .../rhods-data-connector/kustomization.yaml | 7 ++ .../base}/kustomization.yaml | 0 .../base}/notebook.yaml | 7 +- .../base}/pvc.yaml | 0 .../rhods-notebook/kustomization.yaml | 5 ++ .../overlays/default/kustomization.yaml | 7 ++ demos/rhods/kustomization.yaml | 2 + 11 files changed, 142 insertions(+), 9 deletions(-) create mode 100644 components/configs/kustomized/minio/data-connector-rb.yaml rename components/configs/kustomized/minio/{setup-job.yaml => setup-root-user-job.yaml} (84%) create mode 100644 components/configs/kustomized/rhods-data-connector/create-data-connection-job.yaml create mode 100644 components/configs/kustomized/rhods-data-connector/kustomization.yaml rename components/configs/kustomized/{notebook => rhods-notebook/base}/kustomization.yaml (100%) rename components/configs/kustomized/{notebook => rhods-notebook/base}/notebook.yaml (97%) rename components/configs/kustomized/{notebook => rhods-notebook/base}/pvc.yaml (100%) create mode 100644 components/configs/kustomized/rhods-notebook/kustomization.yaml create mode 100644 components/configs/kustomized/rhods-notebook/overlays/default/kustomization.yaml diff --git a/components/configs/kustomized/minio/data-connector-rb.yaml b/components/configs/kustomized/minio/data-connector-rb.yaml new file mode 100644 index 00000000..050dfa3d --- /dev/null +++ b/components/configs/kustomized/minio/data-connector-rb.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + annotations: + argocd.argoproj.io/sync-wave: "1" + name: data-connector-setup-edit +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: edit +subjects: +- kind: ServiceAccount + name: data-connector-setup + namespace: ds-group-project diff --git a/components/configs/kustomized/minio/kustomization.yaml b/components/configs/kustomized/minio/kustomization.yaml index 97852671..4dea5d23 100644 --- a/components/configs/kustomized/minio/kustomization.yaml +++ b/components/configs/kustomized/minio/kustomization.yaml @@ -11,10 +11,11 @@ commonLabels: # app.kubernetes.io/part-of: minio resources: +- data-connector-rb.yaml - deployment.yaml - namespace.yaml - pvc.yaml - route.yaml -- secret.yaml +# - secret.yaml - service.yaml -# - setup-job.yaml +- setup-root-user-job.yaml diff --git a/components/configs/kustomized/minio/setup-job.yaml b/components/configs/kustomized/minio/setup-root-user-job.yaml similarity index 84% rename from components/configs/kustomized/minio/setup-job.yaml rename to components/configs/kustomized/minio/setup-root-user-job.yaml index e714b00d..83781053 100644 --- a/components/configs/kustomized/minio/setup-job.yaml +++ b/components/configs/kustomized/minio/setup-root-user-job.yaml @@ -15,24 +15,33 @@ spec: - name: create-minio-root-user image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest imagePullPolicy: IfNotPresent + env: + - name: SECRET_NAME + value: minio-root-user command: ["/bin/bash"] args: - -ec - |- + # FORCE=true + if [ -n "$(oc get secret minio-root-user -o name 2>/dev/null)" ]; then - echo "Secret already exists. Skipping." >&2 - exit 0 + echo "Secret already exists." + [ -z ${FORCE+x} ] && exit 0 + echo "Forcing creation." fi + genpass() { < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c"${1:-32}" } + id=$(genpass 16) secret=$(genpass) + cat << EOF | oc apply -f- apiVersion: v1 kind: Secret metadata: - name: minio-root-user + name: ${SECRET_NAME} type: Opqaue stringData: MINIO_ROOT_USER: ${id} diff --git a/components/configs/kustomized/rhods-data-connector/create-data-connection-job.yaml b/components/configs/kustomized/rhods-data-connector/create-data-connection-job.yaml new file mode 100644 index 00000000..699da36b --- /dev/null +++ b/components/configs/kustomized/rhods-data-connector/create-data-connection-job.yaml @@ -0,0 +1,88 @@ +--- +apiVersion: batch/v1 +kind: Job +metadata: + annotations: + argocd.argoproj.io/sync-wave: "1" + name: create-data-connection +spec: + backoffLimit: 4 + template: + spec: + serviceAccount: data-connector-setup + serviceAccountName: data-connector-setup + containers: + - name: create-data-connection + image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest + imagePullPolicy: IfNotPresent + env: + - name: MINIO_SECRET_NAME + value: minio-root-user + - name: MINIO_NAMESPACE + value: minio + - name: DATA_CONNECTION_NAME + value: aws-connection-minio + - name: AWS_DEFAULT_REGION + value: us + - name: AWS_S3_ENDPOINT + value: http://minio.minio.svc:9000 + - name: AWS_S3_BUCKET + value: serving-demo + command: ["/bin/bash"] + args: + - -ec + - | + echo "MINIO_NAMESPACE: ${MINIO_NAMESPACE}" + echo -n "Waiting for secret ${MINIO_SECRET_NAME}." + + while [ -z "$(oc get secret -n minio ${MINIO_SECRET_NAME} -o name 2>/dev/null)" ]; do + echo -n '.' + sleep 1 + done; echo + + id=$(oc get secret -n minio ${MINIO_SECRET_NAME} -o go-template='{{.data.MINIO_ROOT_USER|base64decode}}') + secret=$(oc get secret -n minio ${MINIO_SECRET_NAME} -o go-template='{{.data.MINIO_ROOT_PASSWORD|base64decode}}') + + echo "Creating secret ${DATA_CONNECTION_NAME}" + cat << EOF | oc apply -f- + apiVersion: v1 + kind: Secret + metadata: + name: ${DATA_CONNECTION_NAME} + labels: + opendatahub.io/dashboard: "true" + opendatahub.io/managed: "true" + annotations: + opendatahub.io/connection-type: s3 + openshift.io/display-name: Minio + type: Opaque + stringData: + AWS_ACCESS_KEY_ID: ${id} + AWS_SECRET_ACCESS_KEY: ${secret} + AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION} + AWS_S3_ENDPOINT: ${AWS_S3_ENDPOINT} + AWS_S3_BUCKET: ${AWS_S3_BUCKET} + EOF + restartPolicy: Never +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + annotations: + argocd.argoproj.io/sync-wave: "1" + name: data-connector-setup +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + annotations: + argocd.argoproj.io/sync-wave: "1" + name: data-connector-setup-edit +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: edit +subjects: +- kind: ServiceAccount + name: data-connector-setup + namespace: ds-group-project diff --git a/components/configs/kustomized/rhods-data-connector/kustomization.yaml b/components/configs/kustomized/rhods-data-connector/kustomization.yaml new file mode 100644 index 00000000..76d8e32f --- /dev/null +++ b/components/configs/kustomized/rhods-data-connector/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: ds-group-project + +resources: + - create-data-connection-job.yaml diff --git a/components/configs/kustomized/notebook/kustomization.yaml b/components/configs/kustomized/rhods-notebook/base/kustomization.yaml similarity index 100% rename from components/configs/kustomized/notebook/kustomization.yaml rename to components/configs/kustomized/rhods-notebook/base/kustomization.yaml diff --git a/components/configs/kustomized/notebook/notebook.yaml b/components/configs/kustomized/rhods-notebook/base/notebook.yaml similarity index 97% rename from components/configs/kustomized/notebook/notebook.yaml rename to components/configs/kustomized/rhods-notebook/base/notebook.yaml index ec704fe1..e6ebb438 100644 --- a/components/configs/kustomized/notebook/notebook.yaml +++ b/components/configs/kustomized/rhods-notebook/base/notebook.yaml @@ -7,15 +7,14 @@ metadata: notebooks.opendatahub.io/last-image-selection: 'tensorflow:2023.1' notebooks.opendatahub.io/last-size-selection: Small notebooks.opendatahub.io/oauth-logout-url: https://rhods-dashboard-redhat-ods-applications.apps.cluster-xx7jv.xx7jv.sandbox1365.opentlc.com/projects/pipelines-tutorial?notebookLogout=science - opendatahub.io/username: opentlc-mgr + opendatahub.io/username: user openshift.io/description: "" - openshift.io/display-name: Notebook + openshift.io/display-name: Science Notebook labels: app: science opendatahub.io/dashboard: "true" opendatahub.io/odh-managed: "true" name: science - namespace: pipelines-tutorial spec: template: spec: @@ -43,7 +42,7 @@ spec: value: image-registry.openshift-image-registry.svc:5000/redhat-ods-applications/tensorflow:2023.1 envFrom: - secretRef: - name: minio-connection + name: aws-connection-minio image: image-registry.openshift-image-registry.svc:5000/redhat-ods-applications/tensorflow:2023.1 imagePullPolicy: Always livenessProbe: diff --git a/components/configs/kustomized/notebook/pvc.yaml b/components/configs/kustomized/rhods-notebook/base/pvc.yaml similarity index 100% rename from components/configs/kustomized/notebook/pvc.yaml rename to components/configs/kustomized/rhods-notebook/base/pvc.yaml diff --git a/components/configs/kustomized/rhods-notebook/kustomization.yaml b/components/configs/kustomized/rhods-notebook/kustomization.yaml new file mode 100644 index 00000000..200ea837 --- /dev/null +++ b/components/configs/kustomized/rhods-notebook/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: +- overlays/default diff --git a/components/configs/kustomized/rhods-notebook/overlays/default/kustomization.yaml b/components/configs/kustomized/rhods-notebook/overlays/default/kustomization.yaml new file mode 100644 index 00000000..76a234fd --- /dev/null +++ b/components/configs/kustomized/rhods-notebook/overlays/default/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: ds-group-project + +resources: +- ../../base diff --git a/demos/rhods/kustomization.yaml b/demos/rhods/kustomization.yaml index 24706eac..a9a5ca9b 100644 --- a/demos/rhods/kustomization.yaml +++ b/demos/rhods/kustomization.yaml @@ -9,6 +9,8 @@ resources: - ../../components/configs/kustomized/rhods-projects - ../../components/configs/kustomized/rhods-model-runtimes # - ../../components/configs/kustomized/rhods-model-instances + - ../../components/configs/kustomized/rhods-notebook + - ../../components/configs/kustomized/rhods-data-connector - ../../components/configs/kustomized/custom-notebook-images/overlays/rhods - ../../components/configs/kustomized/minio From 0a556250268a9e56c9755b3c0690318b8378a9d5 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Thu, 19 Oct 2023 10:01:20 -0500 Subject: [PATCH 8/8] update: rhods demo --- .../create-data-connection-job.yaml | 2 +- .../kustomized/rhods-notebook/base/notebook.yaml | 15 +++++++-------- .../kustomized/rhods-notebook/base/pvc.yaml | 4 ++-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/components/configs/kustomized/rhods-data-connector/create-data-connection-job.yaml b/components/configs/kustomized/rhods-data-connector/create-data-connection-job.yaml index 699da36b..c2c2ba76 100644 --- a/components/configs/kustomized/rhods-data-connector/create-data-connection-job.yaml +++ b/components/configs/kustomized/rhods-data-connector/create-data-connection-job.yaml @@ -21,7 +21,7 @@ spec: - name: MINIO_NAMESPACE value: minio - name: DATA_CONNECTION_NAME - value: aws-connection-minio + value: s3-connection-minio - name: AWS_DEFAULT_REGION value: us - name: AWS_S3_ENDPOINT diff --git a/components/configs/kustomized/rhods-notebook/base/notebook.yaml b/components/configs/kustomized/rhods-notebook/base/notebook.yaml index e6ebb438..ec45bf82 100644 --- a/components/configs/kustomized/rhods-notebook/base/notebook.yaml +++ b/components/configs/kustomized/rhods-notebook/base/notebook.yaml @@ -6,10 +6,9 @@ metadata: notebooks.opendatahub.io/inject-oauth: "true" notebooks.opendatahub.io/last-image-selection: 'tensorflow:2023.1' notebooks.opendatahub.io/last-size-selection: Small - notebooks.opendatahub.io/oauth-logout-url: https://rhods-dashboard-redhat-ods-applications.apps.cluster-xx7jv.xx7jv.sandbox1365.opentlc.com/projects/pipelines-tutorial?notebookLogout=science opendatahub.io/username: user openshift.io/description: "" - openshift.io/display-name: Science Notebook + openshift.io/display-name: Exploration Notebook labels: app: science opendatahub.io/dashboard: "true" @@ -35,20 +34,20 @@ spec: --ServerApp.port=8888 --ServerApp.token='' --ServerApp.password='' - --ServerApp.base_url=/notebook/pipelines-tutorial/science + --ServerApp.base_url=/notebook/ds-group-project/science --ServerApp.quit_button=False - --ServerApp.tornado_settings={"user":"opentlc-2dmgr","hub_host":"https://rhods-dashboard-redhat-ods-applications.apps.cluster-xx7jv.xx7jv.sandbox1365.opentlc.com","hub_prefix":"/projects/pipelines-tutorial"} + # --ServerApp.tornado_settings={"user":"opentlc-2dmgr","hub_host":"https://rhods-dashboard-redhat-ods-applications.apps.example.com","hub_prefix":"/projects/ds-group-project"} - name: JUPYTER_IMAGE value: image-registry.openshift-image-registry.svc:5000/redhat-ods-applications/tensorflow:2023.1 envFrom: - secretRef: - name: aws-connection-minio + name: s3-connection-minio image: image-registry.openshift-image-registry.svc:5000/redhat-ods-applications/tensorflow:2023.1 imagePullPolicy: Always livenessProbe: failureThreshold: 3 httpGet: - path: /notebook/pipelines-tutorial/science/api + path: /notebook/ds-group-project/science/api port: notebook-port scheme: HTTP initialDelaySeconds: 10 @@ -63,7 +62,7 @@ spec: readinessProbe: failureThreshold: 3 httpGet: - path: /notebook/pipelines-tutorial/science/api + path: /notebook/ds-group-project/science/api port: notebook-port scheme: HTTP initialDelaySeconds: 10 @@ -95,7 +94,7 @@ spec: - --email-domain=* - --skip-provider-button - --openshift-sar={"verb":"get","resource":"notebooks","resourceAPIGroup":"kubeflow.org","resourceName":"science","namespace":"$(NAMESPACE)"} - - --logout-url=https://rhods-dashboard-redhat-ods-applications.apps.cluster-xx7jv.xx7jv.sandbox1365.opentlc.com/projects/pipelines-tutorial?notebookLogout=science + # - --logout-url=https://rhods-dashboard-redhat-ods-applications.apps.cluster-xx7jv.xx7jv.sandbox1365.opentlc.com/projects/ds-group-project?notebookLogout=science env: - name: NAMESPACE valueFrom: diff --git a/components/configs/kustomized/rhods-notebook/base/pvc.yaml b/components/configs/kustomized/rhods-notebook/base/pvc.yaml index d9f7d3b2..3baacf6a 100644 --- a/components/configs/kustomized/rhods-notebook/base/pvc.yaml +++ b/components/configs/kustomized/rhods-notebook/base/pvc.yaml @@ -2,8 +2,8 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: annotations: - openshift.io/description: "" - openshift.io/display-name: Science + openshift.io/description: "Connect a project dataset to a notebook" + openshift.io/display-name: Project Dataset labels: opendatahub.io/dashboard: "true" name: science