Skip to content

Commit abe373d

Browse files
author
wwanarif
committed
migrate pv provisioner to longhorn for prometheus, retain local-path for studio
Signed-off-by: wwanarif <[email protected]>
1 parent 82086b3 commit abe373d

File tree

4 files changed

+26
-12
lines changed

4 files changed

+26
-12
lines changed

setup-scripts/setup-genai-studio/manifests/monitoring-manifest.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ spec:
285285
resources:
286286
requests:
287287
storage: "5Gi"
288-
storageClassName: local-path
288+
storageClassName: longhorn
289289
---
290290
# Source: kube-prometheus-stack/charts/grafana/templates/clusterrole.yaml
291291
kind: ClusterRole
@@ -1665,7 +1665,7 @@ spec:
16651665
storage:
16661666
volumeClaimTemplate:
16671667
spec:
1668-
storageClassName: local-path
1668+
storageClassName: longhorn
16691669
accessModes: ["ReadWriteOnce"]
16701670
resources:
16711671
requests:

setup-scripts/setup-genai-studio/playbooks/deploy-monitoring.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
- name: Deploy prometheus and grafana with local-path-storage
1+
- name: Deploy prometheus and grafana with longhorn-system
22
hosts: localhost
33
tasks:
4-
- name: Check if local-path-storage namespace exists
5-
shell: kubectl get namespace local-path-storage --ignore-not-found
4+
- name: Check if longhorn-system namespace exists
5+
shell: kubectl get namespace longhorn-system --ignore-not-found
66
register: namespace_check
77
ignore_errors: yes
88
changed_when: false
99

10-
- name: Install local-path-provisioner if namespace does not exist
11-
shell: kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/v0.0.30/deploy/local-path-storage.yaml
10+
- name: Install longhorn-system if namespace does not exist
11+
shell: kubectl apply -f https://raw.githubusercontent.com/longhorn/longhorn/v1.8.0/deploy/longhorn.yaml
1212
when: namespace_check.stdout == ""
1313
register: apply_output
1414

15-
- name: Wait for local-path-provisioner to be ready
16-
shell: kubectl wait --for=condition=Ready pod -l app=local-path-provisioner -n local-path-storage --timeout=120s
15+
- name: Wait for longhorn-system to be ready
16+
shell: kubectl wait --for=condition=Ready pod -l app=longhorn-manager -n longhorn-system --timeout=120s
1717
when: namespace_check.stdout == ""
1818

1919
- name: Create monitoring namespace

setup-scripts/setup-genai-studio/playbooks/deploy-studio.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,21 @@
33
vars_files:
44
- ../vars.yml
55
tasks:
6-
6+
- name: Check if local-path-storage namespace exists
7+
shell: kubectl get namespace local-path-storage --ignore-not-found
8+
register: namespace_check
9+
ignore_errors: yes
10+
changed_when: false
11+
12+
- name: Install local-path-provisioner if namespace does not exist
13+
shell: kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/v0.0.30/deploy/local-path-storage.yaml
14+
when: namespace_check.stdout == ""
15+
register: apply_output
16+
17+
- name: Wait for local-path-provisioner to be ready
18+
shell: kubectl wait --for=condition=Ready pod -l app=local-path-provisioner -n local-path-storage --timeout=120s
19+
when: namespace_check.stdout == ""
20+
721
- name: Check if studio namespace exists
822
command: kubectl get namespace studio
923
register: studio_namespace

setup-scripts/setup-genai-studio/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ The genai-studio playbook script will:
66

77
1. Install MySQL server on the local machine and configure the studio db user to be secured with SSL encryption.
88

9-
2. Deploy a customized monitoring stack based on prometheus-community/kube-prometheus-stack (which contains both Prometheus and Grafana) in the monitoring namespace with a local-path-provisioner in local-path-storage namespace, for dynamic Persistent Volumes (PVs) provisioning.
9+
2. Deploy a customized monitoring stack based on prometheus-community/kube-prometheus-stack (which contains both Prometheus and Grafana) in the monitoring namespace with a longhorn provisioner from longhorn-system namespace, for dynamic Persistent Volumes (PVs) provisioning.
1010

11-
3. Deploy Keycloak, studio-backend, studio-frontend, and studio-nginx within the studio namespace. A self-signed certificate will be generated for Keycloak usage and stored as secrets within the studio namespace. Additionally, the client SSL certificates generated during the MySQL server installation process will also be stored as secrets in the studio namespace to ensure encrypted communication to the MySQL database.
11+
3. Deploy Keycloak, studio-backend, studio-frontend, and studio-nginx within the studio namespace. Also using local-path-provisioner for sandbox's dynamic Persistent Volumes (PVs) provisioning. A self-signed certificate will be generated for Keycloak usage and stored as secrets within the studio namespace. Additionally, the client SSL certificates generated during the MySQL server installation process will also be stored as secrets in the studio namespace to ensure encrypted communication to the MySQL database.
1212

1313
## Pre-requisite
1414

0 commit comments

Comments
 (0)