Geonetwork 4.4.5 with S3 storage

Hi, I was wondering if anyone has had any luck using S3 storage with a container setup? After digging around a little, the only relevant info I seem to find on the topic are the following:
GH - repo, S3 (however, it is not clear to me what the lib folder jar files mentioned are).
This then refers to the following: Docs

When trying to set env variables as mentioned in the docs, the following error is thrown:

“No qualifying bean of type ‘org.fao.geonet.api.records.attachments.Store’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=“resourceStore”)}”

If I try to customize the bean before starting the container, I get the following:

“nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.fao.geonet.resources.S3Credentials] for bean with name ‘s3credentials’ defined in ServletContext resource [/WEB-INF/config-spring-geonetwork.xml]; nested exception is java.lang.ClassNotFoundException: org.fao.geonet.resources.S3Credentials”

Any input or clarification about this is greatly appreciated, as I have little experience beforehand with Geonetwork.

Unfortunately, the S3 storage code is unmaintained and there is no much documentation. From these 2 sources:

Apparently you need to define the following environmental variable:

export GEONETWORK_STORE_TYPE=s3

And also define the following environmental variables with the connection parameters:

  • AWS_S3_PREFIX
  • AWS_S3_BUCKET
  • AWS_DEFAULT_REGION
  • AWS_S3_ENDPOINT
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

Hello, and thank you for your reply!

I ended up trying with Jcloud instead, although with some tweaking I figure I would get S3 to work too. I was missing what lib files the documentation mentioned, which was solved when I discovered the optional files at Sourceforge. However, I am still a bit confused as to what files would actually end up being stored in a bucket (tried with GCS). From testing, it seemed that data/metadata_data, formatter and resources was created in the bucket, but I haven’t delved into the source code enough to tell if data/config for instance is supposed to be stored there also, or if config files are assumed to already exist in the bucket when starting up Geonetwork. The docs unfortunately did not mention how external storage works in conjunction with the env vars for the different directories that Geonetwork uses (or at least it was not clear to me, although of course I might have missed something).

A couple of follow-up questions:
Thank you for the clarification about S3 storage being unmaintained - does that also go for Jcloud/CMIS?

External storage seems to me to be at a proof of concept stage currently - are there any plans for developing it further? I couldn’t find any info regarding it in milestones for the current 4.4.7 release at a glance, for instance.

CMIS is used by at least one organisation, which is responsible for its maintenance.

For CMIS the original code change contains some additional documentation that may be useful: Add new feature for supporting CMIS as an external file store by ianwallen · Pull Request #5118 · geonetwork/core-geonetwork · GitHub, this documentation would be good to add to the official documentation.

For JCloud there is a recent update as well, by the same users who are maintaining CMIS: Add better Jcloud versioning supports by ianwallen · Pull Request #8512 · geonetwork/core-geonetwork · GitHub