Skip to content

Post-install setup

To customize the InvenioRDM and fits its needs, the GEO Knowledge Hub defines new Rest API endpoints, operations, look-and-feel and more. One element of this customization are GEO-specific roles, users and access policies.

The helm-invenio chart deploys the application and services, but it does not seed these specific elements required by the GEO Knowledge Hub. So, in this page, we will walk you through the commands you should run after the helm install to seed the GEO Knowledge Hub specific elements.

To run the commands below, you need to access a shell inside a worker pod. You can do this with the following command:

Terminal window
kubectl exec -it -n invenio deploy/invenio-worker -- /bin/bash

To initialise the database, you need to run the following command:

Terminal window
invenio db init
invenio db create

3. Create the default file storage location

Section titled “3. Create the default file storage location”

To create the default file storage location, you need to run the following command:

Terminal window
invenio files location --default 'default-location' /opt/invenio/var/instance/data

This command creates a new file storage location called default-location and points it to the a local directory.

If you have a distributed storage system, you might need to use a different path. The command bellow shows one example using an s3-compatible storage system:

Terminal window
invenio files location --default 'default-location' s3://my-bucket/data

More information about the invenio files location can be found in the InvenioRDM documentation.

The GEO Knowledge Hub extends the InvenioRDM with three GEO-specific roles: geo-community, geo-provider and geo-secretariat. To create these roles, you need to run the following commands:

Terminal window
invenio roles create admin
invenio roles create geo-community
invenio roles create geo-provider
invenio roles create geo-secretariat

Then grant the relevant access policies:

Terminal window
invenio access allow superuser-access role admin
invenio access allow geo-provider-access role geo-provider

If you defined invenio.default_users, the install job will have created the user already. If you want, you can promote them to a GEO-specific role.

Terminal window
# invenio roles add <email> <role>
invenio roles add admin@invenio.org {geo-provider, geo-secretariat, geo-community}

6. Initialise the search indices and load fixtures

Section titled “6. Initialise the search indices and load fixtures”

Now you have the database and users ready, you can initialise the search indices and load the fixtures.

Terminal window
invenio index init

Next, let’s purge the index queue and initialise it:

Terminal window
invenio index queue init purge

Finally, let’s load the fixtures:

Terminal window
invenio rdm-records fixtures

This command will start jobs for workers to process and index controlled vocabularies used in the GEO Knowledge Hub, including resource types, languages, licenses, GEO Work Programme activities, engagement priorities, target audiences and more. This will take a few minutes to complete.

1) Try the REST API examples against your fresh instance.

2) Review the parameters reference to fine-tune resource limits, autoscaling, and bundled-services credentials.