Skip to content

Commit 136b31e

Browse files
authored
Merge pull request #60 from dminnear-rh/slim-common
slim common and update pattern to pass on openshift 4.17 and 4.18
2 parents d80c6d8 + a56f8e2 commit 136b31e

File tree

354 files changed

+328
-168533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

354 files changed

+328
-168533
lines changed

.github/linters/.markdown-lint.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"default": true,
33
"MD003": false,
44
"MD013": false,
5-
"MD033": false
6-
}
5+
"MD033": false,
6+
"MD036": false
7+
}

.github/workflows/ansible-lint.yml

-17
This file was deleted.

.github/workflows/jsonschema.yaml

-72
This file was deleted.

.github/workflows/linter.yml

-65
This file was deleted.

.github/workflows/superlinter.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,22 @@ jobs:
2121
# Run Linter against code base #
2222
################################
2323
- name: Lint Code Base
24-
uses: github/super-linter/slim@v6
24+
uses: super-linter/super-linter/slim@v7
2525
env:
2626
VALIDATE_ALL_CODEBASE: true
2727
DEFAULT_BRANCH: main
2828
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2929
# These are the validation we disable atm
3030
VALIDATE_BASH: false
31+
VALIDATE_CHECKOV: false
3132
VALIDATE_JSCPD: false
3233
VALIDATE_KUBERNETES_KUBECONFORM: false
3334
VALIDATE_YAML: false
3435
VALIDATE_ANSIBLE: false
36+
VALIDATE_PYTHON_PYLINT: false
37+
VALIDATE_MARKDOWN_PRETTIER: false
38+
VALIDATE_SHELL_SHFMT: false
39+
VALIDATE_YAML_PRETTIER: false
3540
# VALIDATE_DOCKERFILE_HADOLINT: false
3641
# VALIDATE_MARKDOWN: false
3742
# VALIDATE_NATURAL_LANGUAGE: false

GPU_provisioning.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,18 @@ spec:
4343
4444
Use `kubectl` or `oc` command line to create new machineset `oc apply -f gpu_machineset.yaml`
4545

46-
Depending on type of EC2 instance creation of the new machines make take some time. Please note that all nodes with GPU will have labels(`node-role.kubernetes.io/odh-notebook`in our case) and taints (`odh-notebook `) that we have specified in machineset applied automatically
46+
Depending on type of EC2 instance creation of the new machines make take some
47+
time. Please note that all nodes with GPU will have
48+
labels(`node-role.kubernetes.io/odh-notebook` in our case) and taints
49+
(`odh-notebook`) that we have specified in machineset applied automatically
4750

4851
## Install Node Feature Operator
4952

50-
From OperatorHub install `Node Feature Discovery Operator` , accepting defaults . Once Operator has been installed , create `NodeFeatureDiscovery`instance . Use default entries unless you something specific is needed . Node Feature Discovery Operator will add labels to nodes based on available hardware resources
53+
From OperatorHub install `Node Feature Discovery Operator` , accepting
54+
defaults. Once Operator has been installed, create
55+
`NodeFeatureDiscovery`instance. Use default entries unless you something
56+
specific is needed. Node Feature Discovery Operator will add labels to nodes
57+
based on available hardware resources.
5158

5259
![Diagram](images/node-feature-discovery.png)
5360

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ install: operator-deploy post-install ## installs the pattern and loads the secr
1616
@echo "Installed"
1717

1818
.PHONY: create-gpu-machineset
19-
create-gpu-machineset:
19+
create-gpu-machineset: ## Creates a gpu machineset
2020
ansible-playbook ansible/playbooks/create-gpu-machine-set.yaml
2121

2222
.PHONY: post-install

README.md

+7-14
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ OpenShift to generate project proposals for specific Red Hat products.
1818
- Podman
1919
- Red Hat Openshift cluster running in AWS. Supported regions are : us-east-1 us-east-2 us-west-1 us-west-2 ca-central-1 sa-east-1 eu-west-1 eu-west-2 eu-west-3 eu-central-1 eu-north-1 ap-northeast-1 ap-northeast-2 ap-northeast-3 ap-southeast-1 ap-southeast-2 ap-south-1.
2020
- GPU Node to run Hugging Face Text Generation Inference server on Red Hat OpenShift cluster.
21-
- Create a fork of the [rag-llm-gitops](https://github.com/validatedpatterns/rag-llm-gitops.git) git repository.
21+
- Create a fork of the [rag-llm-gitops](https://github.com/validatedpatterns/rag-llm-gitops.git) Git repository.
2222

2323
## Demo Description & Architecture
2424

@@ -33,52 +33,45 @@ The application generates a project proposal for a Red Hat product.
3333
- Multiple LLM providers (OpenAI, Hugging Face, NVIDIA).
3434
- Vector Database, such as EDB Postgres for Kubernetes or Redis, to store embeddings of Red Hat product documentation.
3535
- Monitoring dashboard to provide key metrics such as ratings.
36-
- GitOps setup to deploy e2e demo (frontend / vector database / served models).
36+
- GitOps setup to deploy end-to-end demo (frontend / vector database / served models).
3737

3838
![Overview](https://gitlab.com/osspa/portfolio-architecture-examples/-/raw/main/images/intro-marketectures/rag-demo-vp-marketing-slide.png)
3939

4040
_Figure 1. Overview of the validated pattern for RAG Demo with Red Hat OpenShift_
4141

42-
4342
![Logical](https://gitlab.com/osspa/portfolio-architecture-examples/-/raw/main/images/logical-diagrams/rag-demo-vp-ld.png)
4443

4544
_Figure 2. Logical diagram of the RAG Demo with Red Hat OpenShift._
4645

47-
4846
#### RAG Demo Workflow
4947

5048
![Overview of workflow](https://gitlab.com/osspa/portfolio-architecture-examples/-/raw/main/images/schematic-diagrams/rag-demo-vp-sd.png)
5149

5250
_Figure 3. Schematic diagram for workflow of RAG demo with Red Hat OpenShift._
5351

54-
5552
#### RAG Data Ingestion
5653

5754
![ingestion](https://gitlab.com/osspa/portfolio-architecture-examples/-/raw/main/images/schematic-diagrams/rag-demo-vp-ingress-sd.png)
5855

5956
_Figure 4. Schematic diagram for Ingestion of data for RAG._
6057

61-
6258
#### RAG Augmented Query
6359

64-
6560
![query](https://gitlab.com/osspa/portfolio-architecture-examples/-/raw/main/images/schematic-diagrams/rag-demo-vp-query-sd.png)
6661

6762
_Figure 5. Schematic diagram for RAG demo augmented query._
6863

69-
7064
In Figure 5, we can see RAG augmented query. [IBM Granite 3.1-8B-Instruct](https://huggingface.co/ibm-granite/granite-3.1-8b-instruct) model is used for language processing, LangChain to
7165
integrate different tools of the LLM-based application together and to process the PDF
7266
files and web pages, vector database provider such as EDB Postgres for Kubernetes or Redis, is used to store vectors, and [Red Hat OpenShift AI](https://www.redhat.com/en/technologies/cloud-computing/openshift/openshift-ai) to serve the [IBM Granite 3.1-8B-Instruct](https://huggingface.co/ibm-granite/granite-3.1-8b-instruct) model, Gradio is used for user interface and object storage to store language model and other datasets.
7367
Solution components are deployed as microservices in the Red Hat OpenShift cluster.
7468

75-
7669
#### Download diagrams
70+
7771
View and download all of the diagrams above in our open source tooling site.
7872

7973
[Open Diagrams](https://www.redhat.com/architect/portfolio/tool/index.html?#gitlab.com/osspa/portfolio-architecture-examples/-/raw/main/diagrams/rag-demo-vp.drawio)
8074

81-
8275
![Diagram](images/diagram.png)
8376
_Figure 6. Proposed demo architecture with OpenShift AI_
8477

@@ -93,11 +86,11 @@ _Figure 6. Proposed demo architecture with OpenShift AI_
9386

9487
## Deploying the demo
9588

96-
To run the demo, ensure the Podman is running on your machine.Fork the [rag-llm-gitops](https://github.com/validatedpatterns/rag-llm-gitops) repo into your organization
89+
To run the demo, ensure the Podman is running on your machine.Fork the [rag-llm-gitops](https://github.com/validatedpatterns/rag-llm-gitops) repository into your organization
9790

9891
### Login to OpenShift cluster
9992

100-
Replace the token and the api server url in the command below to login to the OpenShift cluster.
93+
Replace the token and the API server URL in the command below to login to the OpenShift cluster.
10194

10295
```sh
10396
oc login --token=<token> --server=<api_server_url> # login to Openshift cluster
@@ -112,7 +105,7 @@ cd rag-llm-gitops
112105
113106
### Configuring model
114107
115-
This pattern deploys [IBM Granite 3.1-8B-Instruct](https://huggingface.co/ibm-granite/granite-3.1-8b-instruct) out of box. Run the following command to configure vault with the model Id.
108+
This pattern deploys [IBM Granite 3.1-8B-Instruct](https://huggingface.co/ibm-granite/granite-3.1-8b-instruct) out of box. Run the following command to configure vault with the model ID.
116109
117110
```sh
118111
# Copy values-secret.yaml.template to ~/values-secret-rag-llm-gitops.yaml.
@@ -254,10 +247,10 @@ By default, Grafana application is deployed in `llm-monitoring` namespace.To lau
254247
![Routes](images/monitoring.png)
255248
256249
## Test Plan
250+
257251
GOTO: [Test Plan](./TESTPLAN.md)
258252
259253
## Licenses
260254
261255
EDB Postgres for Kubernetes is distributed under the EDB Limited Usage License
262256
Agreement, available at [enterprisedb.com/limited-use-license](https://www.enterprisedb.com/limited-use-license).
263-

TESTPLAN.md

+11-13
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
# Test Cases for E2E Demo.
1+
# Test Cases for End-to-End Demo
22

33
- [Provisioning of GPU Node](https://github.com/validatedpatterns-sandbox/rag-llm-gitops/blob/main/GPU_provisioning.md)
44

55
- MachineSet is created.
6-
- Name of the machine set <clustername>-gpu-<AWSregion>. This should not be a hard requirement though.
6+
- Name of the machine set <clustername>-gpu-<AWSregion>. This should not be a hard requirement though.
77
- Machine set has taint section
8+
89
```yaml
910
taints:
1011
- effect: NoSchedule
@@ -13,13 +14,15 @@
1314
```
1415
1516
- MachineSet has a label
17+
1618
```yaml
1719
metadata:
1820
labels:
1921
node-role.kubernetes.io/odh-notebook: '' <--- Put your label if needed
2022
```
2123
2224
- MachineSet instance type
25+
2326
```yaml
2427
providerSpec:
2528
value:
@@ -40,16 +43,16 @@
4043
- Click on the Node Feature Discovery Operator. Under NodeFeatureDiscovery an instance should be created. Status should be Available.
4144
![nfd instance](https://validatedpatterns.io/images/rag-llm-gitops/ragllm-nfd-instance.png)
4245
43-
4446
- Verify NVIDIA GPU Operator is installed.
4547
- NVIDIA GPU Operator is installed
46-
48+
4749
![nvidia operator](https://validatedpatterns.io/images/rag-llm-gitops/ragllm-nvidia-operator.png)
4850
4951
- Click on the NVIDIA GPU Operator and click on ClusterPolicy. A gpu-cluster-policy should exist
50-
![nvidia clusterpolicies](https://validatedpatterns.io/images/rag-llm-gitops/ragllm-nvidia-clusterpolicies.png)
52+
![nvidia clusterpolicies](https://validatedpatterns.io/images/rag-llm-gitops/ragllm-nvidia-clusterpolicies.png)
5153
5254
- Click on the gpu-cluster-policy and click on the YAML tab. The YAML should contain the tolerations
55+
5356
```yaml
5457
tolerations:
5558
- effect: NoSchedule
@@ -59,13 +62,13 @@
5962
6063
- Application provisioned correctly.
6164
- Click on the rag-llm namespace
62-
65+
6366
- By Default, EDB Operator will be deployed, which will deploy PGVECTOR vector database, 6 pods should be running
6467
![ragllm pgvector pods](https://validatedpatterns.io/images/rag-llm-gitops/rag-llm-pgvector.png)
6568
6669
- If the global.db.type is set to REDIS in the values-global.yaml, four pods should be running
6770
![ragllm pods](https://validatedpatterns.io/images/rag-llm-gitops/rag-llm.png)
68-
71+
6972
- Click on Networking → Routes from the left Navigation panel. An llm-ui route should exist
7073
![llm-ui route](https://validatedpatterns.io/images/rag-llm-gitops/ragllm-application_route.png)
7174
@@ -88,10 +91,5 @@
8891
- Enter the Grafana admin credentials.
8992
- Ratings are displayed for each model
9093
- Grafana Dashboard is displayed
91-
92-
![llm-ui grafana](https://validatedpatterns.io/images/rag-llm-gitops/ragllm-grafana.png)
93-
94-
95-
96-
9794

95+
![llm-ui grafana](https://validatedpatterns.io/images/rag-llm-gitops/ragllm-grafana.png)

0 commit comments

Comments
 (0)