Configure PROFILE_IMAGE_BACKEND when using AWS s3
See SE-559
Turns out that to upload profile images to aws, the profile images backend has to be configured similar to the default file storage. This PR adds the ansible variable to the configuration_storage_settings
entry in OCIM.
Ref: https://github.com/edx/configuration/blob/master/playbooks/roles/edxapp/defaults/main.yml#L688
Sandbox URL: Sandbox with the current change in the extra settings: https://gustavo-profile-image-test.stage.opencraft.hosting/
Testing instructions:
- Set up the Ocim devstack with this branch.
- Deploy an instance with default configurations and using s3.
- Create a new AppServer and check on its configurations if
EDXAPP_PROFILE_IMAGE_BACKEND
is set and matches:
EDXAPP_PROFILE_IMAGE_BACKEND:
class: storages.backends.s3boto.S3BotoStorage
options:
headers:
Cache-Control: max-age-"{{ EDXAPP_PROFILE_IMAGE_MAX_AGE }}"
location: '{{ EDXAPP_AWS_LOCATION }}/profile-images'
- After the provision, set a profile picture for one of its user and check if the url points to aws s3.
Reviewers