Configuring Posit Package Manager with an NFS-backed PersistentVolume

This example deploys Posit Package Manager with a single PersistentVolume backed by an NFS server.

The PersistentVolume allows setting NFS mountOptions and it creates a StorageClass that Posit Package Manager then takes advantage of when it creates its PersistentVolumeClaim.

Both the PVC and PV will be left around after the helm release is removed (for manual cleanup) due to the persistentVolumeReclaimPolicy: Retain setting.

To use this example you will need:

  • a license file or key
  • a PostgreSQL database
  • either
    • a ReadWriteMany POSIX compliant storage class for sharedStorage
    • S3
values.yaml
# Using a license file with the helm chart:
# https://github.com/rstudio/helm/tree/main/charts/rstudio-pm#license-file
# If you would like to use a license key see this documentation:
# https://github.com/rstudio/helm/tree/main/charts/rstudio-pm#license-key
license:
  file:
    secret: posit-licenses # TODO: Change to the secret name in your cluster
    secretKey: packagemanager.lic # TODO: Change to the secret key containing your Workbench license

sharedStorage:
  create: true
  mount: true
  storageClassName: nfs-pm-sharedstorage-pv # TODO: Ensure this name matches the name and storageClassName defined in the PV created below in extraObjects.
  # volumeName: pm-shared-pv-name # Only needed if PVs have been statically provisioned, in which case this will need to match the PV name.
  requests:
    storage: 100G

# This is evaluated as a template
# TODO: Change the `mountOptions` and `nfs` settings to suite your NFS setup
extraObjects:
  - |
    apiVersion: v1
    kind: PersistentVolume
    metadata:
      name: nfs-pm-sharedstorage-pv
      annotations:
        "helm.sh/resource-policy": keep
    spec:
      capacity:
        storage: {{ .Values.sharedStorage.requests.storage }}
      volumeMode: Filesystem
      accessModes:
        - ReadWriteMany
      persistentVolumeReclaimPolicy: Retain
      storageClassName: nfs-pm-sharedstorage-pv
      mountOptions:
        - rw
        - lookupcache=pos
        - vers=4
      nfs:
        path: /
        server: nfs.server.example.com

config:
  Database:
    Provider: postgres
  Postgres:
    URL: "postgres://<USERNAME>@<HOST>:<PORT>/<DATABASE>" # TODO: Change this URI to reach your Postgres database.
    Password: "<PASSWORD>" # TODO: Remove this line and instead set the password during helm install with --set config.Postgres.Password=<your-postgres-password>
    UsageDataURL: "postgres://<USERNAME>@<HOST>:<PORT>/<DATABASE>" # TODO: Change this URI to reach your Postgres database for metrics. This must be either a seperate database or scheam from the main Package Manager database.
    UsageDataPassword: "<PASSWORD>" # TODO: Remove this line and instead set the password during helm install with --set config.Postgres.Password=<your-postgres-password>