Skip to content

Commit 59f9f80

Browse files
author
Pablo Panero
committed
extensions: add S3 config of the extension
1 parent 5c2346a commit 59f9f80

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

docs/extensions/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# What can be added?
2+
3+
InvenioRDM supports a great variety of extensions that can help you adapt it to your infrastructure. The currently supported extensions are listed below. If you need even more, you can develop your own! Check how to do so [here](custom.md).
4+
5+
## Supported extensions
6+
7+
### Storage
8+
9+
- [S3](s3.md)

docs/extensions/s3.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# S3 as Storage backend
2+
3+
## I chose S3 when initializing the repository!
4+
5+
If you are reading the 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](#i-didnt-choose-s3-when-initializing) to follow more in depth changes!
6+
7+
### Create a bucket
8+
9+
InvenioRDM uses a [minio](https://min.io/download) container for S3 alike storage. To create a bucket in minio you can:
10+
11+
a. Install the [mc tool](https://docs.min.io/docs/minio-client-quickstart-guide.html) and run the following command, where `defaul-bucket` is the name of your bucket.
12+
13+
``` console
14+
$ mc mb default-bucket
15+
```
16+
17+
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.
18+
19+
### Create a new location
20+
21+
Now you need to tell InvenioRDM where is that bucket, for that create a new location. If you are running a local (development) instance, run:
22+
23+
``` console
24+
$ cd path/to/your/instance
25+
$ pipenv run invenio files location s3-default s3://default-bucket --default
26+
```
27+
28+
If you are running the containerized version, run:
29+
30+
``` console
31+
$ docker exec -it < web_[api|ui] container name or id> /bin/bash
32+
$ invenio files location s3-default s3://default-bucket --default
33+
```
34+
35+
### Set your credentials
36+
37+
The last step is to set your credentials so your instance can authenticate against the S3 container.
38+
39+
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.
40+
41+
It's done! Ready to roll!
42+
43+
## I didn't choose S3 when initializing
44+
45+
You are here, but do not panic, is not difficult just longer.
46+
47+
This docs will come soon, for now we apologize for the hussle, but could you create a new instance to test S3?

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ nav:
3737
- Troubleshooting: 'develop/troubleshoot.md'
3838
- Cleanup: 'develop/cleanup.md'
3939
- Extensions:
40+
- What can be added?: 'extensions/index.md'
4041
- Add your extensions: 'extensions/custom.md'
42+
- S3 Storage: 'extensions/s3.md'
4143
- Deploy:
4244
- Kubernetes: 'deployment/kubernetes.md'
4345
- OpenShift: 'deployment/openshift.md'

0 commit comments

Comments
 (0)