-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Use S3 (MinIO emulator) as storage backend #7812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
656fceb
to
dba9483
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to look good to me!
SLUMBER_USERNAME = 'admin' | ||
SLUMBER_PASSWORD = 'admin' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These look to be new, are these settings intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are required for builds to hit the API. Otherwise, we get 403 and builds don't work.
This problem is not new, but I suppose that you may have these settings overwritten in a local_settings.py
file?
They are required in docker environment to be able to build docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove them from this PR and figure it out in another one, tho.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, seems odd this would be related to this PR. It must have been working before somehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's completely unrelated to this PR, yes. I will remove it from it and add it to another one so we can discuss it there. We will see if it fails for you as well when building.
# in our Docker setup. We can upgrade it but we need to add a | ||
# `create_buckets.sh` to be called on `--init` as we used to do for Azurite | ||
# https://github.com/jschneier/django-storages/pull/636 | ||
git+https://github.com/jschneier/django-storages@d0f027c98a877f75615cfc42b4d51c038fa41bf6#egg=django-storages[boto3]==1.9.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can track this with a separate issue perhaps, we probably don't want to get too far behind on django-storages releases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure to follow you here.
We are not changing the version in this PR. I just changed azure
by boto3
+ add a comment explaining why we can't upgrade.
raise ImproperlyConfigured( | ||
'AWS S3 not configured correctly. ' | ||
'Ensure S3_BUILD_ENVIRONMENT_STORAGE_BUCKET is defined.', | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: we'll want a PR on commercial/ops/etc in the near future to make sure we're using this class instead of the ext class
Also, I assumed this file is just forked and didn't spend much time at all on review here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Will be good to get it testing locally 👍
SLUMBER_USERNAME = 'admin' | ||
SLUMBER_PASSWORD = 'admin' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, seems odd this would be related to this PR. It must have been working before somehow?
- remove Azurite storage backend - update all settings to use S3 - update docs to mention set "Read Only" on buckets - disable S3 console logs - bring `s3_storage.py` from -ext - delete `azure_storage.py` from .org - update django-storages to install boto3 dependencies
dba9483
to
39af6e8
Compare
s3_storage.py
from -extazure_storage.py
from .org