Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,26 @@ PULP_SETTINGS=/etc/pulp/settings.py pulpcore-manager diffsettings | grep WORKER_

This is useful for module parameter which configure Pulpcore settings but have an `undef` default, such as `$worker_ttl`. When the param value is `undef`, the setting is omitted from `settings.py` and therefore Pulpcore's default is used.

### S3-compatible object storage

Set `storage_backend` to `s3` and pass the options supported by
[`django-storages`](https://django-storages.readthedocs.io/en/stable/backends/amazon-S3.html):

```puppet
class { 'pulpcore':
storage_backend => 's3',
storage_options => {
'bucket_name' => 'pulp',
'endpoint_url' => 'https://object.example.test',
'addressing_style' => 'path',
Comment thread
jakduch marked this conversation as resolved.
},
}
```

The module installs the `pulpcore-storage-s3` package capability, omits
`MEDIA_ROOT` so Django's default empty value applies, and preserves local Django
static-file storage. Filesystem content storage remains the default.

## Service setup

The module deploys a few systemd services:
Expand Down
29 changes: 28 additions & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,47 @@
order => '02',
}

if $pulpcore::storage_backend == 's3' {
$storages = {
'default' => {
'BACKEND' => 'storages.backends.s3.S3Storage',
'OPTIONS' => $pulpcore::storage_options,
},
'staticfiles' => {
'BACKEND' => 'django.contrib.staticfiles.storage.StaticFilesStorage',
},
}

concat::fragment { 'storage':
target => 'pulpcore settings',
content => "STORAGES = ${stdlib::to_python($storages)}\n",
order => '03',
}
}

file { $pulpcore::user_home:
ensure => directory,
owner => $pulpcore::user,
group => $pulpcore::group,
mode => '0775',
}

file { [$pulpcore::cache_dir, $pulpcore::media_root]:
file { $pulpcore::cache_dir:
ensure => directory,
owner => $pulpcore::user,
group => $pulpcore::group,
mode => '0750',
}

if $pulpcore::storage_backend == 'file' {
file { $pulpcore::media_root:
ensure => directory,
owner => $pulpcore::user,
group => $pulpcore::group,
mode => '0750',
}
}

file { unique($pulpcore::allowed_import_path + $pulpcore::allowed_export_path):
ensure => directory,
owner => $pulpcore::user,
Expand Down
9 changes: 9 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@
# What percentage of available-workers will pulpcore use for import tasks at a time.
# By default, pulpcore will use all available workers.
#
# @param storage_backend
# Storage backend used for Pulp content. The default keeps local filesystem
# storage. Set to s3 to use S3 or an S3-compatible object store.
#
# @param storage_options
# Options passed to django-storages when storage_backend is s3.
#
# @example Default configuration
# include pulpcore
#
Expand Down Expand Up @@ -282,6 +289,8 @@
Optional[Boolean] $analytics = undef,
Optional[Boolean] $hide_guarded_distributions = undef,
Optional[Integer[1,100]] $import_workers_percent = undef,
Enum['file', 's3'] $storage_backend = 'file',
Hash[String[1], Any] $storage_options = {},
Comment thread
jakduch marked this conversation as resolved.
) {
$settings_file = "${config_dir}/settings.py"
$certs_dir = "${config_dir}/certs"
Expand Down
6 changes: 6 additions & 0 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
ensure => present,
}

if $pulpcore::storage_backend == 's3' {
package { 'pulpcore-storage-s3':
ensure => present,
}
}

if $facts['os']['selinux']['enabled'] {
package { 'pulpcore-selinux':
ensure => present,
Expand Down
38 changes: 38 additions & 0 deletions spec/acceptance/storage_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
require 'spec_helper_acceptance'

if ENV.fetch('BEAKER_FACTER_pulpcore_version', 'nightly') == 'nightly'
describe 'with S3-compatible storage' do
it_behaves_like 'an idempotent resource' do
let(:manifest) do
<<~PUPPET
class { 'pulpcore':
storage_backend => 's3',
storage_options => {
'access_key' => 'test',
'secret_key' => 'test',
'bucket_name' => 'pulp',
'endpoint_url' => 'https://object.example.test',
'addressing_style' => 'path',
},
}
PUPPET
end
end

describe command('rpm -q --whatprovides pulpcore-storage-s3') do
its(:exit_status) { is_expected.to eq 0 }

Check failure on line 23 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - AlmaLinux 9 - Pulp nightly

with S3-compatible storage Command "rpm -q --whatprovides pulpcore-storage-s3" exit_status is expected to eq 0 Failure/Error: its(:exit_status) { is_expected.to eq 0 } expected: 0 got: 1 (compared using ==)

Check failure on line 23 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 8 - AlmaLinux 9 - Pulp nightly

with S3-compatible storage Command "rpm -q --whatprovides pulpcore-storage-s3" exit_status is expected to eq 0 Failure/Error: its(:exit_status) { is_expected.to eq 0 } expected: 0 got: 1 (compared using ==)

Check failure on line 23 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - CentOS 9 - Pulp nightly

with S3-compatible storage Command "rpm -q --whatprovides pulpcore-storage-s3" exit_status is expected to eq 0 Failure/Error: its(:exit_status) { is_expected.to eq 0 } expected: 0 got: 1 (compared using ==)

Check failure on line 23 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 8 - CentOS 9 - Pulp nightly

with S3-compatible storage Command "rpm -q --whatprovides pulpcore-storage-s3" exit_status is expected to eq 0 Failure/Error: its(:exit_status) { is_expected.to eq 0 } expected: 0 got: 1 (compared using ==)
end

describe file('/etc/pulp/settings.py') do
it { is_expected.to be_file }
its(:content) { is_expected.not_to match(/^MEDIA_ROOT =/) }

Check failure on line 28 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - AlmaLinux 9 - Pulp nightly

with S3-compatible storage File "/etc/pulp/settings.py" content is expected not to match /^MEDIA_ROOT =/ Failure/Error: its(:content) { is_expected.not_to match(/^MEDIA_ROOT =/) } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" not to match /^MEDIA_ROOT =/ Diff: @@ -1 +1,75 @@ -/^MEDIA_ROOT =/ +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is +# explicitly defined with value False. This data is used by the Pulp project +# to make informed, data-driven decisions about future feature development. +# ANALYTICS = False + +CONTENT_ORIGIN = "https://almalinux9-64-openvox8.example.com" +SECRET_KEY = "ufD2LPewAyNJxRBi4xqnPMG6roWN6sT2FZpotopAVAyGDmuP9C" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': "z58gnqCQmEVXFuWbGLido3Kn5CATmD5y", + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ["pulpcore.app.authentication.PulpNoCreateRemoteUserBackend"] + +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication', +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +IMPORT_WORKERS_PERCENT = 42 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 28 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 8 - AlmaLinux 9 - Pulp nightly

with S3-compatible storage File "/etc/pulp/settings.py" content is expected not to match /^MEDIA_ROOT =/ Failure/Error: its(:content) { is_expected.not_to match(/^MEDIA_ROOT =/) } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" not to match /^MEDIA_ROOT =/ Diff: @@ -1 +1,75 @@ -/^MEDIA_ROOT =/ +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is +# explicitly defined with value False. This data is used by the Pulp project +# to make informed, data-driven decisions about future feature development. +# ANALYTICS = False + +CONTENT_ORIGIN = "https://almalinux9-64-puppet8.example.com" +SECRET_KEY = "epBay2w7YVL5nHv2pwDWeuEQCKNFrwqNALB2w3JJ5MCeG8kcMy" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': "ZDdpePV9iwmDsYm3PjnshNsJ5wJtbRVj", + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ["pulpcore.app.authentication.PulpNoCreateRemoteUserBackend"] + +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication', +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +IMPORT_WORKERS_PERCENT = 42 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 28 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - CentOS 9 - Pulp nightly

with S3-compatible storage File "/etc/pulp/settings.py" content is expected not to match /^MEDIA_ROOT =/ Failure/Error: its(:content) { is_expected.not_to match(/^MEDIA_ROOT =/) } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" not to match /^MEDIA_ROOT =/ Diff: @@ -1 +1,75 @@ -/^MEDIA_ROOT =/ +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is +# explicitly defined with value False. This data is used by the Pulp project +# to make informed, data-driven decisions about future feature development. +# ANALYTICS = False + +CONTENT_ORIGIN = "https://centos9-64-openvox8.example.com" +SECRET_KEY = "mJ5QCZzTc2Bf8GX8d4TpDGYMYAbFgRZG2Kqgrv5VKLPGmMuP63" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': "UMypCC9Gd8pq2zoh2LiTCFMAPrn5ZVDo", + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ["pulpcore.app.authentication.PulpNoCreateRemoteUserBackend"] + +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication', +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +IMPORT_WORKERS_PERCENT = 42 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 28 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 8 - CentOS 9 - Pulp nightly

with S3-compatible storage File "/etc/pulp/settings.py" content is expected not to match /^MEDIA_ROOT =/ Failure/Error: its(:content) { is_expected.not_to match(/^MEDIA_ROOT =/) } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" not to match /^MEDIA_ROOT =/ Diff: @@ -1 +1,75 @@ -/^MEDIA_ROOT =/ +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is +# explicitly defined with value False. This data is used by the Pulp project +# to make informed, data-driven decisions about future feature development. +# ANALYTICS = False + +CONTENT_ORIGIN = "https://centos9-64-puppet8.example.com" +SECRET_KEY = "9wUgHHT69jS3Xni5ykJhQfutEAGyWgX8sWTfJxUviivDjAuwke" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': "agAAqERvKzV4d6XL3eAx6PPmSqvYpxz8", + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ["pulpcore.app.authentication.PulpNoCreateRemoteUserBackend"] + +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication', +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +IMPORT_WORKERS_PERCENT = 42 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}
its(:content) { is_expected.to include('"BACKEND": "storages.backends.s3.S3Storage"') }

Check failure on line 29 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - AlmaLinux 9 - Pulp nightly

with S3-compatible storage File "/etc/pulp/settings.py" content is expected to include "\"BACKEND\": \"storages.backends.s3.S3Storage\"" Failure/Error: its(:content) { is_expected.to include('"BACKEND": "storages.backends.s3.S3Storage"') } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to include "\"BACKEND\": \"storages.backends.s3.S3Storage\"" Diff: @@ -1 +1,75 @@ -"BACKEND": "storages.backends.s3.S3Storage" +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is +# explicitly defined with value False. This data is used by the Pulp project +# to make informed, data-driven decisions about future feature development. +# ANALYTICS = False + +CONTENT_ORIGIN = "https://almalinux9-64-openvox8.example.com" +SECRET_KEY = "ufD2LPewAyNJxRBi4xqnPMG6roWN6sT2FZpotopAVAyGDmuP9C" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': "z58gnqCQmEVXFuWbGLido3Kn5CATmD5y", + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ["pulpcore.app.authentication.PulpNoCreateRemoteUserBackend"] + +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication', +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +IMPORT_WORKERS_PERCENT = 42 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 29 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 8 - AlmaLinux 9 - Pulp nightly

with S3-compatible storage File "/etc/pulp/settings.py" content is expected to include "\"BACKEND\": \"storages.backends.s3.S3Storage\"" Failure/Error: its(:content) { is_expected.to include('"BACKEND": "storages.backends.s3.S3Storage"') } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to include "\"BACKEND\": \"storages.backends.s3.S3Storage\"" Diff: @@ -1 +1,75 @@ -"BACKEND": "storages.backends.s3.S3Storage" +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is +# explicitly defined with value False. This data is used by the Pulp project +# to make informed, data-driven decisions about future feature development. +# ANALYTICS = False + +CONTENT_ORIGIN = "https://almalinux9-64-puppet8.example.com" +SECRET_KEY = "epBay2w7YVL5nHv2pwDWeuEQCKNFrwqNALB2w3JJ5MCeG8kcMy" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': "ZDdpePV9iwmDsYm3PjnshNsJ5wJtbRVj", + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ["pulpcore.app.authentication.PulpNoCreateRemoteUserBackend"] + +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication', +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +IMPORT_WORKERS_PERCENT = 42 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 29 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - CentOS 9 - Pulp nightly

with S3-compatible storage File "/etc/pulp/settings.py" content is expected to include "\"BACKEND\": \"storages.backends.s3.S3Storage\"" Failure/Error: its(:content) { is_expected.to include('"BACKEND": "storages.backends.s3.S3Storage"') } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to include "\"BACKEND\": \"storages.backends.s3.S3Storage\"" Diff: @@ -1 +1,75 @@ -"BACKEND": "storages.backends.s3.S3Storage" +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is +# explicitly defined with value False. This data is used by the Pulp project +# to make informed, data-driven decisions about future feature development. +# ANALYTICS = False + +CONTENT_ORIGIN = "https://centos9-64-openvox8.example.com" +SECRET_KEY = "mJ5QCZzTc2Bf8GX8d4TpDGYMYAbFgRZG2Kqgrv5VKLPGmMuP63" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': "UMypCC9Gd8pq2zoh2LiTCFMAPrn5ZVDo", + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ["pulpcore.app.authentication.PulpNoCreateRemoteUserBackend"] + +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication', +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +IMPORT_WORKERS_PERCENT = 42 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 29 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 8 - CentOS 9 - Pulp nightly

with S3-compatible storage File "/etc/pulp/settings.py" content is expected to include "\"BACKEND\": \"storages.backends.s3.S3Storage\"" Failure/Error: its(:content) { is_expected.to include('"BACKEND": "storages.backends.s3.S3Storage"') } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to include "\"BACKEND\": \"storages.backends.s3.S3Storage\"" Diff: @@ -1 +1,75 @@ -"BACKEND": "storages.backends.s3.S3Storage" +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is +# explicitly defined with value False. This data is used by the Pulp project +# to make informed, data-driven decisions about future feature development. +# ANALYTICS = False + +CONTENT_ORIGIN = "https://centos9-64-puppet8.example.com" +SECRET_KEY = "9wUgHHT69jS3Xni5ykJhQfutEAGyWgX8sWTfJxUviivDjAuwke" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': "agAAqERvKzV4d6XL3eAx6PPmSqvYpxz8", + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ["pulpcore.app.authentication.PulpNoCreateRemoteUserBackend"] + +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication', +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +IMPORT_WORKERS_PERCENT = 42 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}
its(:content) { is_expected.to include('"endpoint_url": "https://object.example.test"') }

Check failure on line 30 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - AlmaLinux 9 - Pulp nightly

with S3-compatible storage File "/etc/pulp/settings.py" content is expected to include "\"endpoint_url\": \"https://object.example.test\"" Failure/Error: its(:content) { is_expected.to include('"endpoint_url": "https://object.example.test"') } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to include "\"endpoint_url\": \"https://object.example.test\"" Diff: @@ -1 +1,75 @@ -"endpoint_url": "https://object.example.test" +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is +# explicitly defined with value False. This data is used by the Pulp project +# to make informed, data-driven decisions about future feature development. +# ANALYTICS = False + +CONTENT_ORIGIN = "https://almalinux9-64-openvox8.example.com" +SECRET_KEY = "ufD2LPewAyNJxRBi4xqnPMG6roWN6sT2FZpotopAVAyGDmuP9C" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': "z58gnqCQmEVXFuWbGLido3Kn5CATmD5y", + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ["pulpcore.app.authentication.PulpNoCreateRemoteUserBackend"] + +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication', +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +IMPORT_WORKERS_PERCENT = 42 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 30 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 8 - AlmaLinux 9 - Pulp nightly

with S3-compatible storage File "/etc/pulp/settings.py" content is expected to include "\"endpoint_url\": \"https://object.example.test\"" Failure/Error: its(:content) { is_expected.to include('"endpoint_url": "https://object.example.test"') } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to include "\"endpoint_url\": \"https://object.example.test\"" Diff: @@ -1 +1,75 @@ -"endpoint_url": "https://object.example.test" +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is +# explicitly defined with value False. This data is used by the Pulp project +# to make informed, data-driven decisions about future feature development. +# ANALYTICS = False + +CONTENT_ORIGIN = "https://almalinux9-64-puppet8.example.com" +SECRET_KEY = "epBay2w7YVL5nHv2pwDWeuEQCKNFrwqNALB2w3JJ5MCeG8kcMy" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': "ZDdpePV9iwmDsYm3PjnshNsJ5wJtbRVj", + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ["pulpcore.app.authentication.PulpNoCreateRemoteUserBackend"] + +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication', +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +IMPORT_WORKERS_PERCENT = 42 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 30 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - CentOS 9 - Pulp nightly

with S3-compatible storage File "/etc/pulp/settings.py" content is expected to include "\"endpoint_url\": \"https://object.example.test\"" Failure/Error: its(:content) { is_expected.to include('"endpoint_url": "https://object.example.test"') } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to include "\"endpoint_url\": \"https://object.example.test\"" Diff: @@ -1 +1,75 @@ -"endpoint_url": "https://object.example.test" +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is +# explicitly defined with value False. This data is used by the Pulp project +# to make informed, data-driven decisions about future feature development. +# ANALYTICS = False + +CONTENT_ORIGIN = "https://centos9-64-openvox8.example.com" +SECRET_KEY = "mJ5QCZzTc2Bf8GX8d4TpDGYMYAbFgRZG2Kqgrv5VKLPGmMuP63" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': "UMypCC9Gd8pq2zoh2LiTCFMAPrn5ZVDo", + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ["pulpcore.app.authentication.PulpNoCreateRemoteUserBackend"] + +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication', +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +IMPORT_WORKERS_PERCENT = 42 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 30 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 8 - CentOS 9 - Pulp nightly

with S3-compatible storage File "/etc/pulp/settings.py" content is expected to include "\"endpoint_url\": \"https://object.example.test\"" Failure/Error: its(:content) { is_expected.to include('"endpoint_url": "https://object.example.test"') } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to include "\"endpoint_url\": \"https://object.example.test\"" Diff: @@ -1 +1,75 @@ -"endpoint_url": "https://object.example.test" +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is +# explicitly defined with value False. This data is used by the Pulp project +# to make informed, data-driven decisions about future feature development. +# ANALYTICS = False + +CONTENT_ORIGIN = "https://centos9-64-puppet8.example.com" +SECRET_KEY = "9wUgHHT69jS3Xni5ykJhQfutEAGyWgX8sWTfJxUviivDjAuwke" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': "agAAqERvKzV4d6XL3eAx6PPmSqvYpxz8", + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ["pulpcore.app.authentication.PulpNoCreateRemoteUserBackend"] + +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication', +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +IMPORT_WORKERS_PERCENT = 42 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}
its(:content) { is_expected.to include('"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"') }

Check failure on line 31 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - AlmaLinux 9 - Pulp nightly

with S3-compatible storage File "/etc/pulp/settings.py" content is expected to include "\"BACKEND\": \"django.contrib.staticfiles.storage.StaticFilesStorage\"" Failure/Error: its(:content) { is_expected.to include('"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"') } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to include "\"BACKEND\": \"django.contrib.staticfiles.storage.StaticFilesStorage\"" Diff: @@ -1 +1,75 @@ -"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage" +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is +# explicitly defined with value False. This data is used by the Pulp project +# to make informed, data-driven decisions about future feature development. +# ANALYTICS = False + +CONTENT_ORIGIN = "https://almalinux9-64-openvox8.example.com" +SECRET_KEY = "ufD2LPewAyNJxRBi4xqnPMG6roWN6sT2FZpotopAVAyGDmuP9C" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': "z58gnqCQmEVXFuWbGLido3Kn5CATmD5y", + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ["pulpcore.app.authentication.PulpNoCreateRemoteUserBackend"] + +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication', +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +IMPORT_WORKERS_PERCENT = 42 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 31 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 8 - AlmaLinux 9 - Pulp nightly

with S3-compatible storage File "/etc/pulp/settings.py" content is expected to include "\"BACKEND\": \"django.contrib.staticfiles.storage.StaticFilesStorage\"" Failure/Error: its(:content) { is_expected.to include('"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"') } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to include "\"BACKEND\": \"django.contrib.staticfiles.storage.StaticFilesStorage\"" Diff: @@ -1 +1,75 @@ -"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage" +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is +# explicitly defined with value False. This data is used by the Pulp project +# to make informed, data-driven decisions about future feature development. +# ANALYTICS = False + +CONTENT_ORIGIN = "https://almalinux9-64-puppet8.example.com" +SECRET_KEY = "epBay2w7YVL5nHv2pwDWeuEQCKNFrwqNALB2w3JJ5MCeG8kcMy" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': "ZDdpePV9iwmDsYm3PjnshNsJ5wJtbRVj", + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ["pulpcore.app.authentication.PulpNoCreateRemoteUserBackend"] + +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication', +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +IMPORT_WORKERS_PERCENT = 42 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 31 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / OpenVox 8 - CentOS 9 - Pulp nightly

with S3-compatible storage File "/etc/pulp/settings.py" content is expected to include "\"BACKEND\": \"django.contrib.staticfiles.storage.StaticFilesStorage\"" Failure/Error: its(:content) { is_expected.to include('"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"') } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to include "\"BACKEND\": \"django.contrib.staticfiles.storage.StaticFilesStorage\"" Diff: @@ -1 +1,75 @@ -"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage" +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is +# explicitly defined with value False. This data is used by the Pulp project +# to make informed, data-driven decisions about future feature development. +# ANALYTICS = False + +CONTENT_ORIGIN = "https://centos9-64-openvox8.example.com" +SECRET_KEY = "mJ5QCZzTc2Bf8GX8d4TpDGYMYAbFgRZG2Kqgrv5VKLPGmMuP63" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': "UMypCC9Gd8pq2zoh2LiTCFMAPrn5ZVDo", + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ["pulpcore.app.authentication.PulpNoCreateRemoteUserBackend"] + +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication', +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +IMPORT_WORKERS_PERCENT = 42 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}

Check failure on line 31 in spec/acceptance/storage_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Puppet 8 - CentOS 9 - Pulp nightly

with S3-compatible storage File "/etc/pulp/settings.py" content is expected to include "\"BACKEND\": \"django.contrib.staticfiles.storage.StaticFilesStorage\"" Failure/Error: its(:content) { is_expected.to include('"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"') } expected "################################################################################\n# File managed by ...nsole'],\n 'level': 'WARNING',\n 'propagate': False,\n },\n },\n}\n" to include "\"BACKEND\": \"django.contrib.staticfiles.storage.StaticFilesStorage\"" Diff: @@ -1 +1,75 @@ -"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage" +################################################################################ +# File managed by Puppet module: pulpcore +################################################################################ +# Not only will edits be overwritten later, there is also a strong +# possibility of breaking the system if changes are made here without making +# required corresponding changes elsewhere. Refer to the documentation used to +# install Pulpcore to determine the safe and persistent way to modify the +# configuration. +################################################################################ + +# Send anonymous usage data to https://analytics.pulpproject.org/ unless this is +# explicitly defined with value False. This data is used by the Pulp project +# to make informed, data-driven decisions about future feature development. +# ANALYTICS = False + +CONTENT_ORIGIN = "https://centos9-64-puppet8.example.com" +SECRET_KEY = "9wUgHHT69jS3Xni5ykJhQfutEAGyWgX8sWTfJxUviivDjAuwke" +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pulpcore', + 'USER': 'pulp', + 'PASSWORD': "agAAqERvKzV4d6XL3eAx6PPmSqvYpxz8", + 'HOST': 'localhost', + 'PORT': '5432', + }, +} +REDIS_URL = "redis://localhost:6379/8" + + +MEDIA_ROOT = "/var/lib/pulp/media" +STATIC_ROOT = "/var/lib/pulp/assets" +STATIC_URL = "/assets/" +FILE_UPLOAD_TEMP_DIR = "/var/lib/pulp/tmp" +WORKING_DIRECTORY = "/var/lib/pulp/tmp" + +REMOTE_USER_ENVIRON_NAME = 'HTTP_REMOTE_USER' +AUTHENTICATION_BACKENDS = ["pulpcore.app.authentication.PulpNoCreateRemoteUserBackend"] + +REST_FRAMEWORK__DEFAULT_AUTHENTICATION_CLASSES = ( + 'rest_framework.authentication.SessionAuthentication', + 'pulpcore.app.authentication.PulpRemoteUserAuthentication', +) + +ALLOWED_IMPORT_PATHS = ["/var/lib/pulp/sync_imports"] +ALLOWED_EXPORT_PATHS = [] +ALLOWED_CONTENT_CHECKSUMS = ["sha224", "sha256", "sha384", "sha512"] + +# Derive HTTP/HTTPS via the X-Forwarded-Proto header set by Apache +SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') + +CACHE_ENABLED = False + +# HIDE_GUARDED_DISTRIBUTIONS = False + +IMPORT_WORKERS_PERCENT = 42 +LOGGING = { + "dynaconf_merge": True, + "loggers": { + '': { + 'handlers': ['console'], + 'level': 'INFO', + }, + 'pulpcore.deprecation': { + 'handlers': ['console'], + 'level': 'ERROR', + 'propagate': False, + }, + 'django_guid': { + 'handlers': ['console'], + 'level': 'WARNING', + 'propagate': False, + }, + }, +}
end

describe command('PULP_SETTINGS=/etc/pulp/settings.py pulpcore-manager check') do
its(:exit_status) { is_expected.to eq 0 }
end
end
end
34 changes: 34 additions & 0 deletions spec/classes/pulpcore_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
is_expected.to contain_class('pulpcore::install')
is_expected.to contain_package('pulpcore')
is_expected.to contain_package('pulpcore-selinux')
is_expected.not_to contain_package('pulpcore-storage-s3')
is_expected.to contain_user('pulp').with_gid('pulp').with_home('/var/lib/pulp')
is_expected.to contain_group('pulp')
end
Expand Down Expand Up @@ -49,6 +50,7 @@
},
}
LOGGING
is_expected.not_to contain_concat__fragment('storage')
is_expected.to contain_file('/etc/pulp')
is_expected.to contain_file('/etc/pulp/certs/database_fields.symmetric.key')
is_expected.to contain_file('/var/lib/pulp')
Expand Down Expand Up @@ -469,6 +471,38 @@
end
end

context 'with S3-compatible storage' do
let :params do
{
storage_backend: 's3',
storage_options: {
'bucket_name' => 'pulp',
'endpoint_url' => 'https://object.example.test',
'addressing_style' => 'path',
},
}
end

it { is_expected.to compile.with_all_deps }

it 'installs the storage dependencies' do
is_expected.to contain_package('pulpcore-storage-s3')
end

it 'configures S3 without changing static file storage' do
is_expected.to contain_concat__fragment('base')
.without_content(%r{^MEDIA_ROOT =})
is_expected.to contain_concat__fragment('storage').with_content(<<~STORAGE)
STORAGES = {"default": {"BACKEND": "storages.backends.s3.S3Storage", "OPTIONS": {"bucket_name": "pulp", "endpoint_url": "https://object.example.test", "addressing_style": "path"}}, "staticfiles": {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"}}
STORAGE
end

it 'does not manage a local media directory' do
is_expected.not_to contain_file('/var/lib/pulp/media')
is_expected.to contain_file('/var/lib/pulp/tmp')
end
end

context 'can disable services' do
let :params do
{
Expand Down
2 changes: 2 additions & 0 deletions templates/settings.py.erb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ REDIS_URL = "<%= @redis_url %>"
WORKER_TTL = <%= scope['pulpcore::worker_ttl'] %>
<% end -%>

<% if scope['pulpcore::storage_backend'] == 'file' -%>
MEDIA_ROOT = "<%= scope['pulpcore::media_root'] %>"
<% end -%>
STATIC_ROOT = "<%= scope['pulpcore::static_root'] %>"
STATIC_URL = "<%= scope['pulpcore::static_url'] %>"
FILE_UPLOAD_TEMP_DIR = "<%= scope['pulpcore::cache_dir'] %>"
Expand Down
Loading