Configure PrimeHub Store

PrimeHub Store is the central storage for storing PrimeHub files. Many features are based on PrimeHub store to persist, transfer, and load the data.

PrimeHub store selects MinIO as the backend and uses one bucket to store the data. To enable the PrimeHub store, set the store.enabled to true.

Path
Description
Default Value

store.enabled

If the PrimeHub store is enabled

false

store.accessKey

The access key for the PrimeHub store

AKIAIOSFODNN7EXAMPLE

store.secretKey

The secret key for the PrimeHub store

wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

store.bucket

The bucket name the PrimeHub store use

primehub

minio.*

The MinIO configuration

Please see the chart configuration

Configure MinIO

MinIO is installed if PrimeHub store is enabled. By default, MinIO data are stored in a PVC. However, we have these options to store the data.

  • Standalone mode: Store data in Kuberentes PVC

  • AWS S3 gateway: Store data in AWS S3 and use MinIO as gateway

  • Google Cloud Storage gateway: Store data in Google Cloud Storage and use MinIO as gateway

Standalone mode

If minio.persistence.enabled is true, the MinIO would operate as standalone mode and one PVC is created. Here is the example for standalone mode:

store:
  bucket: "primehub"

minio:
  persistence:
    enabled: true
    storageClass: "gp2"
    accessMode: ReadWriteOnce
    size: 1024Gi

As the MinIO is installed, the bucket is also created automatically.

AWS S3 Gateway

According to MinIO S3 Gateway, prepare the AWS S3 bucket before installation.

  • Choose an existing bucket or create a bucket from Amazon S3 console

  • Create an IAM user and get accessKey and secretKey

  • Attach the user with AWS S3 permissions policies

Here is the example for AWS S3:

store:
  bucket: "the-bucket-your-created"

minio:
  s3gateway:
    enabled: true
    accessKey: "[put-your-access-key-id-here]"
    secretKey: "[put-your-secret-access-key-here]"

MinIO also supports to use s3 gateway to connect to Ceph RGW. Here is the example for connecting to Ceph RGW by Rook.

store:
  bucket: "primehub"

minio:
  s3gateway:
    enabled: true
    serviceEndpoint: "http://rook-ceph-rgw-object-store.rook"
    accessKey: "[put-your-access-key-id-here]"
    secretKey: "[put-your-secret-access-key-here]"

Google Cloud Storage Gateway

According to MinIO GCS Gateway, prepare the GCS bucket before installation.

Here is the example for GCS:

store:
  bucket: "the-bucket-your-created"

minio:
  gcsgateway:
    enabled: true
    projectId: "[your-project-id]"
    gcsKeyJson: "[the-content-of-your-json-key-file]"

Access the MinIO UI

You could export the MinIO web UI to the public domain http://${PRIMEHUB_DOMAIN}/minio

minio:
  ingress:
    enabled: true
    maxBodySize: "8192m"

Enabled ingress would export the handy MinIO object browser to /minio path. If you upload a large file and see the message 413 Request Entity Too Large. You could increase the value of maxBodySize.

However, the ingress only allows you to use MinIO UI. If you want to operate object with AWS S3 compatible library outside of the Kubernetes, do it with port-forward:

kubectl -n hub port-forward service/primehub-minio 9000

Configure PHFS

PHFS(PrimeHub File System) is the PrimeHub store based group sharing space. The group data is stored under mybucket/groups/<group>. It also a fundamental building block for group resources.

By default, if the Primehub store is enabled, the PHFS is enabled as well. But we can manually disable PHFS by configuring store.phfs.enabled as false.

Path
Description
Default Value

store.phfs.enabled

If PHFS is enabled

true

rclone.*

The rclone configuration

Please see the chart configuration

Configuration:

store:
  enabled: true
  phfs:
    enabled: true

The following components would be installed if PHFS is enabled.

  1. csi-rclone: A CSI implementation for mounting S3-compatible object storage.

  2. primehub store PVC: csi-rclone-provisioned PVC for PrimeHub store. We use it for mounting the MinIO bucket on the user's pod.

Note for MicroK8s

Because the default kubelet path for MicroK8s is not /var/lib/kubelet, we need to configure the kubelet path as follow

rclone:
  kubeletPath: '/var/snap/microk8s/common/var/lib/kubelet'

Configure Log Persistence

Log persistence enables logs to be stored persistently in the PrimeHub store under mybucket/logs. Currently, only job logs are supported to persist.

By default, if the PrimeHub store is enabled, the log persistence is enabled as well. But we can manually disable log persistence by configuring store.logPersistence.enabled as false.

Path
Description
Default Value

store.logPersistence.enabled

If the log persistence is enabled

true

fluentd.*

The fluentd configuration

Please see the chart configuration

The following components would be installed if log persistence is enabled

  1. fluentd: The collector to collect container logs and upload to PrimeHub store.

Last updated