Skip to content

Hub Store Integration#

This guides describes how to deploy piveau-hub-store as the file storage backend and configure the UI to use it. The store allows you to store and manage actual data in piveau.

Deployment#

First, you need to deploy piveau-hub-store.

Kubernetes#

Prerequisite#

The Hub Store requires an authentication service. It is recommended to set up Keycloak using this guide.

If deploying to a Kubernetes environment the Hub Store and its dependencies can be installed through a Helm Chart.

$ helm repo add paca https://paca.fokus.fraunhofer.de/repository/helm-charts
$ helm install <release-name> paca/piveau-hub-store

Add the following environment variables to the Hub Store deployment, to authenticate to the configured Keycloak .

PIVEAU_STORE_AUTH_CONFIG: |-
{
    "tokenServerConfig": {
    "keycloak": {
        "serverUrl": "http://keycloak.domain.tld",
        "realm": "REALM"
    }
    },
    "issuer": "http://keycloak.domain.tld/realms/REALM"
}
PIVEAU_STORE_CORS_DOMAINS: '["https://domain.tld","https://sub.domain.tld"]'

Docker#

Create a network for the components and run the MongoDB and Hub Store containers

$ docker network create hub-store
$ docker run -d --name mongo --net hub-store -p 27017:27017 mongo
$ docker run -it -p 8080:8080 --net hub-store -e MONGO_DB_URI=mongodb://mongo:27017 -e MONGO_DB_NAME=piveau -e MONGO_DB_COLLECTION=data -e HTTP_PORT=8080 hub-store

To connect the Hub Store components to other running Docker services, the same environmental variables as described above must be set.

UI Variables#

To enable the file upload of distributions in the Data Provider Interface set the VITE_API_FILE_UPLOAD_URL environment in the UI deployment to the FQDN of the Hub Store. The Helm Chart sets up an ingress, use the host property to populate this variable.

VITE_API_FILE_UPLOAD_URL: "http://hub-store.domain.tld"

Use the VITE_CONTENT_DATA_PROVIDER_INTERFACE_UPLOAD_FILE_TYPES environment variable to specify what file types can be uploaded.

VITE_CONTENT_DATA_PROVIDER_INTERFACE_UPLOAD_FILE_TYPES: ".txt,.pdf,.csv"