diff --git a/.gitignore b/.gitignore index 6ff87be5..42d3bf21 100644 --- a/.gitignore +++ b/.gitignore @@ -186,3 +186,4 @@ deploy/helm/rag-values.yaml deploy/helm/rag/Chart.lock deploy/helm/values.yaml deploy/helm/bootstrap-values.yaml +tenant/bootstrap/bootstrap-values.yaml diff --git a/deploy/helm/bootstrap/templates/applicationset-rag.yaml b/deploy/helm/bootstrap/templates/applicationset-rag.yaml deleted file mode 100644 index 4566ee41..00000000 --- a/deploy/helm/bootstrap/templates/applicationset-rag.yaml +++ /dev/null @@ -1,44 +0,0 @@ -{{ if .Values.rag -}} ---- -apiVersion: argoproj.io/v1alpha1 -kind: ApplicationSet -metadata: - name: rag - namespace: {{ .Values.gitops.namespace }} -spec: - generators: - - list: - elements: -{{- $userCount := int .Values.user.count }} -{{- range $index := until $userCount }} - - user: {{ $.Values.user.prefix }}{{ add $index 1}} -{{- end }} - template: - metadata: - name: rag-{{- "{{" }} user {{- " }}" }} - namespace: {{ .Values.gitops.namespace }} - spec: - project: default - source: - repoURL: {{ .Values.rag.git.url }} - targetRevision: {{ .Values.rag.git.revision }} - path: {{ .Values.rag.git.path }} - helm: - values: | -{{ toYaml .Values.rag.values | nindent 12 }} - destination: - server: https://kubernetes.default.svc - namespace: '{{ .Values.rag.namespace }}-{{- "{{" }} user {{- " }}" }}-{{ .Values.guid }}' - syncPolicy: - automated: - prune: false - selfHeal: false - syncOptions: - - CreateNamespace=true - retry: - limit: 30 - backoff: - duration: "5s" - factor: 2 - maxDuration: "5m" -{{- end }} \ No newline at end of file diff --git a/deploy/helm/rag/Chart.yaml b/deploy/helm/rag/Chart.yaml index a362bd2a..e1b0d9a1 100644 --- a/deploy/helm/rag/Chart.yaml +++ b/deploy/helm/rag/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: rag description: A Helm chart for Kubernetes type: application -version: 0.2.36 -appVersion: "0.2.36" +version: 0.2.37 +appVersion: "0.2.37" dependencies: - name: pgvector diff --git a/deploy/helm/rag/values.yaml b/deploy/helm/rag/values.yaml index 458feda5..bd8589ac 100644 --- a/deploy/helm/rag/values.yaml +++ b/deploy/helm/rag/values.yaml @@ -3,7 +3,7 @@ replicaCount: 1 image: repository: quay.io/rh-ai-quickstart/llamastack-dist-ui pullPolicy: Always - tag: 0.2.36 + tag: 0.2.37 service: type: ClusterIP diff --git a/docs/RHDP_Onboarding.md b/docs/RHDP_Onboarding.md new file mode 100644 index 00000000..90f99aaf --- /dev/null +++ b/docs/RHDP_Onboarding.md @@ -0,0 +1,59 @@ +# RHDP Onboarding + +This document describes the intended repository layout for RHDP onboarding and how each bootstrap area fits into the GitOps flow for the RAG quickstart. + +## Target Directory Structure + +```text +tenant/ + bootstrap/ # Helm chart to create Argo CD Application for the RAG quickstart +infra/ + bootstrap/ # Helm chart to install required cluster operators/infrastructure +platform/ + bootstrap/ # Helm chart to create platform CRs and OpenShift UI plugins +``` + +## 1) `tenant/bootstrap` + +Purpose: +- Owns tenant-scoped onboarding for the quickstart. +- Creates an Argo CD `Application` object. +- That `Application` points to the RAG chart and drives deployment/sync of the quickstart application. + +Typical responsibilities: +- Argo CD `Application` definition (repo URL, path, revision, destination namespace). +- Passing Helm values to the RAG chart. +- Optional tenant-related RBAC needed for reconciliation. + +## 2) `infra/bootstrap` + +Purpose: +- Owns cluster/operator prerequisites required by the quickstart. +- Installs platform services and operators needed before tenant app deployment. + +Typical responsibilities: +- Operator subscriptions or chart-based operator installs. +- Shared infra dependencies (for example: data science operators, serving stack prerequisites, pipeline dependencies, etc.). +- Cluster-wide setup needed by multiple tenants. + +## 3) `platform/bootstrap` + +Purpose: +- Owns platform-level custom resources and UI integrations. +- Creates cluster/platform objects that are not tenant app manifests. + +Typical responsibilities: +- Custom resources used by the platform layer. +- OpenShift console/UI plugins and related configuration. +- Platform controls and integrations shared across workloads. + +## Recommended Flow + +1. `infra/bootstrap` provisions required operators and cluster prerequisites. +2. `platform/bootstrap` applies platform-level CRs/plugins. +3. `tenant/bootstrap` creates the Argo CD `Application` that deploys the RAG quickstart for a tenant namespace. + +This separation keeps ownership clear: +- Infra team manages prerequisites. +- Platform team manages shared platform objects and plugins. +- Tenant/app team manages quickstart app onboarding through GitOps `Application` objects. diff --git a/infra/README.md b/infra/README.md new file mode 100644 index 00000000..07553fdc --- /dev/null +++ b/infra/README.md @@ -0,0 +1,3 @@ +## Infra + +The `bootstrap` directory contains a Helm chart with the files used to deploy the operators required by this quickstart. diff --git a/platform/README.md b/platform/README.md new file mode 100644 index 00000000..817854b8 --- /dev/null +++ b/platform/README.md @@ -0,0 +1,3 @@ +## Platform + +The `bootstrap` directory contains a Helm chart with the files used to deploy cluster-wide resources and custom plugins for this quickstart. diff --git a/tenant/README.md b/tenant/README.md new file mode 100644 index 00000000..acb0e2fa --- /dev/null +++ b/tenant/README.md @@ -0,0 +1,3 @@ +## Tenant + +The `bootstrap` directory contains a Helm chart with the files used to deploy an Argo CD `Application` that deploys the RAG quickstart application. diff --git a/deploy/helm/bootstrap/Chart.yaml b/tenant/bootstrap/Chart.yaml similarity index 100% rename from deploy/helm/bootstrap/Chart.yaml rename to tenant/bootstrap/Chart.yaml diff --git a/tenant/bootstrap/templates/application-rag.yaml b/tenant/bootstrap/templates/application-rag.yaml new file mode 100644 index 00000000..ec342a51 --- /dev/null +++ b/tenant/bootstrap/templates/application-rag.yaml @@ -0,0 +1,32 @@ +{{ if .Values.rag -}} +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: {{ .Values.tenant.name }} + namespace: {{ .Values.gitops.namespace }} +spec: + project: default + source: + repoURL: {{ .Values.rag.git.url }} + targetRevision: {{ .Values.rag.git.revision }} + path: {{ .Values.rag.git.path }} + helm: + values: | +{{ toYaml .Values.rag.values | nindent 12 }} + destination: + server: https://kubernetes.default.svc + namespace: '{{ .Values.rag.namespace }}' + syncPolicy: + automated: + prune: false + selfHeal: false + syncOptions: + - CreateNamespace=true + retry: + limit: 30 + backoff: + duration: "5s" + factor: 2 + maxDuration: "5m" +{{- end }} \ No newline at end of file diff --git a/deploy/helm/bootstrap/templates/rbac-argocd-controller.yaml b/tenant/bootstrap/templates/rbac-argocd-controller.yaml similarity index 100% rename from deploy/helm/bootstrap/templates/rbac-argocd-controller.yaml rename to tenant/bootstrap/templates/rbac-argocd-controller.yaml diff --git a/deploy/helm/bootstrap/values.yaml b/tenant/bootstrap/values.yaml similarity index 78% rename from deploy/helm/bootstrap/values.yaml rename to tenant/bootstrap/values.yaml index 99690375..798b1b59 100644 --- a/deploy/helm/bootstrap/values.yaml +++ b/tenant/bootstrap/values.yaml @@ -2,18 +2,23 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. -user: - count: 1 - prefix: user +deployer: + domain: "apps.cluster-guid.example.com" + apiUrl: "https://api.cluster-guid.example.com" + guid: "abcde" -guid: abcde +tenant: + name: "tenant-name" + user: + name: "user-name" + password: "user-password" gitops: namespace: openshift-gitops applicationControllerServiceAccount: openshift-gitops-argocd-application-controller rbac: - enabled: true + enabled: false clusterRoleName: argocd-rag-bootstrap-manager # Set to empty to NOT create workspaces