Does Foreman and Katello ( pulp3 ) supports S3 storage backend on latest versions?

Problem: Issue whlist configuring S3 backend storage in /etc/pulp/settings.py.

The /etc/pulp/setting.py configuration params for S3 are as follows.

MEDIA_ROOT = “None”
STORAGES = {
“default”: {
“BACKEND”: “storages.backends.s3boto3.S3Boto3Storage”,
“OPTIONS”: {
“access_key”: “XXXX”,
“secret_key”: “XXXXXX”,
“bucket_name”: “pulp-repos”,
“endpoint_url”: “http://X.X.X.X:9020”, # Add your Isilon endpoint URL
},
},
}

=================

Expected outcome: All foreman repositories to be published on S3 backend storage

Foreman and Proxy versions: NA

Foreman and Proxy plugin versions:
foreman 3.12.1
Katello 4.1.14.1
candelpin 4.4.20
pulp3

Distribution and version: Rocky9

pulp logs …

Mar 14 08:29:06 test-dev pulpcore-api[49514]: self._wrapped = Settings(settings_module)
Mar 14 08:29:06 test-dev pulpcore-api[49514]: ^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 14 08:29:06 test-dev pulpcore-api[49514]: File “/usr/lib/python3.11/site-packages/django/conf/init.py”, line 271, in init
Mar 14 08:29:06 test-dev pulpcore-api[49514]: raise ImproperlyConfigured(
Mar 14 08:29:06 test-dev pulpcore-api[49514]: django.core.exceptions.ImproperlyConfigured: DEFAULT_FILE_STORAGE/STORAGES are mutually exclusive.

Kindly help to resolve this issue ? Any documentation link wil be helpfull…

i tried the below url but didnt help much.

This doesn’t work because Foreman installs relatively old versions of Django and Pulp. Try this in /etc/pulp/settings.py:

MEDIA_ROOT = ""
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
AWS_STORAGE_BUCKET_NAME = ""
AWS_S3_ENDPOINT_URL = ""
AWS_S3_ADDRESSING_STYLE = "path"
AWS_S3_ACCESS_KEY_ID = ""
AWS_S3_SECRET_ACCESS_KEY = ""

And don’t forget to install django-storages

yum install python3.11-django-storages.noarch

thanks for the response…
Once the S3 configuration is added in /etc/pulp/settings.py which looks ok.

How do we proceed foreman/katello in switching from current local storage ( /var/lib/pulp/media/ to S3 bucket ? Do we have any options in foreman-installer --scenario katello .?

This thread might be helpful: Does Foreman/Katello support s3 storage for pulp content? - #4 by ekohl

I also know @m-bucher has a tracker in katello Tracker #36121: Support S3 cloud storage backend - Katello - Foreman to document/support this.

Wonder if updating foreman custom-hiera will do it for you. For the installer option, I suppose we need some changes to puppet-pulpcore.

hi, thanks for the response.

Referred to the documentation however there is no clarity after updating the /etc/pulp/settings.py file how do we make foreman pulp start using the new storage which is on S3.i’ve tested the S3 from the VM via simple tests copying , deleting , listing files via aws package which works fine. However do we have similar working tests from foreman/katello/pulpcore-manager ??

I took a stab at implementing the first step in the installer:

This would allow enabling it via custom-hiera.yaml or properly exposed via puppet-foreman_proxy_content.

I think we need to make this easier to support in packaging because hardcoding the python3.11- prefix is going to be a pain in the future.

thanks for the response.
is it possible to create an emergency or interim fix until it comes out as a package ?