Skip to content

Quickstart on Minikube

This page walks you through a complete deployment of the GEO Knowledge Hub on a local Minikube cluster, end-to-end. It offers two configurations to start from, one sized for development and one that follows the chart defaults, and either can be adapted to a real cluster with the parameters reference.

Total time: ~15 minutes (mostly waiting for image pulls).

This quickstart ships two complete configurations, and the one you pick decides how much memory you need and which my-values.yaml you write in step 4. Choose it now, before you start the cluster. The rest of the page follows your choice automatically, so you only make this decision once.

Collapses OpenSearch into a single node that holds every role and runs Redis without replicas, which brings the whole deployment down to eight pods. Nothing is replicated, so it is not something to build a production service on, but it starts quickly and it is what you want on a laptop or a small VM while you are developing against the API.

Budget roughly 4 vCPUs and 8 GB RAM.

Start the Minikube cluster with the following command:

Terminal window
minikube start \
--cpus 4 \
--memory 8192 \
--driver docker

Verify the cluster is up:

Terminal window
kubectl cluster-info
kubectl get nodes

Now, you need to enable the required addons:

Terminal window
minikube addons enable ingress
minikube addons enable default-storageclass
minikube addons enable storage-provisioner

Next, create the invenio namespace:

Terminal window
kubectl create namespace invenio

The helm-invenio, provides a lot of configuration options. For this quick example, we will use few options to ensure we are using the GEO Knowledge Hub image and setting few extra configurations. These configurations are defined in a my-values.yaml file.

If you want to learn more about all configuration options available, you can check the parameters reference.

Around eleven pods in total. OpenSearch is collapsed into a single node that holds every role, and Redis runs without replicas.

image:
registry: docker.io
repository: geoknowledgehub/geo-knowledge-hub
tag: "v1.7.0.dev16"
invenio:
hostname: "invenio.local"
# Disabled on purpose. The init job runs `rdm-records demo` without loading
# the vocabularies first, and it overlaps with the commands you run in the
# post-install setup. Everything it does is covered there.
init: false
demo_data: false
extraConfig:
INVENIO_SITE_UI_URL: "https://invenio.local:8080"
INVENIO_SITE_API_URL: "https://invenio.local:8080/api"
INVENIO_APP_ALLOWED_HOSTS: '["invenio.local:8080", "invenio.local"]'
INVENIO_CACHE_REDIS_URL: "redis://invenio-redis-master:6379/0"
INVENIO_CELERY_RESULT_BACKEND: "redis://invenio-redis-master:6379/2"
# Bug: The chart injects RATELIMIT_STORAGE_URI but flask-limiter
# reads RATELIMIT_STORAGE_URL. Set both to be safe.
INVENIO_RATELIMIT_STORAGE_URI: "redis://invenio-redis-master:6379/3"
INVENIO_RATELIMIT_STORAGE_URL: "redis://invenio-redis-master:6379/3"
# Must be a map of "email: password"
default_users:
"admin@invenio.org": "admin123"
# DOI provider
datacite:
enabled: true
username: "GKH.EXAMPLE"
password: "GKH.PASSWORD"
existingSecret: "" # required, see the note below
prefix: "10.5072" # datacite test prefix
testMode: "True"
ingress:
enabled: true
class: "nginx"
web:
replicas: 1
uwsgi:
processes: 2
threads: 2
worker:
replicas: 1
concurrency: 2
# Bundled sub-charts.
postgresql:
enabled: true
auth:
username: invenio
password: "dbpassword123"
database: invenio
redis:
enabled: true
# One Redis pod instead of a master plus three replicas
architecture: standalone
auth:
enabled: false
rabbitmq:
enabled: true
auth:
password: "mqpassword123"
opensearch:
enabled: true
# A single node that holds every role, sized so the heap is half the limit.
master:
masterOnly: false # this node also takes the data and ingest roles
replicaCount: 1
heapSize: 1024m
resources:
requests:
cpu: 500m
memory: 1Gi
limits:
cpu: "1"
memory: 2Gi
# Dedicated role pools are not needed on a single node.
data:
replicaCount: 0
ingest:
replicaCount: 0
coordinating:
replicaCount: 0
persistence:
enabled: true
size: 5G
storage_class: "standard"
flower:
enabled: true

Two things are worth knowing about this mode. The chart still creates the invenio-opensearch service and points it at the remaining pod, so INVENIO_SEARCH_HOSTS keeps working without any change. And the cluster reports yellow rather than green, which is expected on a single node, because replica shards have nowhere else to live. Indexing and search are unaffected.

Once you have create your my-values.yaml file, you need to add the Helm repository:

Terminal window
helm repo add helm-invenio https://inveniosoftware.github.io/helm-invenio/
helm repo update

Verify the chart is available:

Terminal window
helm search repo helm-invenio

You should see something like:

NAME CHART VERSION APP VERSION DESCRIPTION
helm-invenio/invenio 0.11.1 12.0.10 Turn-key research data management platform.

Now, you can install the chart:

Terminal window
helm install invenio helm-invenio/invenio \
--namespace invenio \
--values my-values.yaml \
--timeout 60m

The --timeout 60m is intentional: pulling the OpenSearch and Postgres images, plus initialising the database and creating indices on first boot, can take 10-20 minutes depending on your network / machine performance.

Now, you can watch the rollout:

Terminal window
kubectl get pods -n invenio -w

Wait until every pod reaches Running.

The ingress terminates TLS and redirects plain HTTP to HTTPS, so the application has to be reached over the ingress’ 443 port. First, point invenio.local at your loopback address:

Terminal window
echo "127.0.0.1 invenio.local" | sudo tee -a /etc/hosts

If Minikube runs on your own machine, forward the ingress controller to port 8080:

Terminal window
kubectl port-forward -n ingress-nginx svc/ingress-nginx-controller 8080:443

If Minikube runs on a remote server, open an SSH tunnel from your machine to the ingress instead. Get the Minikube IP on the server:

Terminal window
minikube ip # e.g. 192.168.49.2

Then, from your own machine:

Terminal window
ssh -L 8080:192.168.49.2:443 <user>@<server>

Keep that session open while you use the instance.

Next, open https://invenio.local:8080 in your browser and accept the self-signed certificate warning. You will be able to log in once the post-install setup has created the admin user:

Terminal window
email: admin@invenio.org
password: admin123

The chart starts the application but does not seed everything the GEO Knowledge Hub needs (custom roles, fixtures, file location). Once the application is up and running, you need to run the post-install setup.