From 95ef30f7ddc16d29dbce23efcd98b4da1eebfb3f Mon Sep 17 00:00:00 2001 From: Henrry Pulgarin <39854568+Henrrypg@users.noreply.github.com> Date: Wed, 18 Dec 2024 14:55:39 -0500 Subject: [PATCH] feat: sumac release (#146) --- .github/environments/minio_enabled/config.yml | 1 + .github/requirements.txt | 6 ++++-- README.md | 7 ++++--- drydock/plugin.py | 2 +- drydock/templates/drydock/k8s/ingress/cms.yml | 18 ++++++++++++++++++ drydock/templates/drydock/k8s/ingress/lms.yml | 2 ++ pyproject.toml | 6 +++--- 7 files changed, 33 insertions(+), 9 deletions(-) diff --git a/.github/environments/minio_enabled/config.yml b/.github/environments/minio_enabled/config.yml index cc5a5a88..71dd2494 100644 --- a/.github/environments/minio_enabled/config.yml +++ b/.github/environments/minio_enabled/config.yml @@ -1,6 +1,7 @@ DRYDOCK_INIT_JOBS: true K8S_NAMESPACE: testing-openedx PLUGINS: +- forum - mfe - drydock - minio diff --git a/.github/requirements.txt b/.github/requirements.txt index 63474c0a..f8d88bcc 100644 --- a/.github/requirements.txt +++ b/.github/requirements.txt @@ -1,3 +1,5 @@ -tutor[full]<18 +tutor~=19.0 +tutor-mfe~=19.0 +tutor-minio~=19.0 setuptools -git+https://github.com/hastexo/tutor-contrib-s3@v1.4.0 +git+https://github.com/edunext/tutor-contrib-s3@sumac diff --git a/README.md b/README.md index be409f1f..ade02f04 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,10 @@ appropriate one: | Maple | `>=13.2, <14` | Not supported | 0.7.x | | Nutmeg | `>=14.0, <15` | Not supported | 0.7.x | | Olive | `>=15.0, <16` | Not supported | 15.x.x | -| Palm | `>=16.0, <17` | `palm` | 16.x.x | +| Palm | `>=16.0, <17` | Not supported | 16.x.x | | Quince | `>=17.0, <18` | `quince` | 17.x.x | -| Redwood | `>=18.0, <19` | `main` | >=18.0.0 | +| Redwood | `>=18.0, <19` | `redwood` | 18.x.x | +| Sumac | `>=19.0, <20` | `main` | >=19.0.0 | Installation ------------ @@ -57,7 +58,7 @@ The following configuration options are available: - `DRYDOCK_INIT_JOBS`: Whether run the initialization jobs or not. Defaults to `false`. - `DRYDOCK_CMS_SSO_USER`: The username of the CMS SSO user. Defaults to `cms`. - `DRYDOCK_AUTO_TLS`: Whether to use cert-manager to automatically generate TLS certificates. Defaults to `true`. -- `DRYDOCK_INGRESS`: Whether to deploy an ingress for the LMS and CMS. Defaults to `false`. +- `DRYDOCK_INGRESS`: Whether to deploy an ingress for the LMS and CMS. Defaults to `true`. - `DRYDOCK_INGRESS_EXTRA_HOSTS`: A list of extra hosts to add to the ingress. Defaults to `[]`. - `DRYDOCK_INGRESS_LMS_EXTRA_HOSTS`: A list of extra hosts to add to the LMS ingress. Defaults to `[]`. - `DRYDOCK_CUSTOM_CERTS`: A dictionary of custom certificates to use with cert-manager. Defaults to `{}`. diff --git a/drydock/plugin.py b/drydock/plugin.py index 55e219cd..025efa9e 100644 --- a/drydock/plugin.py +++ b/drydock/plugin.py @@ -132,7 +132,7 @@ def get_sync_waves_for_resource(resource_name: str) -> SYNC_WAVES_ORDER_ATTRS_TY "CMS_SSO_USER": "cms", "AUTO_TLS": True, "MIGRATE_FROM": 0, - "INGRESS": False, + "INGRESS": True, "INGRESS_EXTRA_HOSTS": [], "INGRESS_LMS_EXTRA_HOSTS": [], "NEWRELIC_LICENSE_KEY": "", diff --git a/drydock/templates/drydock/k8s/ingress/cms.yml b/drydock/templates/drydock/k8s/ingress/cms.yml index 4bd64afa..1748c971 100644 --- a/drydock/templates/drydock/k8s/ingress/cms.yml +++ b/drydock/templates/drydock/k8s/ingress/cms.yml @@ -33,6 +33,24 @@ spec: - host: {{ CMS_HOST }} http: paths: +{%- for app_name, app in iter_mfes() %} +{%- if app_name == "authoring" %} + - pathType: Prefix + path: "/course-authoring" + backend: + service: + name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %} + port: + number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %} + - pathType: Prefix + path: "/{{app_name}}" + backend: + service: + name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %} + port: + number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %} +{%- endif %} +{%- endfor %} - pathType: Prefix path: "/" backend: diff --git a/drydock/templates/drydock/k8s/ingress/lms.yml b/drydock/templates/drydock/k8s/ingress/lms.yml index 75a78b2f..b7126f45 100644 --- a/drydock/templates/drydock/k8s/ingress/lms.yml +++ b/drydock/templates/drydock/k8s/ingress/lms.yml @@ -41,6 +41,7 @@ spec: port: number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %} {% for app_name, app in iter_mfes() %} +{%- if app_name != "authoring" %} - pathType: Prefix path: "/{{app_name}}" backend: @@ -48,6 +49,7 @@ spec: name: {% if DRYDOCK_BYPASS_CADDY -%}mfe{% else -%}caddy{% endif %} port: number: {% if DRYDOCK_BYPASS_CADDY -%}8002{% else -%}80{% endif %} +{%- endif %} {%- endfor %} - pathType: Prefix path: "/" diff --git a/pyproject.toml b/pyproject.toml index c474f97b..c4a4f59d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "tutor-contrib-drydock" dynamic = ["version"] description = "A Tutor plugin to manage our opinionated Open edX operations" readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" license = { text = "AGPLv3" } authors = [ { name = "eduNEXT" } @@ -18,18 +18,18 @@ classifiers = [ "License :: OSI Approved :: GNU Affero General Public License v3", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", ] dependencies = [ - "tutor>=18.1.3,<19.0.0" + "tutor>=19.0.0,<20.0.0" ] [project.optional-dependencies] dev = [ + "build", "python-semantic-release", ]