2019-05-29 09:14:06 +00:00
|
|
|
import os
|
|
|
|
from glob import glob
|
|
|
|
|
|
|
|
HERE = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
|
|
|
|
config = {
|
|
|
|
"set": {
|
|
|
|
"OPENEDX_AWS_ACCESS_KEY": "openedx",
|
|
|
|
"OPENEDX_AWS_SECRET_ACCESS_KEY": "{{ 24|random_string }}",
|
|
|
|
},
|
|
|
|
"defaults": {
|
|
|
|
"BUCKET_NAME": "openedx",
|
|
|
|
"FILE_UPLOAD_BUCKET_NAME": "openedxuploads",
|
|
|
|
"COURSE_IMPORT_EXPORT_BUCKET": "openedxcourseimportexport",
|
|
|
|
"HOST": "minio.{{ LMS_HOST }}",
|
|
|
|
"DOCKER_REGISTRY": "{{ DOCKER_REGISTRY }}",
|
|
|
|
"DOCKER_IMAGE_CLIENT": "minio/mc:RELEASE.2019-05-23T01-33-27Z",
|
|
|
|
"DOCKER_IMAGE_SERVER": "minio/minio:RELEASE.2019-05-23T00-29-34Z",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2019-06-05 13:43:51 +00:00
|
|
|
templates = os.path.join(HERE, "templates")
|
|
|
|
|
2019-07-04 00:25:10 +00:00
|
|
|
hooks = {
|
2019-07-05 06:19:23 +00:00
|
|
|
"pre-init": ["minio-client"],
|
2019-07-04 00:25:10 +00:00
|
|
|
"remote-image": {
|
|
|
|
"minio-server": "{{ MINIO_DOCKER_IMAGE_SERVER }}",
|
|
|
|
"minio-client": "{{ MINIO_DOCKER_IMAGE_CLIENT }}",
|
|
|
|
},
|
|
|
|
}
|
2019-06-05 17:57:30 +00:00
|
|
|
|
2019-05-29 09:14:06 +00:00
|
|
|
|
2019-06-05 13:43:51 +00:00
|
|
|
def patches():
|
2019-05-29 09:14:06 +00:00
|
|
|
all_patches = {}
|
2019-06-05 13:43:51 +00:00
|
|
|
for path in glob(os.path.join(HERE, "patches", "*")):
|
2019-05-29 09:14:06 +00:00
|
|
|
with open(path) as patch_file:
|
2019-06-05 13:43:51 +00:00
|
|
|
name = os.path.basename(path)
|
2019-05-29 09:14:06 +00:00
|
|
|
content = patch_file.read()
|
|
|
|
all_patches[name] = content
|
|
|
|
return all_patches
|