Skip to content

Commit

Permalink
chore: release based on tutor 16.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
moonesque committed Jan 3, 2024
2 parents ada5b36 + 1f814f8 commit f86bb24
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ This configuration parameter defines the name of the Docker image to run the dev

.. https://hub.docker.com/r/devture/exim-relay/tags
.. https://hub.docker.com/r/devture/exim-relay/tags
- ``DOCKER_IMAGE_CADDY`` (default: ``"docker.io/caddy:2.6.2"``)

This configuration parameter defines which Caddy Docker image to use.
Expand Down
14 changes: 14 additions & 0 deletions tutor/commands/compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,20 @@ def dc_command(
hooks.Filters.ENV_TEMPLATE_VARIABLES.add_item(("iter_mounts", bindmount.iter_mounts))


@hooks.Filters.APP_PUBLIC_HOSTS.add()
def _edx_platform_public_hosts(
hosts: list[str], context_name: t.Literal["local", "dev"]
) -> list[str]:
if context_name == "dev":
hosts += ["{{ LMS_HOST }}:8000", "{{ CMS_HOST }}:8001"]
else:
hosts += ["{{ LMS_HOST }}", "{{ CMS_HOST }}"]
return hosts


hooks.Filters.ENV_TEMPLATE_VARIABLES.add_item(("iter_mounts", bindmount.iter_mounts))


def add_commands(command_group: click.Group) -> None:
command_group.add_command(launch)
command_group.add_command(upgrade)
Expand Down
4 changes: 2 additions & 2 deletions tutor/commands/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ def run_task(self, service: str, command: str) -> int:
else:
container_args = shell_command + [command]
job["spec"]["template"]["spec"]["containers"][0]["args"] = container_args
job["spec"]["backoffLimit"] = 1
job["spec"]["ttlSecondsAfterFinished"] = 3600
job["spec"]["backoffLimit"] = 5
job["spec"]["ttlSecondsAfterFinished"] = 72000 # 24 hours

with open(
tutor_env.pathjoin(self.root, "k8s", "jobs.yml"), "w", encoding="utf-8"
Expand Down
3 changes: 3 additions & 0 deletions tutor/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
# Cache of plugin patches, for efficiency
ENV_PATCHES_DICT: dict[str, list[str]] = {}

# Cache of plugin patches, for efficiency
ENV_PATCHES_DICT: dict[str, list[str]] = {}


@hooks.Actions.PLUGINS_LOADED.add()
def _convert_plugin_patches() -> None:
Expand Down
6 changes: 6 additions & 0 deletions tutor/templates/kustomization.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,36 +33,42 @@ configMapGenerator:
options:
labels:
app.kubernetes.io/name: caddy
app.kubernetes.io/kind: ConfigMap
- name: openedx-settings-lms
files:{% for file in "apps/openedx/settings/lms"|walk_templates %}
- {{ file }}{% endfor %}
options:
labels:
app.kubernetes.io/name: openedx
app.kubernetes.io/kind: ConfigMap
- name: openedx-settings-cms
files:{% for file in "apps/openedx/settings/cms"|walk_templates %}
- {{ file }}{% endfor %}
options:
labels:
app.kubernetes.io/name: openedx
app.kubernetes.io/kind: ConfigMap
- name: openedx-config
files:{% for file in "apps/openedx/config"|walk_templates %}
- {{ file }}{% endfor %}
options:
labels:
app.kubernetes.io/name: openedx
app.kubernetes.io/kind: ConfigMap
- name: openedx-uwsgi-config
files:
- apps/openedx/uwsgi.ini
options:
labels:
app.kubernetes.io/name: openedx
app.kubernetes.io/kind: ConfigMap
- name: redis-config
files:
- apps/redis/redis.conf
options:
labels:
app.kubernetes.io/name: redis
app.kubernetes.io/kind: ConfigMap
{{ patch("kustomization-configmapgenerator") }}

{%- if patch("k8s-override") or patch("kustomization-patches-strategic-merge") %}
Expand Down
16 changes: 16 additions & 0 deletions tutor/templates/local/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ services:
- ../apps/openedx/uwsgi.ini:/openedx/edx-platform/uwsgi.ini:ro
- ../../data/lms:/openedx/data
- ../../data/openedx-media:/openedx/media
<<<<<<< HEAD
{%- for mount in iter_mounts(MOUNTS, "openedx", "lms") %}
=======
{%- for mount in iter_mounts(MOUNTS, "lms") %}
>>>>>>> edspirit/16.1.9
- {{ mount }}
{%- endfor %}
depends_on:
Expand All @@ -138,7 +142,11 @@ services:
- ../apps/openedx/uwsgi.ini:/openedx/edx-platform/uwsgi.ini:ro
- ../../data/cms:/openedx/data
- ../../data/openedx-media:/openedx/media
<<<<<<< HEAD
{%- for mount in iter_mounts(MOUNTS, "openedx", "cms") %}
=======
{%- for mount in iter_mounts(MOUNTS, "cms") %}
>>>>>>> edspirit/16.1.9
- {{ mount }}
{%- endfor %}
depends_on:
Expand Down Expand Up @@ -166,7 +174,11 @@ services:
- ../apps/openedx/config:/openedx/config:ro
- ../../data/lms:/openedx/data
- ../../data/openedx-media:/openedx/media
<<<<<<< HEAD
{%- for mount in iter_mounts(MOUNTS, "openedx", "lms-worker") %}
=======
{%- for mount in iter_mounts(MOUNTS, "lms-worker") %}
>>>>>>> edspirit/16.1.9
- {{ mount }}
{%- endfor %}
depends_on:
Expand All @@ -185,7 +197,11 @@ services:
- ../apps/openedx/config:/openedx/config:ro
- ../../data/cms:/openedx/data
- ../../data/openedx-media:/openedx/media
<<<<<<< HEAD
{%- for mount in iter_mounts(MOUNTS, "openedx", "cms-worker") %}
=======
{%- for mount in iter_mounts(MOUNTS, "cms-worker") %}
>>>>>>> edspirit/16.1.9
- {{ mount }}
{%- endfor %}
depends_on:
Expand Down

0 comments on commit f86bb24

Please sign in to comment.