Skip to content

PR: Initial Software Versioning and Data Persistence for Services #52

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
May 6, 2025

Conversation

dkennetzoracle
Copy link
Contributor

@dkennetzoracle dkennetzoracle commented Apr 30, 2025

Summary:

  • Add specific versions to helm chart installations
  • Add persistent volumes to services so data persists across restarts
  • Add initial software versioning documentation and templating
  • Some dead code cleanup

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Apr 30, 2025
Copy link

@amgowda-oci amgowda-oci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left inline comments

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a sample releasenotes.md file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a template at top level called RELEASE_NOTES.md

- name: mlflow-volume
persistentVolumeClaim:
claimName: mlflow-pvc

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure you use the "oci-bv" class and min volume size of 50 GB

apiVersion: v1 kind: PersistentVolumeClaim metadata: name: mynginxclaim spec: storageClassName: "oci-bv" accessModes: - ReadWriteOnce resources: requests: storage: 50Gi

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are specified in the pvc (in terraform resource below), you just specify the claimName when bringing your own volume:

resource "kubernetes_persistent_volume_claim_v1" "mlflow" {
  metadata {
    name      = "mlflow-pvc"
    namespace = "cluster-tools"
  }

  spec {
    access_modes = ["ReadWriteOnce"]

    resources {
      requests = {
        storage = "50Gi"
      }
    }

    storage_class_name = "oci-bv"
  }
  ...

Copy link

@amgowda-oci amgowda-oci May 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should upgrade grafana versions to latest, this is how I deploy, I am sure there is an existing TF how to do this tag. Or may be you are deploying the latest.

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
 name: grafana-pvc
spec:
 storageClassName: "oci-bv"
 accessModes:
   - ReadWriteOnce
 resources:
   requests:
     storage: 5Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
 labels:
   app: grafana
 name: grafana
spec:
 selector:
   matchLabels:
     app: grafana
 template:
   metadata:
     labels:
       app: grafana
   spec:
     securityContext:
       fsGroup: 472
       supplementalGroups:
         - 0
     containers:
       - name: grafana
         image: grafana/grafana:latest
         imagePullPolicy: IfNotPresent
         ports:
           - containerPort: 3000
             name: http-grafana
             protocol: TCP
         readinessProbe:
           failureThreshold: 3
           httpGet:
             path: /robots.txt
             port: 3000
             scheme: HTTP
           initialDelaySeconds: 10
           periodSeconds: 30
           successThreshold: 1
           timeoutSeconds: 2
         livenessProbe:
           failureThreshold: 3
           initialDelaySeconds: 30
           periodSeconds: 10
           successThreshold: 1
           tcpSocket:
             port: 3000
           timeoutSeconds: 1
         resources:
           requests:
             cpu: 2
             memory: 3500Mi
         volumeMounts:
           - mountPath: /var/lib/grafana
             name: grafana-pv
     volumes:
       - name: grafana-pv
         persistentVolumeClaim:
           claimName: grafana-pvc
---
apiVersion: v1
kind: Service
metadata:
 name: grafana
spec:
 ports:
   - port: 3000
     protocol: TCP
     targetPort: http-grafana
 selector:
   app: grafana
 sessionAffinity: None
 type: LoadBalancer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll bump and test with the most recent version 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, we are back quite a few!

    grafana                = "https://grafana.github.io/helm-charts"
    grafana_version        = "6.47.1"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amgowda-oci maybe let's hold off on this in this PR. Both Grafana and Prometheus broke when I updated to latest (granted they had major version updates which indicates breaking changes). They both would need some work.

  - Add specific anchored versions to all helm installs.
  - Add persistent storage volumes to MLFlow, Grafana, and Prometheus
  - Add initial software versioning documentation and templating
  - Some dead code cleanup.
  - Added vllm dashboard to grafana
Copy link

@amgowda-oci amgowda-oci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@dkennetzoracle dkennetzoracle merged commit 999982f into main May 6, 2025
1 check passed
@dkennetzoracle dkennetzoracle deleted the versioning_and_pvs branch May 6, 2025 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants