From 8d0932c17bcc21579d7faba1060782cdb9392467 Mon Sep 17 00:00:00 2001 From: Cory Latschkowski Date: Wed, 18 Dec 2024 13:51:28 -0600 Subject: [PATCH] cleanup, refactor, improve layout (#117) yolo: happy holidays --- .wordlist-md | 3 + .wordlist-sh | 11 ++ bootstrap/README.md | 0 bootstrap/install-argocd/kustomization.yaml | 8 - .../install-web-terminal/kustomization.yaml | 6 - clusters/default/kustomization.yaml | 18 --- .../app-configs/image-puller/base/ds.yaml | 12 +- .../image-puller/base/kustomization.yaml | 6 +- .../image-puller/example/kustomization.yaml | 9 ++ .../{overlays => }/example/namespace.yaml | 0 .../example/ray-image/kustomization.yaml | 17 +++ .../example/tf-image/kustomization.yaml | 17 +++ .../overlays/example/kustomization.yaml | 29 ---- components/app-configs/nim/README.md | 23 +++ .../app-configs/nim/base/deployment.yaml | 72 +++++++++ .../app-configs/nim/base/kustomization.yaml | 13 ++ components/app-configs/nim/base/nvcr.yaml | 17 +++ components/app-configs/nim/base/pvc.yaml | 11 ++ components/app-configs/nim/base/route.yaml | 18 +++ components/app-configs/nim/base/service.yaml | 12 ++ .../nim/components/gpu/kustomization.yaml | 7 + .../nim/components/gpu/patch-deployment.yaml | 12 ++ .../components/namespace/kustomization.yaml | 5 + .../nim/components/namespace/namespace.yaml | 7 + .../overlays/default/kustomization.yaml | 0 .../nim/overlays/demo/kustomization.yaml | 11 ++ .../nim/overlays/gpu}/kustomization.yaml | 6 +- .../components/nemo/patch-deployment.yaml | 3 +- .../rhoai-notebook/base/kustomization.yaml | 1 - .../data-connector/data-connector-secret.yaml | 17 +++ .../data-connector/kustomization.yaml | 5 + .../components/pvc/kustomization.yaml | 5 + .../{base => components/pvc}/pvc.yaml | 0 .../{ => overlays/default}/kustomization.yaml | 2 +- .../overlays/group-project/kustomization.yaml | 5 +- .../overlays/persistent/kustomization.yaml | 8 + .../cluster-configs/adhoc-admin/base/job.sh | 21 +++ .../cluster-configs/adhoc-admin/base/job.yaml | 30 ++++ .../adhoc-admin/base/kustomization.yaml | 12 +- .../adhoc-admin/base/rbac.yaml | 19 +++ .../cluster-reset/kustomization.yaml | 22 +++ .../adhoc-admin/cluster-reset/namespaces.txt | 3 + .../cluster-reset/ocp-default-crds-4.16.txt | 126 +++++++++++++++ .../adhoc-admin/cluster-reset/patch-job.yaml | 20 +++ .../adhoc-admin/cluster-reset/uninstall.sh | 143 ++++++++++++++++++ .../components/{rhpds => fix-rhpds}/job.yaml | 0 .../{rhpds => fix-rhpds}/kustomization.yaml | 0 .../adhoc-pod.yaml | 0 .../kustomization.yaml | 0 .../adhoc-admin/kustomization.yaml | 5 + .../autoscale/base/autoscaling.yaml | 2 +- .../machine-config/base/kustomization.yaml | 6 +- .../99-crio-disable-wipe.yaml | 34 +++++ .../crio-disable-wipe/kustomization.yaml | 5 + .../99-master-ssh-machineconfig.yaml | 0 .../99-worker-ssh-machineconfig.yaml | 0 .../components/ssh-config/kustomization.yaml | 6 + components/operators/ack-system/SETUP.md | 13 +- .../ack-system/base/user-config-cm.yaml | 1 + .../operators/authorino-operator/README.md | 1 + .../overlays/stable/kustomization.yaml | 11 ++ .../overlays/stable/patch-channel.yaml | 3 + .../overlays/minimal/kustomization.yaml | 1 + .../components/clusters}/README.md | 0 .../argo-managed/base/argocd-instance.yaml | 0 .../argo-managed/base/argocd-repo-https.yaml | 0 .../argo-managed/base/argocd-repo-ssh-ss.yaml | 0 .../argo-managed/base/kustomization.yaml | 0 .../overlays/default/kustomization.yaml | 2 +- .../clusters/default/kustomization.yaml | 18 +++ .../install-argocd/kustomization.yaml | 8 + .../install-web-terminal/kustomization.yaml | 6 + .../approve-after-servicemesh/job.sh | 0 .../approve-after-servicemesh/job.yaml | 0 .../kustomization.yaml | 0 .../rhoai-servicemesh/kustomization.yaml | 18 +++ demos/components/rhoai/kustomization.yaml | 13 -- .../all-the-things/kustomization.yaml | 10 +- .../kustomization.yaml | 6 +- .../devspaces/kustomization.yaml | 4 +- .../nvidia-gpu-autoscale/kustomization.yaml | 4 +- .../rhoai-intel/kustomization.yaml | 2 +- .../rhoai-minimal/kustomization.yaml | 6 +- .../kustomization.yaml | 6 +- .../rhoai-workshop-ready/kustomization.yaml | 18 +++ demos/rhoai-workshop-ready/kustomization.yaml | 41 ----- .../patch-workshop-users.yaml | 8 - demos/rhoai-minimal/NOTES.md => docs/RHOAI.md | 1 - scripts/library/k8s.sh | 24 +-- workshops/base/kustomization.yaml | 2 +- .../00-prereqs/kustomization.yaml | 2 +- .../image-puller-app/kustomization.yaml | 2 +- .../image-puller-pipelines/kustomization.yaml | 2 +- .../image-puller-workbench/kustomization.yaml | 2 +- 94 files changed, 897 insertions(+), 188 deletions(-) delete mode 100644 bootstrap/README.md delete mode 100644 bootstrap/install-argocd/kustomization.yaml delete mode 100644 bootstrap/install-web-terminal/kustomization.yaml delete mode 100644 clusters/default/kustomization.yaml create mode 100644 components/app-configs/image-puller/example/kustomization.yaml rename components/app-configs/image-puller/{overlays => }/example/namespace.yaml (100%) create mode 100644 components/app-configs/image-puller/example/ray-image/kustomization.yaml create mode 100644 components/app-configs/image-puller/example/tf-image/kustomization.yaml delete mode 100644 components/app-configs/image-puller/overlays/example/kustomization.yaml create mode 100644 components/app-configs/nim/README.md create mode 100644 components/app-configs/nim/base/deployment.yaml create mode 100644 components/app-configs/nim/base/kustomization.yaml create mode 100644 components/app-configs/nim/base/nvcr.yaml create mode 100644 components/app-configs/nim/base/pvc.yaml create mode 100644 components/app-configs/nim/base/route.yaml create mode 100644 components/app-configs/nim/base/service.yaml create mode 100644 components/app-configs/nim/components/gpu/kustomization.yaml create mode 100644 components/app-configs/nim/components/gpu/patch-deployment.yaml create mode 100644 components/app-configs/nim/components/namespace/kustomization.yaml create mode 100644 components/app-configs/nim/components/namespace/namespace.yaml rename components/app-configs/{image-puller => nim}/overlays/default/kustomization.yaml (100%) create mode 100644 components/app-configs/nim/overlays/demo/kustomization.yaml rename components/{cluster-configs/adhoc-admin/overlays/default => app-configs/nim/overlays/gpu}/kustomization.yaml (75%) create mode 100644 components/app-configs/rhoai-notebook/components/data-connector/data-connector-secret.yaml create mode 100644 components/app-configs/rhoai-notebook/components/data-connector/kustomization.yaml create mode 100644 components/app-configs/rhoai-notebook/components/pvc/kustomization.yaml rename components/app-configs/rhoai-notebook/{base => components/pvc}/pvc.yaml (100%) rename components/app-configs/rhoai-notebook/{ => overlays/default}/kustomization.yaml (75%) create mode 100644 components/app-configs/rhoai-notebook/overlays/persistent/kustomization.yaml create mode 100755 components/cluster-configs/adhoc-admin/base/job.sh create mode 100644 components/cluster-configs/adhoc-admin/base/job.yaml create mode 100644 components/cluster-configs/adhoc-admin/base/rbac.yaml create mode 100644 components/cluster-configs/adhoc-admin/cluster-reset/kustomization.yaml create mode 100644 components/cluster-configs/adhoc-admin/cluster-reset/namespaces.txt create mode 100644 components/cluster-configs/adhoc-admin/cluster-reset/ocp-default-crds-4.16.txt create mode 100644 components/cluster-configs/adhoc-admin/cluster-reset/patch-job.yaml create mode 100755 components/cluster-configs/adhoc-admin/cluster-reset/uninstall.sh rename components/cluster-configs/adhoc-admin/components/{rhpds => fix-rhpds}/job.yaml (100%) rename components/cluster-configs/adhoc-admin/components/{rhpds => fix-rhpds}/kustomization.yaml (100%) rename components/cluster-configs/adhoc-admin/components/{adhoc-terminal => hidden-chamber}/adhoc-pod.yaml (100%) rename components/cluster-configs/adhoc-admin/components/{adhoc-terminal => hidden-chamber}/kustomization.yaml (100%) create mode 100644 components/cluster-configs/adhoc-admin/kustomization.yaml create mode 100644 components/cluster-configs/machine-config/components/crio-disable-wipe/99-crio-disable-wipe.yaml create mode 100644 components/cluster-configs/machine-config/components/crio-disable-wipe/kustomization.yaml rename components/cluster-configs/machine-config/{base => components/ssh-config}/99-master-ssh-machineconfig.yaml (100%) rename components/cluster-configs/machine-config/{base => components/ssh-config}/99-worker-ssh-machineconfig.yaml (100%) create mode 100644 components/cluster-configs/machine-config/components/ssh-config/kustomization.yaml create mode 100644 components/operators/authorino-operator/operator/overlays/stable/kustomization.yaml create mode 100644 components/operators/authorino-operator/operator/overlays/stable/patch-channel.yaml rename {clusters => demos/components/clusters}/README.md (100%) rename {clusters => demos/components/clusters}/argo-managed/base/argocd-instance.yaml (100%) rename {clusters => demos/components/clusters}/argo-managed/base/argocd-repo-https.yaml (100%) rename {clusters => demos/components/clusters}/argo-managed/base/argocd-repo-ssh-ss.yaml (100%) rename {clusters => demos/components/clusters}/argo-managed/base/kustomization.yaml (100%) rename {clusters => demos/components/clusters}/argo-managed/overlays/default/kustomization.yaml (95%) create mode 100644 demos/components/clusters/default/kustomization.yaml create mode 100644 demos/components/install-argocd/kustomization.yaml create mode 100644 demos/components/install-web-terminal/kustomization.yaml rename demos/components/{rhoai => rhoai-servicemesh}/approve-after-servicemesh/job.sh (100%) rename demos/components/{rhoai => rhoai-servicemesh}/approve-after-servicemesh/job.yaml (100%) rename demos/components/{rhoai => rhoai-servicemesh}/approve-after-servicemesh/kustomization.yaml (100%) create mode 100644 demos/components/rhoai-servicemesh/kustomization.yaml rename demos/{ => overlays}/all-the-things/kustomization.yaml (66%) rename demos/{ => overlays}/devspaces-nvidia-gpu-autoscale/kustomization.yaml (75%) rename demos/{ => overlays}/devspaces/kustomization.yaml (85%) rename demos/{ => overlays}/nvidia-gpu-autoscale/kustomization.yaml (82%) rename demos/{ => overlays}/rhoai-intel/kustomization.yaml (90%) rename demos/{ => overlays}/rhoai-minimal/kustomization.yaml (71%) rename demos/{ => overlays}/rhoai-nvidia-gpu-autoscale/kustomization.yaml (74%) create mode 100644 demos/overlays/rhoai-workshop-ready/kustomization.yaml delete mode 100644 demos/rhoai-workshop-ready/kustomization.yaml delete mode 100644 demos/rhoai-workshop-ready/patch-workshop-users.yaml rename demos/rhoai-minimal/NOTES.md => docs/RHOAI.md (98%) diff --git a/.wordlist-md b/.wordlist-md index 6e7931a2..e7a2a535 100644 --- a/.wordlist-md +++ b/.wordlist-md @@ -231,11 +231,14 @@ na namespace namespaced namespaces +NCR newman nfd NFD nfs NFS +nim +NIM NMState nodeFeatureDiscovery noobaa diff --git a/.wordlist-sh b/.wordlist-sh index b5c6e1f0..faebc6dc 100644 --- a/.wordlist-sh +++ b/.wordlist-sh @@ -6,6 +6,7 @@ acks addext addon adp +adrezni af AllNamespaces amd @@ -45,13 +46,18 @@ chroot clustermanagementaddons clustermanagers CN +consoleplugin Containerfile containerregistry coreos crd crds creationTimestamp +crs crt +csv +csvs +CSVS ctrl CTRL currentCSVDesc @@ -69,6 +75,7 @@ df dirname DIRS displayName +distruct dl DL dn @@ -184,6 +191,7 @@ multiclusterhubs multiclusterobservabilities MultiNamespace musl +mutatingwebhookconfiguration namedCertificates nat nbB @@ -256,6 +264,7 @@ ServerAliveInterval serverlessservices servicemeshcontrolplanes servicemeshmembers +servicemeshoperator servingCertificate servingCerts sha @@ -297,6 +306,7 @@ userpreferences usr uuid UUID +validatingwebhookconfiguration validatingwebhookconfigurations validators velero @@ -312,6 +322,7 @@ vzx WantedBy wc webhook +webhooks wipefs wo wordlist diff --git a/bootstrap/README.md b/bootstrap/README.md deleted file mode 100644 index e69de29b..00000000 diff --git a/bootstrap/install-argocd/kustomization.yaml b/bootstrap/install-argocd/kustomization.yaml deleted file mode 100644 index c483e841..00000000 --- a/bootstrap/install-argocd/kustomization.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: - - ../../components/argocd/projects/overlays/default - - ../../components/operators/openshift-gitops-operator/instance/overlays/default - - ../../components/operators/openshift-gitops-operator/operator/overlays/latest - # - ../../clusters/argo-managed/overlays/default diff --git a/bootstrap/install-web-terminal/kustomization.yaml b/bootstrap/install-web-terminal/kustomization.yaml deleted file mode 100644 index 2293b149..00000000 --- a/bootstrap/install-web-terminal/kustomization.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: -- ../../components/operators/web-terminal/operator/overlays/fast -- ../../components/operators/web-terminal/instance/overlays/enhanced diff --git a/clusters/default/kustomization.yaml b/clusters/default/kustomization.yaml deleted file mode 100644 index 31e5cdd5..00000000 --- a/clusters/default/kustomization.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: -- ../../components/app-configs/ubi-images/overlays/cluster -- ../../components/cluster-configs/autoscale/overlays/default -- ../../components/cluster-configs/console-config/overlays/default -- ../../components/cluster-configs/console-samples - -# - ../../components/cluster-configs/etcd-backup/overlays/default -# - ../../components/cluster-configs/namespace-cleanup/overlays/sandbox - -- ../../components/cluster-configs/login/overlays/htpasswd -- ../../components/cluster-configs/namespaces/overlays/default -- ../../components/cluster-configs/rbac/overlays/no-self-provisioner - -- ../../components/operators/web-terminal/operator/overlays/fast -- ../../components/operators/web-terminal/instance/overlays/enhanced diff --git a/components/app-configs/image-puller/base/ds.yaml b/components/app-configs/image-puller/base/ds.yaml index f24b4ad6..97594c2d 100644 --- a/components/app-configs/image-puller/base/ds.yaml +++ b/components/app-configs/image-puller/base/ds.yaml @@ -1,9 +1,7 @@ ---- apiVersion: apps/v1 kind: DaemonSet metadata: name: image-puller - namespace: openshift-config spec: selector: matchLabels: @@ -14,12 +12,12 @@ spec: name: image-puller spec: containers: - - name: tools - image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest + - name: manchurian command: - - tail - - -f - - /dev/null + - sleep + - '3600' + imagePullPolicy: Always + image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest resources: limits: memory: 20Mi diff --git a/components/app-configs/image-puller/base/kustomization.yaml b/components/app-configs/image-puller/base/kustomization.yaml index 8c9a8cf1..12fc8eb6 100644 --- a/components/app-configs/image-puller/base/kustomization.yaml +++ b/components/app-configs/image-puller/base/kustomization.yaml @@ -1,5 +1,5 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component resources: -- ds.yaml + - ds.yaml diff --git a/components/app-configs/image-puller/example/kustomization.yaml b/components/app-configs/image-puller/example/kustomization.yaml new file mode 100644 index 00000000..bee0efd4 --- /dev/null +++ b/components/app-configs/image-puller/example/kustomization.yaml @@ -0,0 +1,9 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: image-puller + +resources: + - namespace.yaml + - ray-image + - tf-image diff --git a/components/app-configs/image-puller/overlays/example/namespace.yaml b/components/app-configs/image-puller/example/namespace.yaml similarity index 100% rename from components/app-configs/image-puller/overlays/example/namespace.yaml rename to components/app-configs/image-puller/example/namespace.yaml diff --git a/components/app-configs/image-puller/example/ray-image/kustomization.yaml b/components/app-configs/image-puller/example/ray-image/kustomization.yaml new file mode 100644 index 00000000..0e5d02ca --- /dev/null +++ b/components/app-configs/image-puller/example/ray-image/kustomization.yaml @@ -0,0 +1,17 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../base + +patches: + - target: + kind: DaemonSet + name: image-puller + patch: |- + - op: replace + path: /metadata/name + value: ray-puller + - op: replace + path: /spec/template/spec/containers/0/image + value: quay.io/modh/ray:2.35.0-py39-cu121 diff --git a/components/app-configs/image-puller/example/tf-image/kustomization.yaml b/components/app-configs/image-puller/example/tf-image/kustomization.yaml new file mode 100644 index 00000000..e2c4be62 --- /dev/null +++ b/components/app-configs/image-puller/example/tf-image/kustomization.yaml @@ -0,0 +1,17 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../base + +patches: + - target: + kind: DaemonSet + name: image-puller + patch: |- + - op: replace + path: /metadata/name + value: tf-puller + - op: replace + path: /spec/template/spec/containers/0/image + value: image-registry.openshift-image-registry.svc:5000/redhat-ods-applications/tensorflow:2024.1 diff --git a/components/app-configs/image-puller/overlays/example/kustomization.yaml b/components/app-configs/image-puller/overlays/example/kustomization.yaml deleted file mode 100644 index e16d8779..00000000 --- a/components/app-configs/image-puller/overlays/example/kustomization.yaml +++ /dev/null @@ -1,29 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: image-puller - -resources: -- ../../base -- namespace.yaml - -patches: - - target: - group: apps - kind: DaemonSet - name: image-puller - patch: |- - - op: add - path: /spec/template/spec/containers - value: - - name: large-app - image: 'quay.io/rh-aiservices-bu/rhoai-lab-insurance-claim-app:2.1.2' - command: - - sleep - - infinity - resources: - limits: - memory: 20Mi - requests: - cpu: 10m - memory: 10Mi diff --git a/components/app-configs/nim/README.md b/components/app-configs/nim/README.md new file mode 100644 index 00000000..b879e02e --- /dev/null +++ b/components/app-configs/nim/README.md @@ -0,0 +1,23 @@ +# Notes + +You need an NCR API Key to pull container images and models. +It will need to be setup for the default SA in the namespace. + +## Quickstart + +Query NIM Open AI API + +```sh +URL=https://$(oc get route -o go-template='{{.spec.host}}' nim)/v1/completions +PROMPT="Once upon a time" + +curl -s -X 'POST' \ + "${URL}" \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -d '{ + "model": "meta/llama3-8b-instruct", + "prompt": "'"${PROMPT}"'", + "max_tokens": 100 + }' | jq .choices[0].text +``` diff --git a/components/app-configs/nim/base/deployment.yaml b/components/app-configs/nim/base/deployment.yaml new file mode 100644 index 00000000..d8c8c23a --- /dev/null +++ b/components/app-configs/nim/base/deployment.yaml @@ -0,0 +1,72 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nim +spec: + replicas: 1 + strategy: + type: Recreate + template: + spec: + containers: + - name: nim + image: 'nvcr.io/nim/meta/llama3-8b-instruct:1.0.0' + env: + - name: NGC_API_KEY + value: your-key-here + ports: + - containerPort: 8000 + protocol: TCP + name: api + resources: + limits: + cpu: '2' + memory: 8Gi + requests: + cpu: 500m + memory: 8Gi + # livenessProbe: + # httpGet: + # path: / + # port: http + # scheme: HTTP + # timeoutSeconds: 5 + # periodSeconds: 5 + # successThreshold: 1 + # failureThreshold: 3 + # readinessProbe: + # httpGet: + # path: / + # port: notebook + # scheme: HTTP + # timeoutSeconds: 1 + # periodSeconds: 10 + # successThreshold: 1 + # failureThreshold: 3 + # startupProbe: + # httpGet: + # path: / + # port: notebook + # scheme: HTTP + # timeoutSeconds: 1 + # periodSeconds: 5 + # successThreshold: 1 + # failureThreshold: 10 + securityContext: + runAsNonRoot: true + allowPrivilegeEscalation: false + volumeMounts: + - name: shm + mountPath: /dev/shm + - name: nim-cache + mountPath: /opt/nim/.cache + subPath: cache + volumes: + - name: shm + emptyDir: + medium: Memory + # sizeLimit: 512Mi + - name: nim-cache + persistentVolumeClaim: + claimName: nim diff --git a/components/app-configs/nim/base/kustomization.yaml b/components/app-configs/nim/base/kustomization.yaml new file mode 100644 index 00000000..77e846d9 --- /dev/null +++ b/components/app-configs/nim/base/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +labels: +- includeSelectors: true + pairs: + component: nim + +resources: +- deployment.yaml +- pvc.yaml +- route.yaml +- service.yaml diff --git a/components/app-configs/nim/base/nvcr.yaml b/components/app-configs/nim/base/nvcr.yaml new file mode 100644 index 00000000..6dbf1e67 --- /dev/null +++ b/components/app-configs/nim/base/nvcr.yaml @@ -0,0 +1,17 @@ +kind: Secret +apiVersion: v1 +metadata: + name: nvcr +data: + .dockerconfigjson: | + { + "auths": { + "nvcr.io": { + "username": "$oauthtoken", + "password": "", + "auth": "base64 of $oauthtoken:", + "email": "" + } + } + } +type: kubernetes.io/dockerconfigjson diff --git a/components/app-configs/nim/base/pvc.yaml b/components/app-configs/nim/base/pvc.yaml new file mode 100644 index 00000000..2555ea09 --- /dev/null +++ b/components/app-configs/nim/base/pvc.yaml @@ -0,0 +1,11 @@ +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: nim +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 60Gi diff --git a/components/app-configs/nim/base/route.yaml b/components/app-configs/nim/base/route.yaml new file mode 100644 index 00000000..bfb15ce8 --- /dev/null +++ b/components/app-configs/nim/base/route.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + name: nim + annotations: + argocd.argoproj.io/sync-wave: "1" +spec: + port: + targetPort: 8000 + tls: + insecureEdgeTerminationPolicy: Redirect + termination: edge + to: + kind: Service + name: nim + weight: 100 + wildcardPolicy: None diff --git a/components/app-configs/nim/base/service.yaml b/components/app-configs/nim/base/service.yaml new file mode 100644 index 00000000..a8a6e687 --- /dev/null +++ b/components/app-configs/nim/base/service.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: v1 +kind: Service +metadata: + name: nim +spec: + ports: + - name: api + port: 8000 + targetPort: 8000 + sessionAffinity: None + type: ClusterIP diff --git a/components/app-configs/nim/components/gpu/kustomization.yaml b/components/app-configs/nim/components/gpu/kustomization.yaml new file mode 100644 index 00000000..02f6c6d8 --- /dev/null +++ b/components/app-configs/nim/components/gpu/kustomization.yaml @@ -0,0 +1,7 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +patches: + - path: patch-deployment.yaml + target: + kind: Deployment diff --git a/components/app-configs/nim/components/gpu/patch-deployment.yaml b/components/app-configs/nim/components/gpu/patch-deployment.yaml new file mode 100644 index 00000000..ec29d012 --- /dev/null +++ b/components/app-configs/nim/components/gpu/patch-deployment.yaml @@ -0,0 +1,12 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nim +spec: + template: + spec: + containers: + - name: nim + resources: + limits: + nvidia.com/gpu: 1 diff --git a/components/app-configs/nim/components/namespace/kustomization.yaml b/components/app-configs/nim/components/namespace/kustomization.yaml new file mode 100644 index 00000000..d41e3cf2 --- /dev/null +++ b/components/app-configs/nim/components/namespace/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +resources: +- namespace.yaml diff --git a/components/app-configs/nim/components/namespace/namespace.yaml b/components/app-configs/nim/components/namespace/namespace.yaml new file mode 100644 index 00000000..5b03058b --- /dev/null +++ b/components/app-configs/nim/components/namespace/namespace.yaml @@ -0,0 +1,7 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: demo-nim + annotations: + openshift.io/display-name: "Demo - NIM" diff --git a/components/app-configs/image-puller/overlays/default/kustomization.yaml b/components/app-configs/nim/overlays/default/kustomization.yaml similarity index 100% rename from components/app-configs/image-puller/overlays/default/kustomization.yaml rename to components/app-configs/nim/overlays/default/kustomization.yaml diff --git a/components/app-configs/nim/overlays/demo/kustomization.yaml b/components/app-configs/nim/overlays/demo/kustomization.yaml new file mode 100644 index 00000000..c76b9a61 --- /dev/null +++ b/components/app-configs/nim/overlays/demo/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: demo-nim + +components: +- ../../components/gpu +- ../../components/namespace + +resources: +- ../../base diff --git a/components/cluster-configs/adhoc-admin/overlays/default/kustomization.yaml b/components/app-configs/nim/overlays/gpu/kustomization.yaml similarity index 75% rename from components/cluster-configs/adhoc-admin/overlays/default/kustomization.yaml rename to components/app-configs/nim/overlays/gpu/kustomization.yaml index ac938730..ab768395 100644 --- a/components/cluster-configs/adhoc-admin/overlays/default/kustomization.yaml +++ b/components/app-configs/nim/overlays/gpu/kustomization.yaml @@ -1,8 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization +components: +- ../../components/gpu + resources: - ../../base - -components: -- ../../components/adhoc-terminal diff --git a/components/app-configs/notebook-standalone/components/nemo/patch-deployment.yaml b/components/app-configs/notebook-standalone/components/nemo/patch-deployment.yaml index db397934..b7986aa1 100644 --- a/components/app-configs/notebook-standalone/components/nemo/patch-deployment.yaml +++ b/components/app-configs/notebook-standalone/components/nemo/patch-deployment.yaml @@ -17,7 +17,8 @@ spec: - | #!/bin/sh jupyter lab \ - --ServerApp.ip=0.0.0.0:8888 \ + --ServerApp.ip=0.0.0.0 \ + --ServerApp.port=8888 \ --ServerApp.allow_origin="*" \ --ServerApp.open_browser=False \ --ServerApp.token='' diff --git a/components/app-configs/rhoai-notebook/base/kustomization.yaml b/components/app-configs/rhoai-notebook/base/kustomization.yaml index 57eea8d6..f1937c95 100644 --- a/components/app-configs/rhoai-notebook/base/kustomization.yaml +++ b/components/app-configs/rhoai-notebook/base/kustomization.yaml @@ -3,4 +3,3 @@ kind: Kustomization resources: - notebook.yaml -- pvc.yaml diff --git a/components/app-configs/rhoai-notebook/components/data-connector/data-connector-secret.yaml b/components/app-configs/rhoai-notebook/components/data-connector/data-connector-secret.yaml new file mode 100644 index 00000000..51792659 --- /dev/null +++ b/components/app-configs/rhoai-notebook/components/data-connector/data-connector-secret.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Secret +metadata: + name: data-connection-minio + labels: + opendatahub.io/dashboard: "true" + opendatahub.io/managed: "true" + annotations: + opendatahub.io/connection-type: s3 + openshift.io/display-name: S3 (Minio) - Internal +type: Opaque +stringData: + AWS_ACCESS_KEY_ID: minioadmin + AWS_SECRET_ACCESS_KEY: minioadmin + AWS_DEFAULT_REGION: us + AWS_S3_ENDPOINT: http://minio.minio.svc.cluster.local:9000 + AWS_S3_BUCKET: models diff --git a/components/app-configs/rhoai-notebook/components/data-connector/kustomization.yaml b/components/app-configs/rhoai-notebook/components/data-connector/kustomization.yaml new file mode 100644 index 00000000..5bfc6c26 --- /dev/null +++ b/components/app-configs/rhoai-notebook/components/data-connector/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +resources: + - data-connector-secret.yaml diff --git a/components/app-configs/rhoai-notebook/components/pvc/kustomization.yaml b/components/app-configs/rhoai-notebook/components/pvc/kustomization.yaml new file mode 100644 index 00000000..fc0d3166 --- /dev/null +++ b/components/app-configs/rhoai-notebook/components/pvc/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +resources: + - pvc.yaml diff --git a/components/app-configs/rhoai-notebook/base/pvc.yaml b/components/app-configs/rhoai-notebook/components/pvc/pvc.yaml similarity index 100% rename from components/app-configs/rhoai-notebook/base/pvc.yaml rename to components/app-configs/rhoai-notebook/components/pvc/pvc.yaml diff --git a/components/app-configs/rhoai-notebook/kustomization.yaml b/components/app-configs/rhoai-notebook/overlays/default/kustomization.yaml similarity index 75% rename from components/app-configs/rhoai-notebook/kustomization.yaml rename to components/app-configs/rhoai-notebook/overlays/default/kustomization.yaml index 192ded8c..2b87e6b1 100644 --- a/components/app-configs/rhoai-notebook/kustomization.yaml +++ b/components/app-configs/rhoai-notebook/overlays/default/kustomization.yaml @@ -2,4 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: -- overlays/group-project +- ../../base diff --git a/components/app-configs/rhoai-notebook/overlays/group-project/kustomization.yaml b/components/app-configs/rhoai-notebook/overlays/group-project/kustomization.yaml index f1296fe5..da5c70fe 100644 --- a/components/app-configs/rhoai-notebook/overlays/group-project/kustomization.yaml +++ b/components/app-configs/rhoai-notebook/overlays/group-project/kustomization.yaml @@ -3,5 +3,8 @@ kind: Kustomization namespace: ds-group +components: + - ../../components/pvc + resources: -- ../../base + - ../../base diff --git a/components/app-configs/rhoai-notebook/overlays/persistent/kustomization.yaml b/components/app-configs/rhoai-notebook/overlays/persistent/kustomization.yaml new file mode 100644 index 00000000..a04d8475 --- /dev/null +++ b/components/app-configs/rhoai-notebook/overlays/persistent/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../components/pvc + +resources: + - ../../base diff --git a/components/cluster-configs/adhoc-admin/base/job.sh b/components/cluster-configs/adhoc-admin/base/job.sh new file mode 100755 index 00000000..80016f59 --- /dev/null +++ b/components/cluster-configs/adhoc-admin/base/job.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# set -x + +ADHOC_SCRIPT=${ADHOC_SCRIPT:-/scripts/custom/job.sh} + +run_adhoc(){ + if [ -e "${ADHOC_SCRIPT}" ]; then + echo "running: ${ADHOC_SCRIPT}..." + "${ADHOC_SCRIPT}" + else + echo "missing: ${ADHOC_SCRIPT}" + echo " + You are using this wrong. + + But you are brave, because you are trying new things! + " + return 0 + fi +} + +run_adhoc diff --git a/components/cluster-configs/adhoc-admin/base/job.yaml b/components/cluster-configs/adhoc-admin/base/job.yaml new file mode 100644 index 00000000..8b4f4366 --- /dev/null +++ b/components/cluster-configs/adhoc-admin/base/job.yaml @@ -0,0 +1,30 @@ +--- +apiVersion: batch/v1 +kind: Job +metadata: + generateName: adhoc-admin-helper- + name: adhoc-admin-helper + namespace: adhoc-admin +spec: + template: + spec: + containers: + - name: minion + image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest + # image: registry.redhat.io/openshift4/cli + command: + - /bin/bash + - -c + - /scripts/job.sh + volumeMounts: + - name: scripts + mountPath: /scripts + volumes: + - name: scripts + configMap: + name: adhoc-admin-helper + defaultMode: 0755 + restartPolicy: Never + terminationGracePeriodSeconds: 30 + serviceAccount: adhoc-admin-helper + serviceAccountName: adhoc-admin-helper diff --git a/components/cluster-configs/adhoc-admin/base/kustomization.yaml b/components/cluster-configs/adhoc-admin/base/kustomization.yaml index 887bd059..5c899911 100644 --- a/components/cluster-configs/adhoc-admin/base/kustomization.yaml +++ b/components/cluster-configs/adhoc-admin/base/kustomization.yaml @@ -5,5 +5,15 @@ kind: Kustomization namespace: adhoc-admin resources: - - admin-rolebinding.yaml + - job.yaml - namespace.yaml + - rbac.yaml + +generatorOptions: + disableNameSuffixHash: true + +configMapGenerator: + - name: adhoc-admin-helper + namespace: adhoc-admin + files: + - job.sh diff --git a/components/cluster-configs/adhoc-admin/base/rbac.yaml b/components/cluster-configs/adhoc-admin/base/rbac.yaml new file mode 100644 index 00000000..ed29fbdb --- /dev/null +++ b/components/cluster-configs/adhoc-admin/base/rbac.yaml @@ -0,0 +1,19 @@ +--- +apiVersion: v1 +kind: ServiceAccount +metadata: + name: adhoc-admin-helper + namespace: adhoc-admin +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: adhoc-admin-helper +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: + - kind: ServiceAccount + name: adhoc-admin-helper + namespace: adhoc-admin diff --git a/components/cluster-configs/adhoc-admin/cluster-reset/kustomization.yaml b/components/cluster-configs/adhoc-admin/cluster-reset/kustomization.yaml new file mode 100644 index 00000000..f7dd2aab --- /dev/null +++ b/components/cluster-configs/adhoc-admin/cluster-reset/kustomization.yaml @@ -0,0 +1,22 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +resources: + - ../base + +generatorOptions: + disableNameSuffixHash: true + +configMapGenerator: + - name: demo-cleanup + namespace: adhoc-admin + files: + - ocp-default-crds-4.16.txt + - namespaces.txt + - uninstall.sh + +patches: + - path: patch-job.yaml + target: + kind: Job + name: adhoc-admin-helper diff --git a/components/cluster-configs/adhoc-admin/cluster-reset/namespaces.txt b/components/cluster-configs/adhoc-admin/cluster-reset/namespaces.txt new file mode 100644 index 00000000..afa3c7a7 --- /dev/null +++ b/components/cluster-configs/adhoc-admin/cluster-reset/namespaces.txt @@ -0,0 +1,3 @@ +istio-system +knative-eventing +knative-serving diff --git a/components/cluster-configs/adhoc-admin/cluster-reset/ocp-default-crds-4.16.txt b/components/cluster-configs/adhoc-admin/cluster-reset/ocp-default-crds-4.16.txt new file mode 100644 index 00000000..afe65381 --- /dev/null +++ b/components/cluster-configs/adhoc-admin/cluster-reset/ocp-default-crds-4.16.txt @@ -0,0 +1,126 @@ +adminnetworkpolicies.policy.networking.k8s.io +adminpolicybasedexternalroutes.k8s.ovn.org +alertingrules.monitoring.openshift.io +alertmanagerconfigs.monitoring.coreos.com +alertmanagers.monitoring.coreos.com +alertrelabelconfigs.monitoring.openshift.io +apirequestcounts.apiserver.openshift.io +apiservers.config.openshift.io +authentications.config.openshift.io +authentications.operator.openshift.io +baremetalhosts.metal3.io +baselineadminnetworkpolicies.policy.networking.k8s.io +bmceventsubscriptions.metal3.io +builds.config.openshift.io +catalogsources.operators.coreos.com +cloudcredentials.operator.openshift.io +cloudprivateipconfigs.cloud.network.openshift.io +clusterautoscalers.autoscaling.openshift.io +clustercsidrivers.operator.openshift.io +clusteroperators.config.openshift.io +clusterresourcequotas.quota.openshift.io +clusterserviceversions.operators.coreos.com +clusterversions.config.openshift.io +configs.imageregistry.operator.openshift.io +configs.operator.openshift.io +configs.samples.operator.openshift.io +consoleclidownloads.console.openshift.io +consoleexternalloglinks.console.openshift.io +consolelinks.console.openshift.io +consolenotifications.console.openshift.io +consoleplugins.console.openshift.io +consolequickstarts.console.openshift.io +consolesamples.console.openshift.io +consoles.config.openshift.io +consoles.operator.openshift.io +consoleyamlsamples.console.openshift.io +containerruntimeconfigs.machineconfiguration.openshift.io +controllerconfigs.machineconfiguration.openshift.io +controlplanemachinesets.machine.openshift.io +credentialsrequests.cloudcredential.openshift.io +csisnapshotcontrollers.operator.openshift.io +dataimages.metal3.io +dnses.config.openshift.io +dnses.operator.openshift.io +dnsrecords.ingress.operator.openshift.io +egressfirewalls.k8s.ovn.org +egressips.k8s.ovn.org +egressqoses.k8s.ovn.org +egressrouters.network.operator.openshift.io +egressservices.k8s.ovn.org +etcds.operator.openshift.io +featuregates.config.openshift.io +firmwareschemas.metal3.io +hardwaredata.metal3.io +helmchartrepositories.helm.openshift.io +hostfirmwarecomponents.metal3.io +hostfirmwaresettings.metal3.io +imagecontentpolicies.config.openshift.io +imagecontentsourcepolicies.operator.openshift.io +imagedigestmirrorsets.config.openshift.io +imagepruners.imageregistry.operator.openshift.io +images.config.openshift.io +imagetagmirrorsets.config.openshift.io +infrastructures.config.openshift.io +ingresscontrollers.operator.openshift.io +ingresses.config.openshift.io +insightsoperators.operator.openshift.io +installplans.operators.coreos.com +ipaddressclaims.ipam.cluster.x-k8s.io +ipaddresses.ipam.cluster.x-k8s.io +ippools.whereabouts.cni.cncf.io +kubeapiservers.operator.openshift.io +kubecontrollermanagers.operator.openshift.io +kubeletconfigs.machineconfiguration.openshift.io +kubeschedulers.operator.openshift.io +kubestorageversionmigrators.operator.openshift.io +machineautoscalers.autoscaling.openshift.io +machineconfigpools.machineconfiguration.openshift.io +machineconfigs.machineconfiguration.openshift.io +machineconfigurations.operator.openshift.io +machinehealthchecks.machine.openshift.io +machinesets.machine.openshift.io +machines.machine.openshift.io +metal3remediations.infrastructure.cluster.x-k8s.io +metal3remediationtemplates.infrastructure.cluster.x-k8s.io +network-attachment-definitions.k8s.cni.cncf.io +networks.config.openshift.io +networks.operator.openshift.io +nodes.config.openshift.io +oauths.config.openshift.io +olmconfigs.operators.coreos.com +openshiftapiservers.operator.openshift.io +openshiftcontrollermanagers.operator.openshift.io +operatorconditions.operators.coreos.com +operatorgroups.operators.coreos.com +operatorhubs.config.openshift.io +operatorpkis.network.operator.openshift.io +operators.operators.coreos.com +overlappingrangeipreservations.whereabouts.cni.cncf.io +performanceprofiles.performance.openshift.io +podmonitors.monitoring.coreos.com +podnetworkconnectivitychecks.controlplane.operator.openshift.io +preprovisioningimages.metal3.io +probes.monitoring.coreos.com +profiles.tuned.openshift.io +projecthelmchartrepositories.helm.openshift.io +projects.config.openshift.io +prometheuses.monitoring.coreos.com +prometheusrules.monitoring.coreos.com +provisionings.metal3.io +proxies.config.openshift.io +rangeallocations.security.internal.openshift.io +rolebindingrestrictions.authorization.openshift.io +schedulers.config.openshift.io +securitycontextconstraints.security.openshift.io +servicecas.operator.openshift.io +servicemonitors.monitoring.coreos.com +storages.operator.openshift.io +storagestates.migration.k8s.io +storageversionmigrations.migration.k8s.io +subscriptions.operators.coreos.com +thanosrulers.monitoring.coreos.com +tuneds.tuned.openshift.io +volumesnapshotclasses.snapshot.storage.k8s.io +volumesnapshotcontents.snapshot.storage.k8s.io +volumesnapshots.snapshot.storage.k8s.io diff --git a/components/cluster-configs/adhoc-admin/cluster-reset/patch-job.yaml b/components/cluster-configs/adhoc-admin/cluster-reset/patch-job.yaml new file mode 100644 index 00000000..0d8a323a --- /dev/null +++ b/components/cluster-configs/adhoc-admin/cluster-reset/patch-job.yaml @@ -0,0 +1,20 @@ +apiVersion: batch/v1 +kind: Job +metadata: + name: adhoc-admin-helper +spec: + template: + spec: + containers: + - name: minion + env: + - name: ADHOC_SCRIPT + value: /scripts/custom/uninstall.sh + volumeMounts: + - name: custom + mountPath: /scripts/custom + volumes: + - name: custom + configMap: + name: demo-cleanup + defaultMode: 0755 diff --git a/components/cluster-configs/adhoc-admin/cluster-reset/uninstall.sh b/components/cluster-configs/adhoc-admin/cluster-reset/uninstall.sh new file mode 100755 index 00000000..459ebc48 --- /dev/null +++ b/components/cluster-configs/adhoc-admin/cluster-reset/uninstall.sh @@ -0,0 +1,143 @@ +#!/bin/bash +# shellcheck disable=SC2120 + +TIMEOUT=60 +DEFAULT_CRDS=ocp-default-crds-4.16.txt +UNWANTED_CRDS=/tmp/unwanted-crds.txt + +cd "$(dirname "$0")" && pwd + +self_distruct(){ + NAMESPACE=${1:-adhoc-admin} + [ -z "${NAMESPACE}" ] && return + echo " + engaging self cleaning... + removing project: ${NAMESPACE} in ${TIMEOUT}s + " + + sleep "${TIMEOUT}" + oc delete project "${NAMESPACE}" +} + +k8s_null_finalizers(){ + OBJ=${1} + [ -z "${OBJ}" ] && return + NS=${2} + [ -z "${NS}" ] || ARGS="-n ${NS}" + + # shellcheck disable=SC2086 + kubectl \ + patch "${OBJ}" \ + ${ARGS} \ + --type=merge \ + -p '{"metadata":{"finalizers":null}}' + # --type="json" \ + # -p '[{"op": "remove", "path":"/metadata/finalizers"}]' + + # shellcheck disable=SC2086 + kubectl delete ${ARGS} "${OBJ}" +} + +delete_namespaces(){ + xargs -l oc delete ns < namespaces.txt +} + +delete_machine_sets(){ + GPU_MACHINE_SET=$(oc -n openshift-machine-api get machinesets -o name | grep -E -v 'worker') + for set in ${GPU_MACHINE_SET} + do + oc -n openshift-machine-api delete "$set" + done +} + +get_unwanted_crds(){ + oc get crds -o name | sed 's/.*\///' > "${UNWANTED_CRDS}" + + for obj in $(< "${DEFAULT_CRDS}") + do + sed -i "/${obj}/d" "${UNWANTED_CRDS}" + done +} + +get_crs(){ + get_unwanted_crds + + for obj in $(< "${UNWANTED_CRDS}") + do + CR=$(oc get "${obj}" -A -o go-template='{{range .items}}'"${obj}"'/{{.metadata.name}}{{if .metadata.namespace}} {{.metadata.namespace}}{{end}}{{"\n"}}{{end}}') + [ -n "${CR// }" ] && echo "${CR}" + done +} + +delete_crs(){ + while read -r obj ns + do + k8s_null_finalizers "${obj}" "${ns}" + done < <(get_crs) +} + +delete_crds(){ + xargs -l oc delete crds < "${UNWANTED_CRDS}" +} + +delete_webhooks(){ + WEBHOOK=$(oc get validatingwebhookconfiguration,mutatingwebhookconfiguration -o name | grep -E 'tekton.dev|devfile|maistra') + for set in ${WEBHOOK} + do + oc -n openshift-machine-api delete "$set" + done +} + +delete_misc(){ + oc -n knative-serving delete knativeservings.operator.knative.dev knative-serving + oc -n openshift-operators delete deploy devworkspace-webhook-server + + oc delete consoleplugin console-plugin-nvidia-gpu +} + +delete_csvs(){ + + CSVS=( + operators.coreos.com/authorino-operator.openshift-operators + operators.coreos.com/devworkspace-operator.openshift-operators + operators.coreos.com/gpu-operator-certified.nvidia-gpu-operator + operators.coreos.com/openshift-pipelines-operator-rh.openshift-operators + operators.coreos.com/nfd.openshift-nfd + operators.coreos.com/rhods-operator.redhat-ods-operator + operators.coreos.com/servicemeshoperator.openshift-operators + operators.coreos.com/serverless-operator.openshift-serverless + operators.coreos.com/web-terminal.openshift-operators + ) + + # shellcheck disable=SC2068 + for csv in ${CSVS[@]} + do + # set csv to cleanup + oc get csv -A -l "${csv}" -o yaml | \ + sed 's/^ enabled: false/ enabled: true/' | \ + oc apply -f - + sleep 3 + oc delete csv -A -l "${csv}" + done +} + +uninstall_demo(){ + + echo "start: uninstall" + + delete_webhooks + delete_crs + delete_csvs + delete_machine_sets + delete_misc + + oc delete --ignore-not-found=true --timeout=0s --force -k https://github.com/adrezni/cluster-jump-start/demos/default + + delete_crds + delete_namespaces + + echo "end: uninstall" +} + +uninstall_demo +self_distruct diff --git a/components/cluster-configs/adhoc-admin/components/rhpds/job.yaml b/components/cluster-configs/adhoc-admin/components/fix-rhpds/job.yaml similarity index 100% rename from components/cluster-configs/adhoc-admin/components/rhpds/job.yaml rename to components/cluster-configs/adhoc-admin/components/fix-rhpds/job.yaml diff --git a/components/cluster-configs/adhoc-admin/components/rhpds/kustomization.yaml b/components/cluster-configs/adhoc-admin/components/fix-rhpds/kustomization.yaml similarity index 100% rename from components/cluster-configs/adhoc-admin/components/rhpds/kustomization.yaml rename to components/cluster-configs/adhoc-admin/components/fix-rhpds/kustomization.yaml diff --git a/components/cluster-configs/adhoc-admin/components/adhoc-terminal/adhoc-pod.yaml b/components/cluster-configs/adhoc-admin/components/hidden-chamber/adhoc-pod.yaml similarity index 100% rename from components/cluster-configs/adhoc-admin/components/adhoc-terminal/adhoc-pod.yaml rename to components/cluster-configs/adhoc-admin/components/hidden-chamber/adhoc-pod.yaml diff --git a/components/cluster-configs/adhoc-admin/components/adhoc-terminal/kustomization.yaml b/components/cluster-configs/adhoc-admin/components/hidden-chamber/kustomization.yaml similarity index 100% rename from components/cluster-configs/adhoc-admin/components/adhoc-terminal/kustomization.yaml rename to components/cluster-configs/adhoc-admin/components/hidden-chamber/kustomization.yaml diff --git a/components/cluster-configs/adhoc-admin/kustomization.yaml b/components/cluster-configs/adhoc-admin/kustomization.yaml new file mode 100644 index 00000000..66ccb471 --- /dev/null +++ b/components/cluster-configs/adhoc-admin/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +resources: + - base diff --git a/components/cluster-configs/autoscale/base/autoscaling.yaml b/components/cluster-configs/autoscale/base/autoscaling.yaml index d9c792ce..58f2e1f3 100644 --- a/components/cluster-configs/autoscale/base/autoscaling.yaml +++ b/components/cluster-configs/autoscale/base/autoscaling.yaml @@ -6,7 +6,7 @@ metadata: spec: podPriorityThreshold: -10 resourceLimits: - maxNodesTotal: 10 + maxNodesTotal: 16 cores: min: 0 # 16 cores * 7 nodes = 112 diff --git a/components/cluster-configs/machine-config/base/kustomization.yaml b/components/cluster-configs/machine-config/base/kustomization.yaml index 9ab56c59..3758306e 100644 --- a/components/cluster-configs/machine-config/base/kustomization.yaml +++ b/components/cluster-configs/machine-config/base/kustomization.yaml @@ -1,6 +1,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -resources: - - 99-master-ssh-machineconfig.yaml - - 99-worker-ssh-machineconfig.yaml +components: + - ../components/crio-disable-wipe + - ../components/ssh-config diff --git a/components/cluster-configs/machine-config/components/crio-disable-wipe/99-crio-disable-wipe.yaml b/components/cluster-configs/machine-config/components/crio-disable-wipe/99-crio-disable-wipe.yaml new file mode 100644 index 00000000..28ba2e3b --- /dev/null +++ b/components/cluster-configs/machine-config/components/crio-disable-wipe/99-crio-disable-wipe.yaml @@ -0,0 +1,34 @@ +--- +apiVersion: machineconfiguration.openshift.io/v1 +kind: MachineConfig +metadata: + labels: + machineconfiguration.openshift.io/role: master + name: 99-crio-disable-wipe-master +spec: + config: + ignition: + version: 3.2.0 + storage: + files: + - contents: + source: data:text/plain;charset=utf-8;base64,W2NyaW9dCmNsZWFuX3NodXRkb3duX2ZpbGUgPSAiIgo= + mode: 420 + path: /etc/crio/crio.conf.d/99-crio-disable-wipe.toml +--- +apiVersion: machineconfiguration.openshift.io/v1 +kind: MachineConfig +metadata: + labels: + machineconfiguration.openshift.io/role: worker + name: 99-crio-disable-wipe-worker +spec: + config: + ignition: + version: 3.2.0 + storage: + files: + - contents: + source: data:text/plain;charset=utf-8;base64,W2NyaW9dCmNsZWFuX3NodXRkb3duX2ZpbGUgPSAiIgo= + mode: 420 + path: /etc/crio/crio.conf.d/99-crio-disable-wipe.toml diff --git a/components/cluster-configs/machine-config/components/crio-disable-wipe/kustomization.yaml b/components/cluster-configs/machine-config/components/crio-disable-wipe/kustomization.yaml new file mode 100644 index 00000000..364a3825 --- /dev/null +++ b/components/cluster-configs/machine-config/components/crio-disable-wipe/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +resources: + - 99-crio-disable-wipe.yaml diff --git a/components/cluster-configs/machine-config/base/99-master-ssh-machineconfig.yaml b/components/cluster-configs/machine-config/components/ssh-config/99-master-ssh-machineconfig.yaml similarity index 100% rename from components/cluster-configs/machine-config/base/99-master-ssh-machineconfig.yaml rename to components/cluster-configs/machine-config/components/ssh-config/99-master-ssh-machineconfig.yaml diff --git a/components/cluster-configs/machine-config/base/99-worker-ssh-machineconfig.yaml b/components/cluster-configs/machine-config/components/ssh-config/99-worker-ssh-machineconfig.yaml similarity index 100% rename from components/cluster-configs/machine-config/base/99-worker-ssh-machineconfig.yaml rename to components/cluster-configs/machine-config/components/ssh-config/99-worker-ssh-machineconfig.yaml diff --git a/components/cluster-configs/machine-config/components/ssh-config/kustomization.yaml b/components/cluster-configs/machine-config/components/ssh-config/kustomization.yaml new file mode 100644 index 00000000..cd5357ee --- /dev/null +++ b/components/cluster-configs/machine-config/components/ssh-config/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +resources: + - 99-master-ssh-machineconfig.yaml + - 99-worker-ssh-machineconfig.yaml diff --git a/components/operators/ack-system/SETUP.md b/components/operators/ack-system/SETUP.md index c3d7b19b..e5f70042 100644 --- a/components/operators/ack-system/SETUP.md +++ b/components/operators/ack-system/SETUP.md @@ -1,16 +1,16 @@ -## Setup AWS Controllers for Kubernetes / ACK Operators +# Setup AWS Controllers for Kubernetes / ACK Operators Create AWS users (service principles) NOTICE: Keep output from `aws iam create-access-key ...` -``` +```sh # create s3 user aws iam create-user --user-name ack-user-s3 aws iam create-access-key --user-name ack-user-s3 ``` -``` +```sh # create sagemaker user aws iam create-user --user-name ack-user-sagemaker aws iam create-access-key --user-name ack-user-sagemaker @@ -18,21 +18,18 @@ aws iam create-access-key --user-name ack-user-sagemaker Assign Amazon Resource Name (ARN) policy to users -``` - +```sh # attach user policy - s3 aws iam attach-user-policy \ --user-name ack-user-s3 \ --policy-arn 'arn:aws:iam::aws:policy/AmazonS3FullAccess' - ``` -``` +```sh # attach user policy - sagemaker (ec2,sagemaker) aws iam attach-user-policy \ --user-name ack-user-sagemaker \ --policy-arn 'arn:aws:iam::aws:policy/AmazonSageMakerFullAccess' - ``` ## Links diff --git a/components/operators/ack-system/base/user-config-cm.yaml b/components/operators/ack-system/base/user-config-cm.yaml index 4258fb2f..ee6a49bd 100644 --- a/components/operators/ack-system/base/user-config-cm.yaml +++ b/components/operators/ack-system/base/user-config-cm.yaml @@ -12,3 +12,4 @@ data: ENABLE_LEADER_ELECTION: "true" LEADER_ELECTION_NAMESPACE: "" RECONCILE_DEFAULT_MAX_CONCURRENT_SYNCS: "1" + FEATURE_GATES: "ResourceAdoption=true" diff --git a/components/operators/authorino-operator/README.md b/components/operators/authorino-operator/README.md index a23a0d2a..28756321 100644 --- a/components/operators/authorino-operator/README.md +++ b/components/operators/authorino-operator/README.md @@ -6,6 +6,7 @@ Do not use the `base` directory directly, as you will need to patch the `channel The current *overlays* available are for the following channels: +* [stable](operator/overlays/stable) * [tech-preview-v1](operator/overlays/tech-preview-v1) ## Usage diff --git a/components/operators/authorino-operator/operator/overlays/stable/kustomization.yaml b/components/operators/authorino-operator/operator/overlays/stable/kustomization.yaml new file mode 100644 index 00000000..143f1e5b --- /dev/null +++ b/components/operators/authorino-operator/operator/overlays/stable/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../../base + +patches: + - target: + kind: Subscription + name: authorino-operator + path: patch-channel.yaml diff --git a/components/operators/authorino-operator/operator/overlays/stable/patch-channel.yaml b/components/operators/authorino-operator/operator/overlays/stable/patch-channel.yaml new file mode 100644 index 00000000..6642eb17 --- /dev/null +++ b/components/operators/authorino-operator/operator/overlays/stable/patch-channel.yaml @@ -0,0 +1,3 @@ +- op: replace + path: /spec/channel + value: stable diff --git a/components/operators/rhods-operator/instance/overlays/minimal/kustomization.yaml b/components/operators/rhods-operator/instance/overlays/minimal/kustomization.yaml index 434523e3..f35457af 100644 --- a/components/operators/rhods-operator/instance/overlays/minimal/kustomization.yaml +++ b/components/operators/rhods-operator/instance/overlays/minimal/kustomization.yaml @@ -6,6 +6,7 @@ resources: components: - ../../components/additional-namespaces + - ../../components/components-training - ../../components/config-access-everyone - ../../components/disable-telemetry - ../../components/fix-kubeadmin-cluster-admin diff --git a/clusters/README.md b/demos/components/clusters/README.md similarity index 100% rename from clusters/README.md rename to demos/components/clusters/README.md diff --git a/clusters/argo-managed/base/argocd-instance.yaml b/demos/components/clusters/argo-managed/base/argocd-instance.yaml similarity index 100% rename from clusters/argo-managed/base/argocd-instance.yaml rename to demos/components/clusters/argo-managed/base/argocd-instance.yaml diff --git a/clusters/argo-managed/base/argocd-repo-https.yaml b/demos/components/clusters/argo-managed/base/argocd-repo-https.yaml similarity index 100% rename from clusters/argo-managed/base/argocd-repo-https.yaml rename to demos/components/clusters/argo-managed/base/argocd-repo-https.yaml diff --git a/clusters/argo-managed/base/argocd-repo-ssh-ss.yaml b/demos/components/clusters/argo-managed/base/argocd-repo-ssh-ss.yaml similarity index 100% rename from clusters/argo-managed/base/argocd-repo-ssh-ss.yaml rename to demos/components/clusters/argo-managed/base/argocd-repo-ssh-ss.yaml diff --git a/clusters/argo-managed/base/kustomization.yaml b/demos/components/clusters/argo-managed/base/kustomization.yaml similarity index 100% rename from clusters/argo-managed/base/kustomization.yaml rename to demos/components/clusters/argo-managed/base/kustomization.yaml diff --git a/clusters/argo-managed/overlays/default/kustomization.yaml b/demos/components/clusters/argo-managed/overlays/default/kustomization.yaml similarity index 95% rename from clusters/argo-managed/overlays/default/kustomization.yaml rename to demos/components/clusters/argo-managed/overlays/default/kustomization.yaml index c04fe5de..89bcba80 100644 --- a/clusters/argo-managed/overlays/default/kustomization.yaml +++ b/demos/components/clusters/argo-managed/overlays/default/kustomization.yaml @@ -3,7 +3,7 @@ kind: Kustomization resources: - ../../base - - ../../../../components/argocd/apps/overlays/manual-user-config + - ../../../../../../components/argocd/apps/overlays/manual-user-config patches: - target: diff --git a/demos/components/clusters/default/kustomization.yaml b/demos/components/clusters/default/kustomization.yaml new file mode 100644 index 00000000..aad88b96 --- /dev/null +++ b/demos/components/clusters/default/kustomization.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: +- ../../../../components/app-configs/ubi-images/overlays/cluster +- ../../../../components/cluster-configs/autoscale/overlays/default +- ../../../../components/cluster-configs/console-config/overlays/default +- ../../../../components/cluster-configs/console-samples + +# - ../../../../components/cluster-configs/etcd-backup/overlays/default +# - ../../../../components/cluster-configs/namespace-cleanup/overlays/sandbox + +- ../../../../components/cluster-configs/login/overlays/htpasswd +- ../../../../components/cluster-configs/namespaces/overlays/default +- ../../../../components/cluster-configs/rbac/overlays/no-self-provisioner + +- ../../../../components/operators/web-terminal/operator/overlays/fast +- ../../../../components/operators/web-terminal/instance/overlays/enhanced diff --git a/demos/components/install-argocd/kustomization.yaml b/demos/components/install-argocd/kustomization.yaml new file mode 100644 index 00000000..945e44ba --- /dev/null +++ b/demos/components/install-argocd/kustomization.yaml @@ -0,0 +1,8 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ../../../components/argocd/projects/overlays/default + - ../../../components/operators/openshift-gitops-operator/instance/overlays/default + - ../../../components/operators/openshift-gitops-operator/operator/overlays/latest + # - ../../../clusters/argo-managed/overlays/default diff --git a/demos/components/install-web-terminal/kustomization.yaml b/demos/components/install-web-terminal/kustomization.yaml new file mode 100644 index 00000000..a2c4b63c --- /dev/null +++ b/demos/components/install-web-terminal/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: +- ../../../components/operators/web-terminal/operator/overlays/fast +- ../../../components/operators/web-terminal/instance/overlays/enhanced diff --git a/demos/components/rhoai/approve-after-servicemesh/job.sh b/demos/components/rhoai-servicemesh/approve-after-servicemesh/job.sh similarity index 100% rename from demos/components/rhoai/approve-after-servicemesh/job.sh rename to demos/components/rhoai-servicemesh/approve-after-servicemesh/job.sh diff --git a/demos/components/rhoai/approve-after-servicemesh/job.yaml b/demos/components/rhoai-servicemesh/approve-after-servicemesh/job.yaml similarity index 100% rename from demos/components/rhoai/approve-after-servicemesh/job.yaml rename to demos/components/rhoai-servicemesh/approve-after-servicemesh/job.yaml diff --git a/demos/components/rhoai/approve-after-servicemesh/kustomization.yaml b/demos/components/rhoai-servicemesh/approve-after-servicemesh/kustomization.yaml similarity index 100% rename from demos/components/rhoai/approve-after-servicemesh/kustomization.yaml rename to demos/components/rhoai-servicemesh/approve-after-servicemesh/kustomization.yaml diff --git a/demos/components/rhoai-servicemesh/kustomization.yaml b/demos/components/rhoai-servicemesh/kustomization.yaml new file mode 100644 index 00000000..f32379ae --- /dev/null +++ b/demos/components/rhoai-servicemesh/kustomization.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +components: + - approve-after-servicemesh + +resources: + - ../../../components/operators/rhods-operator/operator/overlays/stable + +patches: + # kludge: allow servicemesh to install before rhoai + - target: + kind: Subscription + name: rhods-operator + patch: |- + - op: replace + path: /spec/installPlanApproval + value: Manual diff --git a/demos/components/rhoai/kustomization.yaml b/demos/components/rhoai/kustomization.yaml index f32379ae..67469d53 100644 --- a/demos/components/rhoai/kustomization.yaml +++ b/demos/components/rhoai/kustomization.yaml @@ -1,18 +1,5 @@ apiVersion: kustomize.config.k8s.io/v1alpha1 kind: Component -components: - - approve-after-servicemesh - resources: - ../../../components/operators/rhods-operator/operator/overlays/stable - -patches: - # kludge: allow servicemesh to install before rhoai - - target: - kind: Subscription - name: rhods-operator - patch: |- - - op: replace - path: /spec/installPlanApproval - value: Manual diff --git a/demos/all-the-things/kustomization.yaml b/demos/overlays/all-the-things/kustomization.yaml similarity index 66% rename from demos/all-the-things/kustomization.yaml rename to demos/overlays/all-the-things/kustomization.yaml index 0d19997d..3fe5ae76 100644 --- a/demos/all-the-things/kustomization.yaml +++ b/demos/overlays/all-the-things/kustomization.yaml @@ -2,13 +2,13 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization components: - - ../components/aws-nvidia-gpu-autoscale - - ../components/devspaces - - ../components/rhoai - - ../components/rhoai-intel + - ../../components/aws-nvidia-gpu-autoscale + - ../../components/devspaces + - ../../components/rhoai + - ../../components/rhoai-intel resources: - - ../base + - ../../base patches: - target: diff --git a/demos/devspaces-nvidia-gpu-autoscale/kustomization.yaml b/demos/overlays/devspaces-nvidia-gpu-autoscale/kustomization.yaml similarity index 75% rename from demos/devspaces-nvidia-gpu-autoscale/kustomization.yaml rename to demos/overlays/devspaces-nvidia-gpu-autoscale/kustomization.yaml index fbe4aea6..a8c3cc6f 100644 --- a/demos/devspaces-nvidia-gpu-autoscale/kustomization.yaml +++ b/demos/overlays/devspaces-nvidia-gpu-autoscale/kustomization.yaml @@ -2,11 +2,11 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization components: - - ../components/aws-nvidia-gpu-autoscale - - ../components/devspaces + - ../../components/aws-nvidia-gpu-autoscale + - ../../components/devspaces resources: - - ../base + - ../../base patches: - target: diff --git a/demos/devspaces/kustomization.yaml b/demos/overlays/devspaces/kustomization.yaml similarity index 85% rename from demos/devspaces/kustomization.yaml rename to demos/overlays/devspaces/kustomization.yaml index 75517adb..2fe3e1b9 100644 --- a/demos/devspaces/kustomization.yaml +++ b/demos/overlays/devspaces/kustomization.yaml @@ -2,10 +2,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization components: - - ../components/devspaces + - ../../components/devspaces resources: - - ../base + - ../../base patches: - target: diff --git a/demos/nvidia-gpu-autoscale/kustomization.yaml b/demos/overlays/nvidia-gpu-autoscale/kustomization.yaml similarity index 82% rename from demos/nvidia-gpu-autoscale/kustomization.yaml rename to demos/overlays/nvidia-gpu-autoscale/kustomization.yaml index f83f7621..b86dbec0 100644 --- a/demos/nvidia-gpu-autoscale/kustomization.yaml +++ b/demos/overlays/nvidia-gpu-autoscale/kustomization.yaml @@ -2,10 +2,10 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization components: - - ../components/aws-nvidia-gpu-autoscale + - ../../components/aws-nvidia-gpu-autoscale resources: - - ../base + - ../../base patches: - target: diff --git a/demos/rhoai-intel/kustomization.yaml b/demos/overlays/rhoai-intel/kustomization.yaml similarity index 90% rename from demos/rhoai-intel/kustomization.yaml rename to demos/overlays/rhoai-intel/kustomization.yaml index 0152cf47..ea1c6ba3 100644 --- a/demos/rhoai-intel/kustomization.yaml +++ b/demos/overlays/rhoai-intel/kustomization.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization components: - - ../components/rhoai-intel + - ../../components/rhoai-intel resources: - ../rhoai-minimal diff --git a/demos/rhoai-minimal/kustomization.yaml b/demos/overlays/rhoai-minimal/kustomization.yaml similarity index 71% rename from demos/rhoai-minimal/kustomization.yaml rename to demos/overlays/rhoai-minimal/kustomization.yaml index 733924d5..1ec2aeee 100644 --- a/demos/rhoai-minimal/kustomization.yaml +++ b/demos/overlays/rhoai-minimal/kustomization.yaml @@ -2,11 +2,11 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization components: -- ../components/rhoai +- ../../components/rhoai resources: - - ../base - - ../../components/operators/rhods-operator/instance/overlays/minimal + - ../../base + - ../../../components/operators/rhods-operator/instance/overlays/minimal patches: - target: diff --git a/demos/rhoai-nvidia-gpu-autoscale/kustomization.yaml b/demos/overlays/rhoai-nvidia-gpu-autoscale/kustomization.yaml similarity index 74% rename from demos/rhoai-nvidia-gpu-autoscale/kustomization.yaml rename to demos/overlays/rhoai-nvidia-gpu-autoscale/kustomization.yaml index 3210b213..82eaebb7 100644 --- a/demos/rhoai-nvidia-gpu-autoscale/kustomization.yaml +++ b/demos/overlays/rhoai-nvidia-gpu-autoscale/kustomization.yaml @@ -2,11 +2,11 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization components: - - ../components/aws-nvidia-gpu-autoscale - - ../components/rhoai + - ../../components/aws-nvidia-gpu-autoscale + - ../../components/rhoai-servicemesh resources: - - ../base + - ../../base patches: - target: diff --git a/demos/overlays/rhoai-workshop-ready/kustomization.yaml b/demos/overlays/rhoai-workshop-ready/kustomization.yaml new file mode 100644 index 00000000..cfac1ed1 --- /dev/null +++ b/demos/overlays/rhoai-workshop-ready/kustomization.yaml @@ -0,0 +1,18 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +components: + - ../../components/rhoai-prereqs + +resources: + - ../rhoai-nvidia-gpu-autoscale + - ../../../components/operators/rhods-operator/instance/overlays/all + +patches: + - target: + kind: ConsoleNotification + name: banner-demo + patch: |- + - op: replace + path: /spec/text + value: 'DEMO: Red Hat OpenShift AI (RHOAI)' diff --git a/demos/rhoai-workshop-ready/kustomization.yaml b/demos/rhoai-workshop-ready/kustomization.yaml deleted file mode 100644 index 2bf6f8ed..00000000 --- a/demos/rhoai-workshop-ready/kustomization.yaml +++ /dev/null @@ -1,41 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -components: - - ../components/rhoai-prereqs - -resources: - - ../rhoai-nvidia-gpu-autoscale - - ../../components/operators/rhods-operator/instance/overlays/all - - # - ../../components/app-configs/rhoai-config - # TODO: reconcile issues with item above - - # - ../../components/app-configs/custom-notebook-images/overlays/rhoai - # - ../../components/app-configs/minio/overlays/with-namespace - # - ../../components/app-configs/rhoai-config - # - ../../components/app-configs/rhoai-data-connector/overlays/group-project - # - ../../components/app-configs/rhoai-data-connector/overlays/kserve-project - # - ../../components/app-configs/rhoai-data-connector/overlays/modelmesh-project - # - ../../components/app-configs/rhoai-modelmesh/overlays/modelmesh-project - # - ../../components/app-configs/rhoai-model-runtimes - # - ../../components/app-configs/rhoai-kserve-instances - # - ../../components/app-configs/rhoai-notebook/overlays/group-project - # - ../../components/app-configs/rhoai-pipelines/overlays/group-project - # - ../../components/app-configs/rhoai-projects - # - ../../components/app-configs/rhoai-rbac - # - ../../components/app-configs/rhoai-rbac-notebooks - -patches: - - target: - kind: ConsoleNotification - name: banner-demo - patch: |- - - op: replace - path: /spec/text - value: 'DEMO: Red Hat OpenShift AI (RHOAI)' - # - target: - # group: user.openshift.io - # kind: Group - # name: workshop-users - # path: patch-workshop-users.yaml diff --git a/demos/rhoai-workshop-ready/patch-workshop-users.yaml b/demos/rhoai-workshop-ready/patch-workshop-users.yaml deleted file mode 100644 index 8e85a277..00000000 --- a/demos/rhoai-workshop-ready/patch-workshop-users.yaml +++ /dev/null @@ -1,8 +0,0 @@ -- op: replace - path: /users - value: - - agentpanda - - darkrainbow - - claymore - - user1 - - user2 diff --git a/demos/rhoai-minimal/NOTES.md b/docs/RHOAI.md similarity index 98% rename from demos/rhoai-minimal/NOTES.md rename to docs/RHOAI.md index 1aecacff..f9405bfd 100644 --- a/demos/rhoai-minimal/NOTES.md +++ b/docs/RHOAI.md @@ -46,7 +46,6 @@ Error: default-dsci ## Data Science Pipelines -- [ ] Do they really work? Maybe, Sometimes, No - [ ] Pipelines are stored in the mariadb instance instead of cluster resources like a CR - Table `run_details` contains field `WorkflowSpecManifest` contains `PipelineRun` - [ ] `mariadb-pipelines-definition` Deployment sets env var `MYSQL_ALLOW_EMPTY_PASSWORD=true` (Security: Data Exposure) diff --git a/scripts/library/k8s.sh b/scripts/library/k8s.sh index 51f6983f..5b73524e 100644 --- a/scripts/library/k8s.sh +++ b/scripts/library/k8s.sh @@ -115,11 +115,19 @@ k8s_ns_delete_most_resources_force(){ done } -k8s_api_start_proxy(){ - echo "k8s api proxy: starting..." - kubectl proxy -p 8001 & - API_PROXY_PID=$! - sleep 3 +k8s_api_proxy(){ + ACTION=${1:-start} + PORT=${2:-8001} + + if [ "${ACTION}" = "start" ]; then + echo "k8s api proxy: starting..." + kubectl proxy -p "${PORT}" & + API_PROXY_PID=$! + sleep 3 + else + echo "k8s api proxy: stopping..." + kill "${API_PROXY_PID}" + fi } # do core resources first, which are at a separate api location @@ -145,12 +153,10 @@ k8s_api_dump_noncore(){ } k8s_api_dump_resources(){ - k8s_api_start_proxy + k8s_api_proxy start k8s_api_dump_core k8s_api_dump_noncore - - echo "k8s api proxy: stopping..." - kill "${API_PROXY_PID}" + k8s_api_proxy stop } k8s_delete_extended_resource_on_all_nodes(){ diff --git a/workshops/base/kustomization.yaml b/workshops/base/kustomization.yaml index 63ed3632..0173efe8 100644 --- a/workshops/base/kustomization.yaml +++ b/workshops/base/kustomization.yaml @@ -3,7 +3,7 @@ kind: Kustomization resources: # - ../../components/app-configs/rhoai-config -- ../../demos/rhoai-workshop-ready +- ../../demos/overlays/rhoai-workshop-ready - ../../components/cluster-configs/rbac/overlays/workshop - ../../components/cluster-configs/login/overlays/htpasswd diff --git a/workshops/overlays/parasol-insurance/00-prereqs/kustomization.yaml b/workshops/overlays/parasol-insurance/00-prereqs/kustomization.yaml index 5357fa5e..f782056c 100644 --- a/workshops/overlays/parasol-insurance/00-prereqs/kustomization.yaml +++ b/workshops/overlays/parasol-insurance/00-prereqs/kustomization.yaml @@ -2,7 +2,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - - ../../../../demos/rhoai-workshop-ready + - ../../../../demos/overlays/rhoai-workshop-ready patches: - target: diff --git a/workshops/overlays/parasol-insurance/xx-image-cache/image-puller-app/kustomization.yaml b/workshops/overlays/parasol-insurance/xx-image-cache/image-puller-app/kustomization.yaml index 94003556..d04ea46c 100644 --- a/workshops/overlays/parasol-insurance/xx-image-cache/image-puller-app/kustomization.yaml +++ b/workshops/overlays/parasol-insurance/xx-image-cache/image-puller-app/kustomization.yaml @@ -3,7 +3,7 @@ kind: Kustomization namespace: image-puller -resources: +components: - ../../../../../components/app-configs/image-puller/base patches: diff --git a/workshops/overlays/parasol-insurance/xx-image-cache/image-puller-pipelines/kustomization.yaml b/workshops/overlays/parasol-insurance/xx-image-cache/image-puller-pipelines/kustomization.yaml index 683a15cb..56c1d0ac 100644 --- a/workshops/overlays/parasol-insurance/xx-image-cache/image-puller-pipelines/kustomization.yaml +++ b/workshops/overlays/parasol-insurance/xx-image-cache/image-puller-pipelines/kustomization.yaml @@ -3,7 +3,7 @@ kind: Kustomization namespace: image-puller -resources: +components: - ../../../../../components/app-configs/image-puller/base patches: diff --git a/workshops/overlays/parasol-insurance/xx-image-cache/image-puller-workbench/kustomization.yaml b/workshops/overlays/parasol-insurance/xx-image-cache/image-puller-workbench/kustomization.yaml index 8c269af5..40209bc4 100644 --- a/workshops/overlays/parasol-insurance/xx-image-cache/image-puller-workbench/kustomization.yaml +++ b/workshops/overlays/parasol-insurance/xx-image-cache/image-puller-workbench/kustomization.yaml @@ -3,7 +3,7 @@ kind: Kustomization namespace: image-puller -resources: +components: - ../../../../../components/app-configs/image-puller/base patches: