InvenioRDM Alpha 5 (March Release)

March is ending, which means… April’s fools! No… just kidding :wink: Release!

Thank you all for testing and giving feedback on the February
release, and your many contributions.

Release Content

This release comes with new:

  • Metadata extensions (also known as custom fields).
  • Support for custom vocabularies.
  • Deployment via Helm charts (and available Docker images
    here).

Improved documentation, bug fixes and others!

New deployments

We have also deployed two InvenioRDM instances:

What do you need to do?

Try out this release by using the documentation (http://inveniordm.docs.cern.ch).
Try to make it your own, we are mostly interested in you trying the new metadata
extensions and custom vocabularies. If you have the chance, please try to deploy
using the Helm chart.

As always here is the template to give feedback:

## Bugs

## What worked well

## What didn't work well

## Wishes for documentation

Thank you very much in advance, take care and stay safe!

Annex

We are still working on the datamodel and its presentation. Some fields are still required
for the records UI to work correctly. A minimal record that would work is:

{
    "_access": {
        "metadata_restricted": false,
        "files_restricted": false
    },
    "_owners": [1],
    "_created_by": 1,
    "access_right": "open",
    "community": {
        "primary": "Maincom",
        "secondary": ["Subcom One"]
    },
    "creators": [],
    "identifiers": {
        "DOI": "10.9999/rdm.9999999"
    },
    "resource_type": {
        "type": "image",
        "subtype": "image-photo"
    },
    "titles": [{
        "title": "A minimal record",
        "type": "Other",
        "lang": "eng"
    }],
    "descriptions": [
        {
            "description": "A story of a turn-key RDM!",
            "type": "Abstract",
            "lang": "eng"
        }
    ]
}
2 Likes

First of all many thanks for your hard work. :slight_smile:

My focus on testing this release was more on how to build my own image and use the image outside of invenio-cli environment and have to connect with external Database, Cache, and Elasticsearch machines. External meaning not in the same machine.

Bugs

Build your own image.

What worked well

The CLI works great.
Demo Data.

What didn’t work well

building your own image, using this command.

docker build -t demo-inveniordm /path/to/your/instance --build-arg include_assets=true

the image has been build with static errors, and while running image gives this error:

FileNotFoundError: [Errno 2] No such file or directory: '/opt/invenio/......./var/instance/static/dist/manifest.json'

I solved this by replacing these lines of code in Dockerfile:

from:

to:

to

I am not sure if this was the issue.

Wishes for documentation

  1. I wish there was more information on building your own image.
  2. How to run the database, cache, Elasticsearch scripts without invenio-cli, once you have your own image to use with an external Database/cache.

Hi Mojib, Thanks for testing!!

Quick question, did you run it in the directory or you specified a path? meaning /path/to/your/instance was .or some other path?

Cheers,
Pablo

Hi Pablo, welcome!
no :joy:, path to directory where Dockerfile of my instance is.

Cheers,
Mojib

Hi Mojib,

You are right. I just realized that it would only work if you are in the directory of the instance. Therefore, the path is .. Otherwise, the COPY . commands inside the Dockerfile would make it miss files.

Will address this for the next release.

For now, doing

docker build -t demo-inveniordm . --build-arg include_assets=true

Should work.

As for the changes, invenio webpack buildall calls the other three under the hood so there is no difference between those two Dockerfiles. Could you see if you can reproduce it with .?

Cheers and thanks a lot!
Pablo

Hi Pablo,

i have tried using the . while building the image, it works just fine.

but regarding the lines in the Dockerfile using this lines which is as default in Dockerfile.

RUN if [ "$include_assets" = "true" ]; \
   then \
       cp -r ./static/. ${INVENIO_INSTANCE_PATH}/static/ && \
       cp -r ./assets/. ${INVENIO_INSTANCE_PATH}/assets/ && \
       invenio collect --verbose  && \
       invenio webpack buildall \
   ; fi

gives error while building images, bellow is some line of the error:

Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: Cannot find module 'node-sass'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (/opt/invenio/var/instance/assets/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at getDefaultSassImpl (/opt/invenio/var/instance/assets/node_modules/sass-loader/dist/index.js:198:10)
    at Object.loader (/opt/invenio/var/instance/assets/node_modules/sass-loader/dist/index.js:80:29)
    at runLoaders (/opt/invenio/var/instance/assets/node_modules/webpack/lib/NormalModule.js:316:20)
    at /opt/invenio/var/instance/assets/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /opt/invenio/var/instance/assets/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at runSyncOrAsync (/opt/invenio/var/instance/assets/node_modules/loader-runner/lib/LoaderRunner.js:143:3)
    at iterateNormalLoaders (/opt/invenio/var/instance/assets/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
    at Array.<anonymous> (/opt/invenio/var/instance/assets/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/opt/invenio/var/instance/assets/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at provider (/opt/invenio/var/instance/assets/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9)
    at /opt/invenio/var/instance/assets/node_modules/graceful-fs/graceful-fs.js:115:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)

ERROR in ./scss/invenio_theme/admin.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: Cannot find module 'node-sass'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:690:17)
    at require (/opt/invenio/var/instance/assets/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at getDefaultSassImpl (/opt/invenio/var/instance/assets/node_modules/sass-loader/dist/index.js:198:10)
    at Object.loader (/opt/invenio/var/instance/assets/node_modules/sass-loader/dist/index.js:80:29)
    at runLoaders (/opt/invenio/var/instance/assets/node_modules/webpack/lib/NormalModule.js:316:20)
    at /opt/invenio/var/instance/assets/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /opt/invenio/var/instance/assets/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at runSyncOrAsync (/opt/invenio/var/instance/assets/node_modules/loader-runner/lib/LoaderRunner.js:143:3)
    at iterateNormalLoaders (/opt/invenio/var/instance/assets/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
    at Array.<anonymous> (/opt/invenio/var/instance/assets/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
    at Storage.finished (/opt/invenio/var/instance/assets/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
    at provider (/opt/invenio/var/instance/assets/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9)

and after image is build, using the image gives error of manifest not found.

there is some problem while building the assets/statics,
anyway adding these lines fixed it for me.

       invenio webpack create && \
       invenio webpack install --unsafe && \
       invenio webpack build \

Thanks Pablo! stay safe :slight_smile:

Hi Mojib,

Thanks for the feedback. We will check it out. That is happening because for some reason the assets and templates are not in . and therefore not copied.

Somehow the second call it is finding them. Might have to do with layers of the docker building.

As for buildall is equivalent to the other three. See here. There is no programmatic difference. Calling buildall does create, install and build in one command.