Skip to content

Add MS SQL Server as a DB Provider for RAG backend #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2025
Merged
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
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Azure gpu vars
GPU_VM_SIZE ?= Standard_NC8as_T4_v3
GPU_REPLICAS ?= 1
OVERRIDE_ZONE ?=

.PHONY: default
default: help

Expand All @@ -16,8 +21,13 @@ install: operator-deploy post-install ## installs the pattern and loads the secr
@echo "Installed"

.PHONY: create-gpu-machineset
create-gpu-machineset: ## Creates a gpu machineset
ansible-playbook ansible/playbooks/create-gpu-machine-set.yaml
create-gpu-machineset: ## Creates a gpu machineset for AWS
ansible-playbook ansible/playbooks/create-gpu-machineset.yaml

.PHONY: create-gpu-machineset-azure
create-gpu-machineset-azure: ## Creates an Azure GPU machineset (overrides: GPU_VM_SIZE, GPU_REPLICAS, OVERRIDE_ZONE)
ansible-playbook ansible/playbooks/create-gpu-machineset-azure.yaml \
-e "gpu_vm_size=$(GPU_VM_SIZE) gpu_replicas=$(GPU_REPLICAS) override_zone=$(OVERRIDE_ZONE)"

.PHONY: post-install
post-install: ## Post-install tasks
Expand Down
65 changes: 65 additions & 0 deletions ansible/playbooks/create-gpu-machineset-azure.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
- name: Generate GPU MachineSet for Azure-based clusters
hosts: localhost
connection: local
gather_facts: false
vars:
gpu_vm_size: Standard_NC8as_T4_v3
gpu_replicas: 1
override_zone: ""
namespace: openshift-machine-api
tasks:
- name: Get cluster infrastructure object
kubernetes.core.k8s_info:
api_version: config.openshift.io/v1
kind: Infrastructure
name: cluster
register: infra_info

- name: Save cluster ID
set_fact:
cluster_id: "{{ infra_info.resources[0].status.infrastructureName }}"

- name: Gather all MachineSets
kubernetes.core.k8s_info:
api_version: machine.openshift.io/v1beta1
kind: MachineSet
namespace: "{{ namespace }}"
register: ms_list

- name: Pick the first *worker* MachineSet as a template
set_fact:
base_ms: "{{ item }}"
loop: "{{ ms_list.resources | sort(attribute='metadata.name') }}"
when:
- "'worker' in (item.metadata.labels['machine.openshift.io/cluster-api-machine-role'] | default(''))"
run_once: true

- name: Extract provider-specific details from the base MachineSet
set_fact:
azure_location: "{{ base_ms.spec.template.spec.providerSpec.value.location }}"
base_zone: "{{ base_ms.spec.template.spec.providerSpec.value.zone }}"
resource_group: "{{ base_ms.spec.template.spec.providerSpec.value.resourceGroup }}"
network_resource_group: "{{ base_ms.spec.template.spec.providerSpec.value.networkResourceGroup }}"
vnet: "{{ base_ms.spec.template.spec.providerSpec.value.vnet }}"
subnet: "{{ base_ms.spec.template.spec.providerSpec.value.subnet }}"
image: "{{ base_ms.spec.template.spec.providerSpec.value.image }}"
os_disk: "{{ base_ms.spec.template.spec.providerSpec.value.osDisk }}"
user_data: "{{ base_ms.spec.template.spec.providerSpec.value.userDataSecret }}"
cred_secret: "{{ base_ms.spec.template.spec.providerSpec.value.credentialsSecret }}"
public_ip: "{{ base_ms.spec.template.spec.providerSpec.value.publicIP | default(false) }}"

- name: Decide which availability zone to use
set_fact:
gpu_zone: "{{ (override_zone | trim) | default(base_zone, true) }}"

- name: Render GPU MachineSet manifest
template:
src: templates/gpu-machineset-azure.j2
dest: /tmp/gpu-machineset-azure.yaml
vars:
ms_name: "nvidia-worker-{{ azure_location | replace(' ', '') }}{{ gpu_zone }}"

- name: Apply the GPU MachineSet
kubernetes.core.k8s:
state: present
src: /tmp/gpu-machineset-azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

- name: "[create-gpu-machine-set] Generate machineset"
ansible.builtin.template:
src: templates/gpu-machine-sets.j2
src: templates/gpu-machineset.j2
dest: /tmp/gpu-machineset.yaml

- name: "[create-gpu-machine-set] Apply machineset to cluster {{ clusterId }}"
Expand Down
44 changes: 44 additions & 0 deletions ansible/playbooks/templates/gpu-machineset-azure.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
name: {{ ms_name }}
namespace: openshift-machine-api
labels:
machine.openshift.io/cluster-api-cluster: {{ cluster_id }}
spec:
replicas: {{ gpu_replicas }}
selector:
matchLabels:
machine.openshift.io/cluster-api-cluster: {{ cluster_id }}
machine.openshift.io/cluster-api-machineset: {{ ms_name }}
template:
metadata:
labels:
machine.openshift.io/cluster-api-cluster: {{ cluster_id }}
machine.openshift.io/cluster-api-machine-role: worker
machine.openshift.io/cluster-api-machine-type: worker
machine.openshift.io/cluster-api-machineset: {{ ms_name }}
spec:
taints:
- key: odh-notebook
value: "true"
effect: NoSchedule
metadata:
labels:
node-role.kubernetes.io/odh-notebook: ''
providerSpec:
value:
apiVersion: machine.openshift.io/v1beta1
kind: AzureMachineProviderSpec
credentialsSecret: {{ cred_secret | to_json }}
location: {{ azure_location | to_json }}
zone: {{ gpu_zone | to_json }}
resourceGroup: {{ resource_group | to_json }}
networkResourceGroup: {{ network_resource_group | to_json }}
vnet: {{ vnet | to_json }}
subnet: {{ subnet | to_json }}
vmSize: {{ gpu_vm_size | to_json }}
image: {{ image | to_json }}
osDisk: {{ os_disk | to_json }}
publicIP: {{ public_ip | to_json }}
userDataSecret: {{ user_data | to_json }}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
name: {{ clusterId }}-gpu-{{ cloudRegion }}
namespace: openshift-machine-api
spec:
replicas: 3
replicas: 1
selector:
matchLabels:
machine.openshift.io/cluster-api-cluster: {{ clusterId }}
Expand Down
24 changes: 0 additions & 24 deletions charts/all/llm-serving-service/Chart.yaml

This file was deleted.

62 changes: 0 additions & 62 deletions charts/all/llm-serving-service/templates/_helpers.tpl

This file was deleted.

55 changes: 0 additions & 55 deletions charts/all/llm-serving-service/templates/download-model.yaml

This file was deleted.

37 changes: 0 additions & 37 deletions charts/all/llm-serving-service/templates/inference-service.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions charts/all/llm-serving-service/templates/model-pvc.yaml

This file was deleted.

Loading