$ git clone git@github.com:your-username/ai-quickstart-rag.gitDeploying the RAG AI Quickstart pattern
An OpenShift cluster (version 4.18 or later)
To create an OpenShift cluster, go to the Red Hat Hybrid Cloud console.
Select OpenShift -> Red Hat OpenShift Container Platform -> Create cluster.
A HuggingFace account with an API token that has read permissions.
You must accept the terms and conditions for the meta-llama/Llama-3.2-3B-Instruct model with the account that the API token belongs to.
The Helm binary. For instructions, see Installing Helm.
Additional installation tool dependencies. For details, see Patterns quick start.
Preparing for deployment
Fork the ai-quickstart-rag repository on GitHub. You must fork the repository to customize this pattern.
Clone the forked copy of this repository.
Go to the root directory of your Git repository:
$ cd ai-quickstart-ragRun the following command to set the upstream repository:
$ git remote add -f upstream git@github.com:validatedpatterns-sandbox/ai-quickstart-rag.gitVerify the setup of your remote repositories by running the following command:
$ git remote -vExample outputorigin git@github.com:your-username/ai-quickstart-rag.git (fetch) origin git@github.com:your-username/ai-quickstart-rag.git (push) upstream git@github.com:validatedpatterns-sandbox/ai-quickstart-rag.git (fetch) upstream git@github.com:validatedpatterns-sandbox/ai-quickstart-rag.git (push)Make a local copy of the secrets template outside of your repository to hold credentials for the pattern.
Do not add, commit, or push this file to your repository. Doing so may expose personal credentials to GitHub.
Run the following command:
$ cp values-secret.yaml.template ~/values-secret-ai-quickstart-rag.yamlPopulate this file with secrets, or credentials, that are needed to deploy the pattern successfully:
$ vim ~/values-secret-ai-quickstart-rag.yamlEdit the
llm-servicesection to use your HuggingFace API token:- name: llm-service fields: - name: hf_token value: hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Optional: To customize the deployment, create and switch to a new branch by running the following command:
$ git checkout -b my-branchMake your changes, then stage and commit them:
$ git add <changed-files> $ git commit -m "Customize deployment"Push the changes to your forked repository:
$ git push origin my-branch
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 https://oauth-openshift.apps.<your_cluster>.<domain>/oauth/token/request.
Log in to the cluster by running the following command:
$ oc login --token=<retrieved-token> --server=https://api.<your_cluster>.<domain>:6443Or log in by running the following command:
$ export KUBECONFIG=~/<path_to_kubeconfig>
Deploy the pattern to your cluster. Run the following command:
$ ./pattern.sh make install
To verify a successful installation, check the health of the ArgoCD applications:
Run the following command:
$ ./pattern.sh make argo-healthcheckIt might take several minutes for all applications to synchronize and reach a healthy state. This includes downloading the LLM models and populating the vector database.
Verify that the Operators are installed by navigating to Operators → Installed Operators in the OpenShift Container Platform web console.
After all applications are healthy, open the RAG chatbot UI by clicking the route link in the Networking → Routes page of the
ai-quickstart-rag-prodnamespace.
