Skip to content
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

feat(local): install minio object storage via helm chart #1080

Merged
merged 1 commit into from
Aug 14, 2023
Merged

Conversation

m90
Copy link
Contributor

@m90 m90 commented Aug 9, 2023

Ticket https://phabricator.wikimedia.org/T343112

This is prep work for moving backup transfer over to an S3 client. As of this PR, there are no consumers of the MinIO service.

How to test/use this locally

  1. Apply the changes and wait for the minio service to become ready
  2. Install the minio client
  3. Open a tunnel for the service:
    kubectl port-forward svc/minio 9000:9000
    
  4. Set an alias for your local cluster
    mc alias set minikube "http://localhost:9000/" minio $(k get secrets/minio-credentials -o json | jq -r .data.rootPassword | base64 -d)
    
  5. Poke around, e.g. create a new bucket and upload a file
    mc mb test-bucket
    echo "oh wow" > foo.txt
    mc cp foo.txt minikube/test-bucket
    mc cat minikube/test-bucket/foo.txt
    

@@ -0,0 +1,19 @@
existingSecret: minio-credentials
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Slightly twisted: this create a root user off the k8s secret of the given name.


resources:
requests:
memory: 0.5Gi
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same here: does this create problems for others?

Copy link
Contributor

Choose a reason for hiding this comment

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

works well for me

@m90
Copy link
Contributor Author

m90 commented Aug 9, 2023

It would also be possible to create an ingress for the service which exposes an administration UI, but I'm not sure this is currently needed?

@m90
Copy link
Contributor Author

m90 commented Aug 10, 2023

This can be tested in conjunction with wmde/wbaas-backup#24 and wbstack/charts#125 using

diff --git a/k8s/helmfile/env/local/wbaas-backup.values.yaml.gotmpl b/k8s/helmfile/env/local/wbaas-backup.values.yaml.gotmpl
index 8d9459c..47cd659 100644
--- a/k8s/helmfile/env/local/wbaas-backup.values.yaml.gotmpl
+++ b/k8s/helmfile/env/local/wbaas-backup.values.yaml.gotmpl
@@ -6,8 +6,15 @@ job:
   successfulJobsHistoryLimit: 1
   cronSchedule: "* * 1 1 *"
 
+scratchDiskSpace: 4Gi
+
+restorePodRunning: false
+
 storage:
-  scratchDiskSpace: 4Gi
-  gcs:
-    bucketName: nacho-cheese
-    uploadToBucket: false
+  bucketName: backups
+  uploadToBucket: true
+  accessKeySecretName: minio-credentials
+  accessKeySecretKey: rootUser
+  secretKeySecretName: minio-credentials
+  secretKeySecretKey: rootPassword
+  endpoint: http://minio.default.svc.cluster.local:9000
diff --git a/k8s/helmfile/helmfile.yaml b/k8s/helmfile/helmfile.yaml
index ed21617..61eb86e 100644
--- a/k8s/helmfile/helmfile.yaml
+++ b/k8s/helmfile/helmfile.yaml
@@ -210,7 +210,7 @@ releases:
 
   - name: wbaas-backup
     namespace: default
-    chart: wbstack/wbaas-backup
+    chart: ./../../../charts/charts/wbaas-backup
     version: 0.0.6
     <<: *default_release

Copy link
Contributor

@deer-wmde deer-wmde left a comment

Choose a reason for hiding this comment

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

worked beautifully locally

@m90 m90 merged commit d142ffb into main Aug 14, 2023
3 checks passed
@m90 m90 deleted the fr/local-minio branch August 14, 2023 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants