S3 as Storage backend¶
I chose S3 when initializing the repository!¶
If you are reading this section, you are lucky! You will only have to perform a few configuration changes. If on the contrary you didn't choose S3 as storage when initializing the repository file system, navigate below to follow more in depth instructions!
Create a bucket¶
InvenioRDM uses a MinIO container for S3-like storage. To create a bucket in MinIO you can:
a. Install the mc tool and run the following command, where
default-bucket is the name of your bucket.
mc mb default-bucket
b. Use the web UI (https://localhost[:9000]/minio). In the bottom right you will see a
+ sign, click there and add a new bucket.
Create a new location¶
Now you need to tell InvenioRDM where that bucket is. For that, create a new location. If you are running a local (development) instance, run:
cd path/to/your/instance pipenv run invenio files location create s3-default s3://default-bucket --default
If you are running the containerized version, run:
docker exec -it <web_[api|ui] container name or id> /bin/bash invenio files location create s3-default s3://default-bucket --default
Set your credentials¶
The last step is to set your credentials so your instance can authenticate against the S3 container.
By default, the
ACCESS_KEY and the
ACCESS_ID of MinIO are "CHANGE_ME", and so they are set in the
invenio.cfg file. If you changed them (you should) modify them accordingly in the config file.
It's done! Ready to roll!
I didn't choose S3 when initializing¶
You are here, but do not panic, it's not difficult just longer.