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.
A more technical description can be found in the Hub Store readme.
Deployment#
First, you need to deploy piveau-hub-store.
All available environment variables together with their usage are described in the Hub Store readme.
Kubernetes#
Prerequisite#
- Hub Store uses a MongoDB for storing and managing the file metadata
- To store the files itself, two storage backends can be configured via the
STORAGE_BACKEND
environment variable: FILE
will use the filesystem of the server/container Hub Store is running on.S3
will enable the usage of any S3 compatible storage- The Hub Store requires an authentication service. It is recommended to set up Keycloak using this guide.
- Optionally, a clam AV server can be used for scanning uploaded files for malicious code
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. hub Store will use the same keycloak configuration, as Hub Repo.
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.
Use the VITE_CONTENT_DATA_PROVIDER_INTERFACE_UPLOAD_FILE_TYPES
environment variable to specify what file types can be uploaded.