Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PULP-265] Add docs about STORAGES settings #6158

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

pedro-psb
Copy link
Member

Depends on this to make sense: #6058

TODO:

@pedro-psb pedro-psb marked this pull request as ready for review January 15, 2025 17:25
@pedro-psb pedro-psb marked this pull request as draft January 15, 2025 17:26
@pedro-psb pedro-psb changed the title Add docs about STORAGES setting Add docs about STORAGES settings Jan 15, 2025
@pedro-psb pedro-psb changed the title Add docs about STORAGES settings [PULP-265] Add docs about STORAGES settings Jan 15, 2025
@pedro-psb pedro-psb marked this pull request as ready for review January 16, 2025 14:19
Copy link
Member

@mdellweg mdellweg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Left some suggestions.


* The [`MEDIA_ROOT`](site:pulpcore/docs/admin/reference/settings/#media_root) setting specifies where Pulp
will save the files.
* Pulp customizes Django's default class, `django.core.files.storage.FileSystemStorage`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that mean "Don't use the original one!"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Should I add this explicitly?

Pulp customizes Django's default class, `django.core.files.storage.FileSystemStorage`.
Don't use the original one.

The settings can be updated via the `settings.py` file or through environment variables
and have support to dynaconf merge features (learn more on the [Settings Introduction](site:pulpcore/docs/admin/guides/configure-pulp/introduction/)).

To learn where and how to modify the files and envvars, refer to the appropriate installation method documentation:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/envvars/environment variables/

[Django docs](https://docs.djangoproject.com/en/4.2/ref/files/storage/#django.core.files.storage.FileSystemStorage).

### Amazon S3

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm missing a note that other storage technologies that provide an S3 api will work too.
I'm thinking of Ceph/RADOS and minio here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's useful, will mention that.

Comment on lines 100 to 102
As an example, an Amazon S3 might look like this:

```python
STORAGES = {
"default": {
"BACKEND": "storages.backends.s3.S3Storage",
"OPTIONS": {
"access_key": 'AKIAIT2Z5TDYPX3ARJBA',
"secret_key": 'qR+vjWPU50fCqQuUWbj9Fain/j2pV+ZtBCiDiieS',
"bucket_name": 'pulp3',
"signature_version": "s3v4",
"addressing_style": "path",
"region_name": "eu-central-1",
},
},
}
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a copy from the very location you just linked. I would not do that, as it has the tendency to be outdated and forgotten when the one other place where it rightfully lives gets an update.

(personaly, my general advice: Don't duplicate anything in the docs. Rely on the power of hyperlinks. [we do check for broken links in the docs, right?])

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair.

we do check for broken links in the docs, right?

🙈

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have experimented with a link checker. Will prioritize adding that to CI

@pedro-psb
Copy link
Member Author

Squashed

@mdellweg mdellweg merged commit 05b8381 into pulp:main Jan 29, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants