Open Response Assessment (ORA) Using MinIO as Storage in Open edX
Usually, someone use Amazon S3 as storage for Open edX course content and services (eg, storage for grades, video transcript, etc.). But this article just share how to set MinIO as storage for ORA instead use Amazon S3. Do the following steps.
-
Setup AWS auth (
/edx/app/edxapp/lms.auth.json
or/edx/etc/lms.yml
).Find the following snippet codes on the configuration file.
... AWS_ACCESS_KEY_ID: null AWS_S3_CUSTOM_DOMAIN: SET-ME-PLEASE (ex. bucket-name.s3.amazonaws.com) AWS_SECRET_ACCESS_KEY: null AWS_STORAGE_BUCKET_NAME: SET-ME-PLEASE (ex. bucket-name) FILE_UPLOAD_STORAGE_BUCKET_NAME: SET-ME-PLEASE (ex. bucket-name) ...
Change the value, set with your MinIO credentials. See sample conf on my env.
... AWS_ACCESS_KEY_ID: 'AKIATICAB5RS6HFGB7OR' AWS_S3_CUSTOM_DOMAIN: minio-dev.sibunglon.com:9090/devx AWS_SECRET_ACCESS_KEY: 'F2ZW5I+sGOZeBVFRMJQkNIPmovF97OfWmU6xj63x' AWS_STORAGE_BUCKET_NAME: devx FILE_UPLOAD_STORAGE_BUCKET_NAME: devx ...
-
Update backend of file upload ORA s3.
For ironwood version or older :
/edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/openassessment/fileupload/backends/s3.py
For juniper version or newer :
/edx/app/edxapp/venvs/edxapp/lib/python3.5/site-packages/openassessment/fileupload/backends/s3.py
Find the following snippet codes on the configuration file.
... return boto.connect_s3( aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key ) ...
Update it looks like the configuration below.
... return boto.connect_s3( aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key, host='minio-dev.sibunglon.com', port=9090, is_secure=False, # set to True if your run MinIO with SSL calling_format=boto.s3.connection.OrdinaryCallingFormat() ) ...
-
Restart LMS service and tried to upload file on ORA component.