Skip to content

Commit bbd169d

Browse files
authored
Merge pull request #944 from gerrod3/update-storage-settings-3.11
Update Azure and S3 storage settings for 3.11
2 parents 22edd63 + 0b02e4a commit bbd169d

File tree

3 files changed

+23
-59
lines changed

3 files changed

+23
-59
lines changed

.ci/ansible/settings.py.j2

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -26,56 +26,3 @@ API_ROOT = {{ api_root | repr }}
2626
{% endfor %}
2727
{% endif %}
2828

29-
{% if s3_test | default(false) %}
30-
MEDIA_ROOT: ""
31-
S3_USE_SIGV4 = True
32-
{% if test_storages_compat_layer is defined and test_storages_compat_layer %}
33-
STORAGES = {
34-
"default": {
35-
"BACKEND": "storages.backends.s3boto3.S3Boto3Storage",
36-
"OPTIONS": {
37-
"access_key": "{{ minio_access_key }}",
38-
"secret_key": "{{ minio_secret_key }}",
39-
"region_name": "eu-central-1",
40-
"addressing_style": "path",
41-
"signature_version": "s3v4",
42-
"bucket_name": "pulp3",
43-
"endpoint_url": "http://minio:9000",
44-
"default_acl": "@none None",
45-
},
46-
},
47-
"staticfiles": {
48-
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
49-
},
50-
}
51-
{% else %}
52-
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
53-
AWS_ACCESS_KEY_ID = "{{ minio_access_key }}"
54-
AWS_SECRET_ACCESS_KEY = "{{ minio_secret_key }}"
55-
AWS_S3_REGION_NAME = "eu-central-1"
56-
AWS_S3_ADDRESSING_STYLE = "path"
57-
AWS_S3_SIGNATURE_VERSION = "s3v4"
58-
AWS_STORAGE_BUCKET_NAME = "pulp3"
59-
AWS_S3_ENDPOINT_URL = "http://minio:9000"
60-
AWS_DEFAULT_ACL = "@none None"
61-
{% endif %}
62-
{% endif %}
63-
64-
{% if azure_test | default(false) %}
65-
DEFAULT_FILE_STORAGE = "storages.backends.azure_storage.AzureStorage"
66-
MEDIA_ROOT = ""
67-
AZURE_ACCOUNT_KEY = "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw=="
68-
AZURE_ACCOUNT_NAME = "devstoreaccount1"
69-
AZURE_CONTAINER = "pulp-test"
70-
AZURE_LOCATION = "pulp3"
71-
AZURE_OVERWRITE_FILES = True
72-
AZURE_URL_EXPIRATION_SECS = 120
73-
AZURE_CONNECTION_STRING = 'DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://ci-azurite:10000/devstoreaccount1;'
74-
{% endif %}
75-
76-
{% if gcp_test | default(false) %}
77-
DEFAULT_FILE_STORAGE = "storages.backends.gcloud.GoogleCloudStorage"
78-
MEDIA_ROOT = ""
79-
GS_BUCKET_NAME = "gcppulp"
80-
GS_CUSTOM_ENDPOINT = "http://ci-gcp:4443"
81-
{% endif %}

.github/workflows/scripts/install.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,8 @@ if [ "$TEST" = "s3" ]; then
9595
sed -i -e '$a s3_test: true\
9696
minio_access_key: "'$MINIO_ACCESS_KEY'"\
9797
minio_secret_key: "'$MINIO_SECRET_KEY'"\
98-
pulp_scenario_settings: null\
98+
pulp_scenario_settings: {"AWS_ACCESS_KEY_ID": "AKIAIT2Z5TDYPX3ARJBA", "AWS_DEFAULT_ACL": "@none None", "AWS_S3_ADDRESSING_STYLE": "path", "AWS_S3_ENDPOINT_URL": "http://minio:9000", "AWS_S3_REGION_NAME": "eu-central-1", "AWS_S3_SIGNATURE_VERSION": "s3v4", "AWS_SECRET_ACCESS_KEY": "fqRvjWaPU5o0fCqQuUWbj9Fainj2pVZtBCiDiieS", "AWS_STORAGE_BUCKET_NAME": "pulp3", "DEFAULT_FILE_STORAGE": "storages.backends.s3boto3.S3Boto3Storage", "MEDIA_ROOT": ""}\
9999
pulp_scenario_env: {}\
100-
test_storages_compat_layer: false\
101100
' vars/main.yaml
102101
export PULP_API_ROOT="/rerouted/djnd/"
103102
fi
@@ -110,7 +109,7 @@ if [ "$TEST" = "azure" ]; then
110109
- ./azurite:/etc/pulp\
111110
command: "azurite-blob --blobHost 0.0.0.0"' vars/main.yaml
112111
sed -i -e '$a azure_test: true\
113-
pulp_scenario_settings: null\
112+
pulp_scenario_settings: {"AZURE_ACCOUNT_KEY": "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==", "AZURE_ACCOUNT_NAME": "devstoreaccount1", "AZURE_CONNECTION_STRING": "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://ci-azurite:10000/devstoreaccount1;", "AZURE_CONTAINER": "pulp-test", "AZURE_LOCATION": "pulp3", "AZURE_OVERWRITE_FILES": true, "AZURE_URL_EXPIRATION_SECS": 120, "DEFAULT_FILE_STORAGE": "storages.backends.azure_storage.AzureStorage", "MEDIA_ROOT": ""}\
114113
pulp_scenario_env: {}\
115114
' vars/main.yaml
116115
fi

template_config.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,28 @@ pulp_settings:
4646
allowed_import_paths: /tmp
4747
orphan_protection_time: 0
4848
pypi_api_hostname: https://pulp:443
49-
pulp_settings_azure: null
49+
pulp_settings_azure:
50+
AZURE_ACCOUNT_KEY: Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
51+
AZURE_ACCOUNT_NAME: devstoreaccount1
52+
AZURE_CONNECTION_STRING: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://ci-azurite:10000/devstoreaccount1;
53+
AZURE_CONTAINER: pulp-test
54+
AZURE_LOCATION: pulp3
55+
AZURE_OVERWRITE_FILES: true
56+
AZURE_URL_EXPIRATION_SECS: 120
57+
DEFAULT_FILE_STORAGE: storages.backends.azure_storage.AzureStorage
58+
MEDIA_ROOT: ''
5059
pulp_settings_gcp: null
51-
pulp_settings_s3: null
60+
pulp_settings_s3:
61+
AWS_ACCESS_KEY_ID: AKIAIT2Z5TDYPX3ARJBA
62+
AWS_DEFAULT_ACL: '@none None'
63+
AWS_S3_ADDRESSING_STYLE: path
64+
AWS_S3_ENDPOINT_URL: http://minio:9000
65+
AWS_S3_REGION_NAME: eu-central-1
66+
AWS_S3_SIGNATURE_VERSION: s3v4
67+
AWS_SECRET_ACCESS_KEY: fqRvjWaPU5o0fCqQuUWbj9Fainj2pVZtBCiDiieS
68+
AWS_STORAGE_BUCKET_NAME: pulp3
69+
DEFAULT_FILE_STORAGE: storages.backends.s3boto3.S3Boto3Storage
70+
MEDIA_ROOT: ''
5271
pydocstyle: true
5372
release_email: pulp-infra@redhat.com
5473
release_user: pulpbot
@@ -66,6 +85,5 @@ test_lowerbounds: true
6685
test_performance: false
6786
test_reroute: true
6887
test_s3: true
69-
test_storages_compat_layer: false
7088
use_issue_template: true
7189

0 commit comments

Comments
 (0)