techie
March 14, 2025, 9:52am
1
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.
.. _storage:
Storage
=======
-----------
Pulp uses `django-storages <https://django-storages.readthedocs.io/>`_ to support multiple storage
backends. If no backend is configured, Pulp will by default use the local filesystem. If you want
to use another storage backend such as Amazon Simple Storage Service (S3), you'll need to
configure Pulp.
Local Filesystem
^^^^^^^^^^^^^^^^
This is the default storage backend Pulp will use if another is not specified. By default, Pulp will
set the ``MEDIA_ROOT`` to ``/var/lib/pulp/media`` as the location where Pulp will store its files.
There are three other settings that can be modified, ``MEDIA_URL``, ``FILE_UPLOAD_PERMISSIONS`` and
``FILE_UPLOAD_DIRECTORY_PERMISSIONS``. Pulp leaves these settings on their default ``Django`` values.
This file has been truncated. show original
sudo_0
March 19, 2025, 8:27am
2
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
techie
March 21, 2025, 3:03pm
3
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 .?
sajha
March 24, 2025, 8:44pm
4
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.
techie
March 26, 2025, 10:13am
5
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 ??
ekohl
March 31, 2025, 11:41am
6
I took a stab at implementing the first step in the installer:
master
← ekohl:s3-storage
opened 11:39AM - 31 Mar 25 UTC
Pulp supports multiple storage backends via the django-storages package. This ex… poses both the file storage (default) and s3.
No specific s3 options are exposed, but rather the whole options hash. This makes it easily extensible, both for specific s3 tuning and for future expansion.
It depends on the django-storages Python package in install. This is too specific now, but changing that would require a packaging change.
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.
techie
April 1, 2025, 9:53am
7
thanks for the response.
is it possible to create an emergency or interim fix until it comes out as a package ?