-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
2,529 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# | ||
# The tutor16 reference. | ||
--- | ||
drydock: | ||
builder_class: drydock.manifest_builder.application.manifest_builder.ManifestBuilder | ||
config_class: drydock.manifest_builder.infrastructure.tutor_config.TutorExtendedConfig | ||
manifest_class: drydock.manifest_builder.infrastructure.flex_tutor_manifest.FlexibleTutorManifest | ||
manifest_options: | ||
output: "manifest-output" | ||
tutor_templates_version: "kustomized/tutor16" |
83 changes: 83 additions & 0 deletions
83
drydock/templates/kustomized/tutor16/base/apps/caddy/Caddyfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Global configuration | ||
{ | ||
|
||
{% if not ENABLE_WEB_PROXY %} | ||
# Enable proxying from all servers by default. Otherwise, X-Forwarded-* headers will | ||
# be overwritten. | ||
# https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#defaults | ||
servers { | ||
trusted_proxies static 0.0.0.0/0 ::/0 | ||
} | ||
{% endif %} | ||
{{ patch("caddyfile-global")|indent(4) }} | ||
} | ||
|
||
# proxy directive snippet (with logging) to be used as follows: | ||
# | ||
# import proxy "containername:port" | ||
(proxy) { | ||
log { | ||
output stdout | ||
format filter { | ||
wrap json | ||
fields { | ||
common_log delete | ||
request>headers delete | ||
resp_headers delete | ||
tls delete | ||
} | ||
} | ||
} | ||
|
||
# This will compress requests that matches the default criteria set by Caddy. | ||
# see https://caddyserver.com/docs/caddyfile/directives/encode | ||
# for information about the defaults; i.e. how/when this will be applied. | ||
encode gzip | ||
|
||
reverse_proxy {args.0} { | ||
header_up X-Forwarded-Port {{ 443 if ENABLE_HTTPS else 80 }} | ||
} | ||
} | ||
|
||
{{ LMS_HOST }}{$default_site_port}, {{ PREVIEW_LMS_HOST }}{$default_site_port} { | ||
@favicon_matcher { | ||
path_regexp ^/favicon.ico$ | ||
} | ||
rewrite @favicon_matcher /theming/asset/images/favicon.ico | ||
|
||
# Limit profile image upload size | ||
handle_path /api/profile_images/*/*/upload { | ||
request_body { | ||
max_size 1MB | ||
} | ||
} | ||
|
||
import proxy "lms:8000" | ||
|
||
{{ patch("caddyfile-lms")|indent(4) }} | ||
|
||
handle_path /* { | ||
request_body { | ||
max_size 4MB | ||
} | ||
} | ||
} | ||
|
||
{{ CMS_HOST }}{$default_site_port} { | ||
@favicon_matcher { | ||
path_regexp ^/favicon.ico$ | ||
} | ||
rewrite @favicon_matcher /theming/asset/images/favicon.ico | ||
|
||
import proxy "cms:8000" | ||
|
||
{{ patch("caddyfile-cms")|indent(4) }} | ||
|
||
handle_path /* { | ||
request_body { | ||
max_size 250MB | ||
} | ||
} | ||
} | ||
|
||
{{ patch("caddyfile") }} |
40 changes: 40 additions & 0 deletions
40
drydock/templates/kustomized/tutor16/base/apps/openedx/config/cms.env.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
SITE_NAME: "{{ CMS_HOST }}" | ||
BOOK_URL: "" | ||
LOG_DIR: "/openedx/data/logs" | ||
LOGGING_ENV: "sandbox" | ||
OAUTH_OIDC_ISSUER: "{{ JWT_COMMON_ISSUER }}" | ||
PLATFORM_NAME: "{{ PLATFORM_NAME }}" | ||
FEATURES: | ||
{{ patch("common-env-features")|indent(2) }} | ||
{{ patch("cms-env-features")|indent(2) }} | ||
CERTIFICATES_HTML_VIEW: true | ||
PREVIEW_LMS_BASE: "{{ PREVIEW_LMS_HOST }}" | ||
ENABLE_COURSEWARE_INDEX: true | ||
ENABLE_CSMH_EXTENDED: false | ||
ENABLE_LEARNER_RECORDS: false | ||
ENABLE_LIBRARY_INDEX: true | ||
MILESTONES_APP: true | ||
ENABLE_PREREQUISITE_COURSES: true | ||
LMS_ROOT_URL: "{{ "https" if ENABLE_HTTPS else "http" }}://{{ LMS_HOST }}" | ||
CMS_ROOT_URL: "{{ "https" if ENABLE_HTTPS else "http" }}://{{ CMS_HOST }}" | ||
CMS_BASE: "{{ CMS_HOST }}" | ||
LMS_BASE: "{{ LMS_HOST }}" | ||
CONTACT_EMAIL: "{{ CONTACT_EMAIL }}" | ||
CELERY_BROKER_TRANSPORT: "redis" | ||
CELERY_BROKER_HOSTNAME: "{{ REDIS_HOST }}:{{ REDIS_PORT }}" | ||
CELERY_BROKER_VHOST: "{{ OPENEDX_CELERY_REDIS_DB }}" | ||
CELERY_BROKER_USER: "{{ REDIS_USERNAME }}" | ||
CELERY_BROKER_PASSWORD: "{{ REDIS_PASSWORD }}" | ||
ALTERNATE_WORKER_QUEUES: "lms" | ||
ENABLE_COMPREHENSIVE_THEMING: true | ||
COMPREHENSIVE_THEME_DIRS: ["/openedx/themes"] | ||
STATIC_ROOT_BASE: "/openedx/staticfiles" | ||
EMAIL_BACKEND: "django.core.mail.backends.smtp.EmailBackend" | ||
EMAIL_HOST: "{{ SMTP_HOST }}" | ||
EMAIL_PORT: {{ SMTP_PORT }} | ||
EMAIL_USE_TLS: {{ "true" if SMTP_USE_TLS else "false" }} | ||
HTTPS: "{{ "on" if ENABLE_HTTPS else "off" }}" | ||
LANGUAGE_CODE: "{{ LANGUAGE_CODE }}" | ||
SESSION_COOKIE_DOMAIN: "{{ CMS_HOST }}" | ||
{{ patch("cms-env") }} | ||
{% include "apps/openedx/config/partials/auth.yml" %} |
47 changes: 47 additions & 0 deletions
47
drydock/templates/kustomized/tutor16/base/apps/openedx/config/lms.env.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
SITE_NAME: "{{ LMS_HOST }}" | ||
BOOK_URL: "" | ||
LOG_DIR: "/openedx/data/logs" | ||
LOGGING_ENV: "sandbox" | ||
OAUTH_OIDC_ISSUER: "{{ JWT_COMMON_ISSUER }}" | ||
PLATFORM_NAME: "{{ PLATFORM_NAME }}" | ||
FEATURES: | ||
{{ patch("common-env-features")|indent(2) }} | ||
{{ patch("lms-env-features")|indent(2) }} | ||
CERTIFICATES_HTML_VIEW: true | ||
PREVIEW_LMS_BASE: "{{ PREVIEW_LMS_HOST }}" | ||
ENABLE_COURSE_DISCOVERY: true | ||
ENABLE_COURSEWARE_SEARCH: true | ||
ENABLE_CSMH_EXTENDED: false | ||
ENABLE_DASHBOARD_SEARCH: true | ||
ENABLE_COMBINED_LOGIN_REGISTRATION: true | ||
ENABLE_GRADE_DOWNLOADS: true | ||
ENABLE_LEARNER_RECORDS: false | ||
ENABLE_MOBILE_REST_API: true | ||
ENABLE_OAUTH2_PROVIDER: true | ||
ENABLE_PREREQUISITE_COURSES: true | ||
ENABLE_THIRD_PARTY_AUTH: true | ||
MILESTONES_APP: true | ||
LMS_ROOT_URL: "{{ "https" if ENABLE_HTTPS else "http" }}://{{ LMS_HOST }}" | ||
CMS_ROOT_URL: "{{ "https" if ENABLE_HTTPS else "http" }}://{{ CMS_HOST }}" | ||
CMS_BASE: "{{ CMS_HOST }}" | ||
LMS_BASE: "{{ LMS_HOST }}" | ||
CONTACT_EMAIL: "{{ CONTACT_EMAIL }}" | ||
CELERY_BROKER_TRANSPORT: "redis" | ||
CELERY_BROKER_HOSTNAME: "{{ REDIS_HOST }}:{{ REDIS_PORT }}" | ||
CELERY_BROKER_VHOST: "{{ OPENEDX_CELERY_REDIS_DB }}" | ||
CELERY_BROKER_USER: "{{ REDIS_USERNAME }}" | ||
CELERY_BROKER_PASSWORD: "{{ REDIS_PASSWORD }}" | ||
ALTERNATE_WORKER_QUEUES: "cms" | ||
ENABLE_COMPREHENSIVE_THEMING: true | ||
COMPREHENSIVE_THEME_DIRS: ["/openedx/themes"] | ||
STATIC_ROOT_BASE: "/openedx/staticfiles" | ||
EMAIL_BACKEND: "django.core.mail.backends.smtp.EmailBackend" | ||
EMAIL_HOST: "{{ SMTP_HOST }}" | ||
EMAIL_PORT: {{ SMTP_PORT }} | ||
EMAIL_USE_TLS: {{ "true" if SMTP_USE_TLS else "false" }} | ||
ACE_ROUTING_KEY: "edx.lms.core.default" | ||
HTTPS: "{{ "on" if ENABLE_HTTPS else "off" }}" | ||
LANGUAGE_CODE: "{{ LANGUAGE_CODE }}" | ||
SESSION_COOKIE_DOMAIN: "{{ LMS_HOST }}" | ||
{{ patch("lms-env") }} | ||
{% include "apps/openedx/config/partials/auth.yml" %} |
21 changes: 21 additions & 0 deletions
21
drydock/templates/kustomized/tutor16/base/apps/openedx/config/partials/auth.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
SECRET_KEY: "{{ OPENEDX_SECRET_KEY }}" | ||
AWS_ACCESS_KEY_ID: "{{ OPENEDX_AWS_ACCESS_KEY }}" | ||
AWS_SECRET_ACCESS_KEY: "{{ OPENEDX_AWS_SECRET_ACCESS_KEY }}" | ||
DOC_STORE_CONFIG: null | ||
{{ patch("openedx-auth") }} | ||
XQUEUE_INTERFACE: | ||
django_auth: null | ||
url: null | ||
DATABASES: | ||
default: | ||
ENGINE: "django.db.backends.mysql" | ||
HOST: "{{ MYSQL_HOST }}" | ||
PORT: {{ MYSQL_PORT }} | ||
NAME: "{{ OPENEDX_MYSQL_DATABASE }}" | ||
USER: "{{ OPENEDX_MYSQL_USERNAME }}" | ||
PASSWORD: "{{ OPENEDX_MYSQL_PASSWORD }}" | ||
ATOMIC_REQUESTS: true | ||
OPTIONS: | ||
init_command: "SET sql_mode='STRICT_TRANS_TABLES'" | ||
EMAIL_HOST_USER: "{{ SMTP_USERNAME }}" | ||
EMAIL_HOST_PASSWORD: "{{ SMTP_PASSWORD }}" |
Empty file.
20 changes: 20 additions & 0 deletions
20
drydock/templates/kustomized/tutor16/base/apps/openedx/settings/cms/development.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
import os | ||
from cms.envs.devstack import * | ||
|
||
LMS_BASE = "{{ LMS_HOST }}:8000" | ||
LMS_ROOT_URL = "http://" + LMS_BASE | ||
|
||
# Authentication | ||
SOCIAL_AUTH_EDX_OAUTH2_KEY = "{{ CMS_OAUTH2_KEY_SSO_DEV }}" | ||
SOCIAL_AUTH_EDX_OAUTH2_PUBLIC_URL_ROOT = LMS_ROOT_URL | ||
|
||
FEATURES["PREVIEW_LMS_BASE"] = "{{ PREVIEW_LMS_HOST }}:8000" | ||
|
||
{% include "apps/openedx/settings/partials/common_cms.py" %} | ||
|
||
# Setup correct webpack configuration file for development | ||
WEBPACK_CONFIG_PATH = "webpack.dev.config.js" | ||
|
||
{{ patch("openedx-development-settings") }} | ||
{{ patch("openedx-cms-development-settings") }} |
17 changes: 17 additions & 0 deletions
17
drydock/templates/kustomized/tutor16/base/apps/openedx/settings/cms/production.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# -*- coding: utf-8 -*- | ||
import os | ||
from cms.envs.production import * | ||
|
||
{% include "apps/openedx/settings/partials/common_cms.py" %} | ||
|
||
ALLOWED_HOSTS = [ | ||
ENV_TOKENS.get("CMS_BASE"), | ||
"cms", | ||
] | ||
CORS_ORIGIN_WHITELIST.append("{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ CMS_HOST }}") | ||
|
||
# Authentication | ||
SOCIAL_AUTH_EDX_OAUTH2_KEY = "{{ CMS_OAUTH2_KEY_SSO }}" | ||
SOCIAL_AUTH_EDX_OAUTH2_PUBLIC_URL_ROOT = "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}" | ||
|
||
{{ patch("openedx-cms-production-settings") }} |
3 changes: 3 additions & 0 deletions
3
drydock/templates/kustomized/tutor16/base/apps/openedx/settings/cms/test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from cms.envs.test import * | ||
|
||
{% include "apps/openedx/settings/partials/common_test.py" %} |
Empty file.
39 changes: 39 additions & 0 deletions
39
drydock/templates/kustomized/tutor16/base/apps/openedx/settings/lms/development.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# -*- coding: utf-8 -*- | ||
import os | ||
from lms.envs.devstack import * | ||
|
||
{% include "apps/openedx/settings/partials/common_lms.py" %} | ||
|
||
# Setup correct webpack configuration file for development | ||
WEBPACK_CONFIG_PATH = "webpack.dev.config.js" | ||
|
||
LMS_BASE = "{{ LMS_HOST}}:8000" | ||
LMS_ROOT_URL = "http://{}".format(LMS_BASE) | ||
LMS_INTERNAL_ROOT_URL = LMS_ROOT_URL | ||
SITE_NAME = LMS_BASE | ||
CMS_BASE = "{{ CMS_HOST}}:8001" | ||
CMS_ROOT_URL = "http://{}".format(CMS_BASE) | ||
LOGIN_REDIRECT_WHITELIST.append(CMS_BASE) | ||
|
||
# Session cookie | ||
SESSION_COOKIE_DOMAIN = "{{ LMS_HOST }}" | ||
SESSION_COOKIE_SECURE = False | ||
CSRF_COOKIE_SECURE = False | ||
SESSION_COOKIE_SAMESITE = "Lax" | ||
|
||
# CMS authentication | ||
IDA_LOGOUT_URI_LIST.append("http://{{ CMS_HOST }}:8001/logout/") | ||
|
||
FEATURES["ENABLE_COURSEWARE_MICROFRONTEND"] = False | ||
|
||
# Disable enterprise integration | ||
FEATURES["ENABLE_ENTERPRISE_INTEGRATION"] = False | ||
SYSTEM_WIDE_ROLE_CLASSES.remove("enterprise.SystemWideEnterpriseUserRoleAssignment") | ||
|
||
LOGGING["loggers"]["oauth2_provider"] = { | ||
"handlers": ["console"], | ||
"level": "DEBUG" | ||
} | ||
|
||
{{ patch("openedx-development-settings") }} | ||
{{ patch("openedx-lms-development-settings") }} |
33 changes: 33 additions & 0 deletions
33
drydock/templates/kustomized/tutor16/base/apps/openedx/settings/lms/production.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# -*- coding: utf-8 -*- | ||
import os | ||
from lms.envs.production import * | ||
|
||
{% include "apps/openedx/settings/partials/common_lms.py" %} | ||
|
||
ALLOWED_HOSTS = [ | ||
ENV_TOKENS.get("LMS_BASE"), | ||
FEATURES["PREVIEW_LMS_BASE"], | ||
"lms", | ||
] | ||
CORS_ORIGIN_WHITELIST.append("{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}") | ||
|
||
{% if ENABLE_HTTPS %} | ||
# Properly set the "secure" attribute on session/csrf cookies. This is required in | ||
# Chrome to support samesite=none cookies. | ||
SESSION_COOKIE_SECURE = True | ||
CSRF_COOKIE_SECURE = True | ||
SESSION_COOKIE_SAMESITE = "None" | ||
{% else %} | ||
# When we cannot provide secure session/csrf cookies, we must disable samesite=none | ||
SESSION_COOKIE_SECURE = False | ||
CSRF_COOKIE_SECURE = False | ||
SESSION_COOKIE_SAMESITE = "Lax" | ||
{% endif %} | ||
|
||
# CMS authentication | ||
IDA_LOGOUT_URI_LIST.append("{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ CMS_HOST }}/logout/") | ||
|
||
# Required to display all courses on start page | ||
SEARCH_SKIP_ENROLLMENT_START_DATE_FILTERING = True | ||
|
||
{{ patch("openedx-lms-production-settings") }} |
3 changes: 3 additions & 0 deletions
3
drydock/templates/kustomized/tutor16/base/apps/openedx/settings/lms/test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from lms.envs.test import * | ||
|
||
{% include "apps/openedx/settings/partials/common_test.py" %} |
Oops, something went wrong.