diff --git a/docs/platform/enterprise-platform/deploy-suse-rancher.mdx b/docs/platform/enterprise-platform/deploy-suse-rancher.mdx new file mode 100644 index 000000000..1ad5ace7c --- /dev/null +++ b/docs/platform/enterprise-platform/deploy-suse-rancher.mdx @@ -0,0 +1,298 @@ +--- +title: Deploy on SUSE Rancher Prime +description: + Install the Stacklok Enterprise platform on an RKE2 cluster that SUSE Rancher + Prime manages, including clusters that run SUSE AI Factory. +--- + +Use this guide to install the Stacklok Enterprise platform on an RKE2 cluster +that SUSE Rancher Prime manages. You install the same umbrella chart as in +[Deploy the platform](./deployment.mdx), from Rancher Apps. This guide covers +what differs on Rancher-managed RKE2: the chart repository, Pod Security, the +RKE2 network values, ingress with Traefik, and the databases. The same steps +apply to a cluster that runs SUSE AI Factory. + +## Prerequisites + +- A downstream RKE2 cluster that SUSE Rancher Prime manages. The platform runs + on clusters that use the RKE2 CIS profile and the `rancher-restricted` Pod + Security Admission template. +- Your Stacklok Enterprise license email and **License ID**, from the install + portal at [install.stacklok.com](https://install.stacklok.com). +- The Secrets and the values file from + [Step 2](./deployment.mdx#2-prepare-secrets) and + [Step 3](./deployment.mdx#3-configure-values) of Deploy the platform. This + guide uses the `stacklok-system` namespace. +- `kubectl` access to the downstream cluster. + +## Add the chart repository in Rancher + +Rancher Apps installs the umbrella chart from the Stacklok OCI registry. The +registry authenticates with your license. + +1. In the downstream cluster, create a `kubernetes.io/basic-auth` Secret in the + `cattle-system` namespace. Set `username` to your license email and + `password` to your License ID: + + ```bash + kubectl create secret generic stacklok-enterprise-registry \ + --namespace cattle-system \ + --type kubernetes.io/basic-auth \ + --from-literal=username= \ + --from-literal=password= + ``` + +1. In Rancher, open the downstream cluster, then select **Apps** > + **Repositories** > **Create**. +1. Select **OCI Repository** and set the URL to the chart itself: + + ```text + oci://oci.stacklok.com/stacklok-enterprise//stacklok-enterprise-platform + ``` + + Rancher then lists the chart versions directly. Use the channel slug from the + install portal. + +1. Under authentication, select the `stacklok-enterprise-registry` Secret from + the first step. + +## Install the platform from Rancher Apps + +1. Select **Apps** > **Charts**, then select **stacklok-enterprise-platform**. +1. Select the chart version from the install portal, and set the namespace to + `stacklok-system`. +1. Paste your values file from [Step 3](./deployment.mdx#3-configure-values), + with the RKE2 values from this guide added. +1. Select **Install**. + +The registry adds the license and the image pull credentials to the chart values +when Rancher pulls the chart, so your values file carries no license. The +release appears under **Apps** > **Installed Apps**. + +A Rancher Apps install and a `helm install` render the same manifests. The chart +reads no `global.cattle.*` values, so you can also install it with `helm` as +described in [Step 4](./deployment.mdx#4-install-the-chart) of Deploy the +platform. + +## Pod Security + +The platform runs under the `rancher-restricted` template with no namespace +exemption. Every platform pod meets the Kubernetes `restricted` Pod Security +level. That includes the MCP server and proxy pods that the ToolHive Operator +creates. + +To check a namespace, ask the API server which running pods would violate the +`restricted` level. This dry run changes nothing: + +```bash +kubectl label --dry-run=server --overwrite namespace stacklok-system \ + pod-security.kubernetes.io/enforce=restricted +``` + +A compliant namespace prints only +`namespace/stacklok-system labeled (server dry run)`. A violation prints a +`Warning: existing pods ... violate` line that names the pod. + +## Set the RKE2 network values + +RKE2 uses the pod CIDR `10.42.0.0/16` and the service CIDR `10.43.0.0/16` by +default. Add these values, with your cluster's CIDRs if you changed them: + +```yaml title="values.yaml" +enterprise-manager: + directory: + connectorVerification: + # Discovered MCP servers resolve to pod and Service addresses. + allowedPrivateRanges: + - '10.42.0.0/16' + - '10.43.0.0/16' + grpc: + callerAuth: + # The RKE2 service account token issuer. + clusterOidcIssuer: 'https://kubernetes.default.svc.cluster.local' +``` + +Read the service account issuer from your cluster to confirm it: + +```bash +kubectl get --raw /.well-known/openid-configuration | jq -r .issuer +``` + +The Enterprise Manager fetches the issuer's signing keys from the Kubernetes API +server on port 6443. If you restrict pod egress, allow the Enterprise Manager to +reach the API server on port 6443. + +## Expose the endpoints with Traefik + +RKE2 ships Traefik as its default ingress controller, with the IngressClass +`traefik`. It runs as a DaemonSet in `kube-system` and listens on host ports 80 +and 443. + +The chart creates no Ingress. Create one that routes each public hostname to its +Service. Include the Connector Gateway and AI Gateway hosts only if you enable +those components: + +```yaml title="ingress.yaml" +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: stacklok-enterprise-platform + namespace: stacklok-system +spec: + ingressClassName: traefik + tls: + - hosts: + - + - + - + - + - + secretName: + rules: + - host: + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: -toolhive-cloud-ui + port: + name: http + - host: + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: -enterprise-manager + port: + name: http + - host: + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: registry-api + port: + number: 8080 + - host: + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: -connector-gateway + port: + name: http + - host: + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: -ai-gateway-v2 + port: + name: http +``` + +The Registry Server Service names no port, so its rule uses the port number. Set +the matching hostnames in your values, as +[Step 6](./deployment.mdx#6-expose-the-platform-endpoints) of Deploy the +platform describes. + +The component NetworkPolicies are off by default, so Traefik reaches the +Services with no extra values. If you turn them on with +`global.stacklok.networkPolicy.enabled`, admit the Traefik pods in `kube-system` +to each component you expose. See the +[Helm values reference](../reference/helm/platform.mdx) for each component's +`networkPolicy` settings. + +## Prepare the databases + +The Enterprise Manager and the Registry Server each need a PostgreSQL database. +Any PostgreSQL that meets the role requirements in +[Enterprise Manager database](./deployment.mdx#enterprise-manager-database) and +[Configure the Registry Server](./configure-registry-server.mdx#database-roles) +works. On RKE2, CloudNativePG from Rancher Apps is a common choice. + +The Registry Server application role must belong to the +`toolhive_registry_server` group role before the Registry Server first starts. +Without that membership the Registry Server starts, but its catalog sync fails +with `permission denied for table source` until the pod restarts. With +CloudNativePG, declare the group role and the membership in the `Cluster` +managed roles: + +```yaml title="cluster.yaml" +spec: + managed: + roles: + - name: toolhive_registry_server + ensure: present + login: false + - name: + ensure: present + login: true + inRoles: + - toolhive_registry_server + passwordSecret: + name: +``` + +On a Rancher-managed cluster, `kubectl get cluster` returns Rancher's +`clusters.management.cattle.io` resources. Use +`kubectl get clusters.postgresql.cnpg.io` to list CloudNativePG clusters. + +The Connector Gateway needs Redis or Valkey, and the AI Gateway can use it. See +[Global Redis/Valkey defaults](./deployment.mdx#global-redisvalkey-defaults). + +## Provision users on a private cluster + +The Enterprise Manager directory signs in only users that your identity provider +provisioned. If your identity provider can't reach the cluster for SCIM, use +[Okta directory sync](../enterprise-directory/okta-directory-sync.mdx). The +Enterprise Manager then pulls users from the Okta API over outbound HTTPS, so +the cluster exposes no inbound endpoint for provisioning. + +## Run on SUSE AI Factory + +The platform runs alongside SUSE AI Factory on the same downstream cluster. Its +components need no SUSE AI Factory integration. + +1. Install SUSE AI Factory with the + [SUSE AI Factory deployment guide](https://documentation.suse.com/suse-ai-factory/latest/html/AI-Factory-deployment/index.html). +1. Install the platform on the downstream cluster with the steps in this guide. + +The platform runs next to SUSE Security and SUSE Observability. SUSE +Observability discovers the platform services in the release namespace and +reports their health, error rate, latency, and request rate. + +## Verify the install + +1. Run the [preflight checks](./deployment.mdx#run-preflight-checks) against + your values before you install, and again after any values change. +1. Confirm that every pod is ready, as described in + [Step 5](./deployment.mdx#5-verify-the-install) of Deploy the platform. +1. Run the Pod Security dry run from [Pod Security](#pod-security) on the + release namespace and on each namespace that runs MCP server workloads. + +## Next steps + +- [Configure platform identity](./configure-identity.mdx) to connect your + identity provider +- [Configure the Connector Gateway](./configure-connector-gateway.mdx) to + publish MCP servers to your users +- [Verify the distribution](./verify-artifacts.mdx) to confirm the signatures + and provenance of the images you installed + +## Related information + +- [Deploy the platform](./deployment.mdx) - the full install reference this + guide builds on +- [SUSE Rancher support matrix](https://www.suse.com/suse-rancher/support-matrix/all-supported-versions/) +- [SUSE AI Factory documentation](https://documentation.suse.com/suse-ai-factory/) diff --git a/sidebars.ts b/sidebars.ts index 0fe8a1930..dcea7df11 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -372,7 +372,12 @@ const platformSidebar: SidebarsConfig[string] = [ id: 'platform/enterprise-platform/index', }, items: [ - 'platform/enterprise-platform/deployment', + { + type: 'category', + label: 'Deploy the platform', + link: { type: 'doc', id: 'platform/enterprise-platform/deployment' }, + items: ['platform/enterprise-platform/deploy-suse-rancher'], + }, 'platform/enterprise-platform/distributed-deployments', 'platform/enterprise-platform/airgap-install', 'platform/enterprise-platform/verify-artifacts',