Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions content/patterns/maas-quickstart/_index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: MaaS Code Assistant AI Quickstart
date: 2026-06-03
tier: sandbox
summary: This pattern deploys a multi-tenant AI code assistant with NVIDIA Nemotron models, tiered rate limiting, and IDE integration on OpenShift.
rh_products:
- Red Hat OpenShift Container Platform
- Red Hat OpenShift AI
- Red Hat OpenShift DevSpaces
- Red Hat Connectivity Link
industries:
- General
focus_areas:
- AI
- Code
- AI Quickstart
aliases: /maas-quickstart/
links:
github: https://github.com/validatedpatterns-sandbox/ai-quickstart-maas-code-assistant
install: getting-started
bugs: https://github.com/validatedpatterns-sandbox/ai-quickstart-maas-code-assistant/issues
feedback: https://docs.google.com/forms/d/e/1FAIpQLScI76b6tD1WyPu2-d_9CCVDr3Fu5jYERthqLKJDUGwqBg7Vcg/viewform
---
:toc:
:imagesdir: /images
:_content-type: ASSEMBLY
include::modules/comm-attributes.adoc[]

include::modules/maas-quickstart-about.adoc[leveloffset=+1]

include::modules/maas-quickstart-architecture.adoc[leveloffset=+1]

[id="next-steps-maas-quickstart"]
== Next steps

* link:getting-started[Install this pattern.]
29 changes: 29 additions & 0 deletions content/patterns/maas-quickstart/cluster-sizing.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: Cluster sizing
weight: 30
aliases: /maas-quickstart/cluster-sizing/
---

:toc:
:imagesdir: /images
:_content-type: ASSEMBLY
include::modules/comm-attributes.adoc[]
include::modules/ai-quickstart-maas-code-assistant/metadata-ai-quickstart-maas-code-assistant.adoc[]

include::modules/cluster-sizing-template.adoc[]

[id="maas-quickstart-gpu-node-requirements"]
== GPU node requirements

In addition to the worker nodes listed above, this pattern requires at least 2 GPU-equipped nodes for model inference. On AWS, the pattern automatically provisions `g6e.2xlarge` instances with NVIDIA L40S GPUs. On other providers and bare metal, GPU nodes must already be part of the cluster before deploying the pattern.

.GPU node minimum requirements
[cols="<,^,<,<"]
|===
| Cloud Provider | Node Type | Number of nodes | Instance Type

| Amazon Web Services
| GPU Worker
| 2
| g6e.2xlarge
|===
143 changes: 143 additions & 0 deletions content/patterns/maas-quickstart/customizing-this-pattern.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
---
title: Customizing this pattern
weight: 20
aliases: /maas-quickstart/customizing/
---

:toc:
:imagesdir: /images
:_content-type: ASSEMBLY
include::modules/comm-attributes.adoc[]

[id="customizing-maas-quickstart"]
== Customizing the MaaS Code Assistant AI Quickstart pattern

This pattern deploys an AI code assistant with tiered user access, rate limiting, and NVIDIA Nemotron model serving. You can customize the models, rate limit policies, user tiers, and IDE configuration.

[id="changing-models-maas"]
=== Changing models

The pattern serves two models by default:

* `nemotron-3-nano-30b-a3b-fp8` -- Available to premium and enterprise tier users.
* `gpt-oss-20b` -- Available to all user tiers.

To change or add models, edit the `models` list in `overrides/maas-quickstart.yaml`. Models are pulled from OCI registries and do not require a HuggingFace API token.

The model definitions specify the model URI, resource requirements, GPU tolerations, and vLLM arguments. For example:

[source,yaml]
----
models:
- name: gpt-oss-20b
displayName: OpenAI gpt-oss-20b
uri: oci://registry.redhat.io/rhelai1/modelcar-gpt-oss-20b:1.5
resources:
limits:
cpu: "4"
memory: 24Gi
nvidia.com/gpu: "1"
requests:
cpu: "2"
memory: 16Gi
nvidia.com/gpu: "1"
extraArgs:
- --enable-force-include-usage
tolerations:
- effect: NoSchedule
key: nvidia.com/gpu
operator: Exists
----

[NOTE]
====
Each model requires a GPU with at least 48 GB of VRAM. Adding models beyond the default two requires additional GPU nodes.
====

[id="adjusting-rate-limits-maas"]
=== Adjusting rate limits and user tiers

The pattern uses Kuadrant (Red Hat Connectivity Link) to enforce per-tier rate limits on inference requests. The default tiers and limits are:

[cols="1,1,2",options="header"]
|===
| Tier | Rate Limit | Description

| Free
| 5 requests per 2 minutes
| Basic access for evaluation

| Premium
| 20 requests per 2 minutes
| Standard production usage

| Enterprise
| 50 requests per 2 minutes
| High-throughput workloads
|===

To adjust rate limits, modify the `tiers` section in `overrides/maas-quickstart.yaml`. For example, to increase the premium tier request limit to 40 and the token limit to 20000:

[source,yaml]
----
tiers:
premium:
users:
- premium-user
requestRates:
- limit: 40
window: 2m
tokenRates:
- limit: 20000
window: 1m
----

Push your changes to your forked repository so the GitOps framework applies the updated configuration.

[id="managing-users-maas"]
=== Managing users

User authentication is handled by htpasswd with OpenShift OAuth. The default users are:

* `admin` -- Full administrative access (enterprise tier)
* `free-user` -- Free tier access
* `premium-user` -- Premium tier access
* `enterprise-user` -- Enterprise tier access

User passwords are stored in the `values-secret.yaml` file and managed through HashiCorp Vault and the External Secrets Operator (ESO). To change a user password after initial deployment, update the secret value in your `values-secret.yaml` file and redeploy the pattern.

To assign users to different tiers, modify the `tiers` section in `overrides/maas-quickstart.yaml`:

[source,yaml]
----
tiers:
free:
users:
- free-user
premium:
users:
- premium-user
- user1
enterprise:
users:
- admin
- enterprise-user
----

[id="configuring-devspaces-maas"]
=== Configuring OpenShift DevSpaces

The pattern integrates the Continue AI extension in OpenShift DevSpaces to provide code assistance directly in the IDE. DevSpaces is preconfigured to clone the AI Quickstart repository and connect to the vLLM inference endpoints.

To customize the DevSpaces configuration, you can adjust:

* Default IDE settings and extensions
* Resource limits for developer workspaces
* The inference endpoint URL used by the Continue extension

[id="gpu-node-provisioning-maas"]
=== GPU node provisioning

This pattern requires at least 2 NVIDIA GPU nodes with 48 GB or more of VRAM each. On AWS, the pattern automatically provisions `g6e.2xlarge` GPU machine sets with NVIDIA L40S GPUs.

If your cluster does not have GPU nodes, you must add them before deploying the pattern. The pattern installs all required operators, including the NVIDIA GPU Operator, automatically during deployment.
186 changes: 186 additions & 0 deletions content/patterns/maas-quickstart/getting-started.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
---
title: Getting started
weight: 10
aliases: /maas-quickstart/getting-started/
---

:toc:
:imagesdir: /images
:_content-type: ASSEMBLY
include::modules/comm-attributes.adoc[]

[id="deploying-maas-quickstart-pattern"]
== Deploying the MaaS Code Assistant AI Quickstart pattern

.Prerequisites

* An OpenShift cluster (version 4.20 or later). This pattern requires at least 2 NVIDIA GPU nodes with 48 GB or more of VRAM each.
** *AWS*: The pattern automatically provisions 2 `g6e.2xlarge` GPU worker nodes (NVIDIA L40S) during installation. No GPU nodes need to be present before deploying.
** *Other providers and bare metal*: GPU nodes must already be part of the OpenShift cluster before deploying this pattern. The pattern installs all required operators automatically.
** To create an OpenShift cluster, go to the https://console.redhat.com/[Red Hat Hybrid Cloud console].
** Select *OpenShift \-> Red Hat OpenShift Container Platform \-> Create cluster*.
* The Helm binary. For instructions, see link:https://helm.sh/docs/intro/install/[Installing Helm].
* The `oc` CLI tool. For instructions, see link:https://docs.openshift.com/container-platform/latest/cli_reference/openshift_cli/getting-started-cli.html[Getting started with the OpenShift CLI].
* Additional installation tool dependencies. For details, see link:https://validatedpatterns.io/learn/quickstart/[Patterns quick start].

[id="preparing-for-deployment-maas"]
== Preparing for deployment
.Procedure

. Fork the link:https://github.com/validatedpatterns-sandbox/ai-quickstart-maas-code-assistant[ai-quickstart-maas-code-assistant] repository on GitHub. You must fork the repository to customize this pattern.

. Clone the forked copy of this repository.
+
[source,terminal]
----
$ git clone git@github.com:your-username/ai-quickstart-maas-code-assistant.git
----

. Go to the root directory of your Git repository:
+
[source,terminal]
----
$ cd ai-quickstart-maas-code-assistant
----

. Run the following command to set the upstream repository:
+
[source,terminal]
----
$ git remote add -f upstream git@github.com:validatedpatterns-sandbox/ai-quickstart-maas-code-assistant.git
----

. Verify the setup of your remote repositories by running the following command:
+
[source,terminal]
----
$ git remote -v
----
+
.Example output
+
[source,terminal]
----
origin git@github.com:your-username/ai-quickstart-maas-code-assistant.git (fetch)
origin git@github.com:your-username/ai-quickstart-maas-code-assistant.git (push)
upstream git@github.com:validatedpatterns-sandbox/ai-quickstart-maas-code-assistant.git (fetch)
upstream git@github.com:validatedpatterns-sandbox/ai-quickstart-maas-code-assistant.git (push)
----

. Make a local copy of the secrets template outside of your repository to hold credentials for the pattern.
+
[WARNING]
====
Do not add, commit, or push this file to your repository. Doing so may expose personal credentials to GitHub.
====
+
Run the following command:
+
[source,terminal]
----
$ cp values-secret.yaml.template ~/values-secret-ai-quickstart-maas-code-assistant.yaml
----

. Populate this file with the user passwords needed for the pattern:
+
[source,terminal]
----
$ vim ~/values-secret-ai-quickstart-maas-code-assistant.yaml
----

.. Edit the `htpasswd` section to set passwords for each user tier:
+
[source,yaml]
----
- name: htpasswd
fields:
- name: admin
value: <admin-password>
- name: free-user
value: <free-user-password>
- name: premium-user
value: <premium-user-password>
- name: enterprise-user
value: <enterprise-user-password>
----

. Optional: To customize the deployment, create and switch to a new branch by running the following command:
+
[source,terminal]
----
$ git checkout -b my-branch
----
+
Make your changes, then stage and commit them:
+
[source,terminal]
----
$ git add <changed-files>
$ git commit -m "Customize deployment"
----
+
Push the changes to your forked repository:
+
[source,terminal]
----
$ git push origin my-branch
----

[id="deploying-cluster-using-patternsh-file-maas"]
== Deploying the pattern by using the pattern.sh file

To deploy the pattern by using the `pattern.sh` file, complete the following steps:

. Log in to your cluster by following this procedure:

.. Obtain an API token by visiting link:https://oauth-openshift.apps.<your_cluster>.<domain>/oauth/token/request[https://oauth-openshift.apps.<your_cluster>.<domain>/oauth/token/request].

.. Log in to the cluster by running the following command:
+
[source,terminal]
----
$ oc login --token=<retrieved-token> --server=https://api.<your_cluster>.<domain>:6443
----
+
Or log in by running the following command:
+
[source,terminal]
----
$ export KUBECONFIG=~/<path_to_kubeconfig>
----

. Deploy the pattern to your cluster. Run the following command:
+
[source,terminal]
----
$ ./pattern.sh make install
----

.Verification

To verify a successful installation, check the health of the ArgoCD applications:

. Run the following command:
+
[source,terminal]
----
$ ./pattern.sh make argo-healthcheck
----
+
It might take several minutes for all applications to synchronize and reach a healthy state. This includes downloading the NVIDIA Nemotron models and configuring the inference endpoints.

. Verify that the Operators are installed by navigating to *Operators -> Installed Operators* in the {ocp} web console. Confirm the following Operators are present:
+
* NVIDIA GPU Operator
* {rhoai}
* Red Hat OpenShift DevSpaces
* Red Hat Connectivity Link

. After all applications are healthy, verify the inference endpoints are serving by running:
+
[source,terminal]
----
$ oc get inferenceservice -A
----

. Access the OpenShift DevSpaces dashboard to confirm the IDE environment is available. Navigate to *Networking -> Routes* in the DevSpaces namespace and open the route URL.
Loading