diff --git a/.github/environments/disabled/config.yml b/.github/environments/disabled/config.yml index e49f2237..7c27d01a 100644 --- a/.github/environments/disabled/config.yml +++ b/.github/environments/disabled/config.yml @@ -5,10 +5,8 @@ PLUGINS: - mfe - drydock DRYDOCK_BYPASS_CADDY: false -DRYDOCK_FLOWER: false DRYDOCK_INGRESS: false DRYDOCK_DEBUG: false -DRYDOCK_ENABLE_CELERY_TUNING: false DRYDOCK_ENABLE_MULTITENANCY: false DRYDOCK_ENABLE_SCORM: false DRYDOCK_POD_LIFECYCLE: false diff --git a/.github/environments/enabled/config.yml b/.github/environments/enabled/config.yml index 9f8fe610..9a9c2632 100644 --- a/.github/environments/enabled/config.yml +++ b/.github/environments/enabled/config.yml @@ -6,10 +6,8 @@ PLUGINS: - drydock - s3 DRYDOCK_BYPASS_CADDY: true -DRYDOCK_FLOWER: true DRYDOCK_INGRESS: true DRYDOCK_DEBUG: true -DRYDOCK_ENABLE_CELERY_TUNING: true DRYDOCK_ENABLE_MULTITENANCY: true DRYDOCK_ENABLE_SCORM: true DRYDOCK_POD_LIFECYCLE: true diff --git a/README.md b/README.md index 2c3e152a..d766e5d6 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,11 @@ Drydock is an opinionated tool offering a set of Tutor plugins aiming to provide - A set of Kustomization overrides adding [ArgoCD Sync Waves](https://argo-cd.readthedocs.io/en/stable/user-guide/sync-waves/) annotations to needed additional resources such as debug, workers or hpa. - Backup cronjobs that allow backup of the MySQL and MongoDB databases. - Integration of New Relic monitoring -- Add flower deployment for Celery - Add a custom nginx and cert-manager configuration - Add a set of debug resources to help diagnose issues Extra plugins added: -- A patch that allows for the tuning of celery workers via `DRYDOCK_ENABLE_CELERY_TUNING` - Allows caddy to catch requests for multiple domains through `DRYDOCK_ENABLE_MULTITENANCY` - Add scorm matcher to caddy through `DRYDOCK_ENABLE_SCORM` - Patch for cms and lms worker pods to allow pod probes and lifecycle to work properly. Enabled via `DRYDOCK_POD_LIFECYCLE` @@ -59,14 +57,12 @@ 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 `false`. -- `DRYDOCK_FLOWER`: Whether to deploy a flower deployment for celery. Defaults to `false`. - `DRYDOCK_INGRESS`: Whether to deploy an ingress for the LMS and CMS. Defaults to `false`. - `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 `{}`. - `DRYDOCK_NEWRELIC_LICENSE_KEY`: The New Relic license key. Defaults to `""`. - `DRYDOCK_DEBUG`: Whether to deploy debug resources. Defaults to `false`. -- `DRYDOCK_ENABLE_CELERY_TUNING`: Whether to enable celery tuning. Defaults to `true`. - `DRYDOCK_ENABLE_MULTITENANCY`: Whether to enable multitennacy. Defaults to `true`. - `DRYDOCK_ENABLE_SCORM`: Whether to enable scorm. Defaults to `true`. - `DRYDOCK_POD_LIFECYCLE`: Whether to enable pod lifecycle. Defaults to `true`. diff --git a/drydock/patches/cms-env b/drydock/patches/cms-env index f0475835..e69de29b 100644 --- a/drydock/patches/cms-env +++ b/drydock/patches/cms-env @@ -1,3 +0,0 @@ -{% if DRYDOCK_ENABLE_CELERY_TUNING -%} -CELERY_ACKS_LATE: true -{% endif %} diff --git a/drydock/patches/kustomization b/drydock/patches/kustomization index 3d9558fc..97d5f2bd 100644 --- a/drydock/patches/kustomization +++ b/drydock/patches/kustomization @@ -13,10 +13,6 @@ patches: kind: Job labelSelector: app.kubernetes.io/component=job path: plugins/drydock/k8s/patches/tutor-jobs.yml -{% if DRYDOCK_ENABLE_CELERY_TUNING %} -- path: plugins/drydock/k8s/celery/cms-worker.yml -- path: plugins/drydock/k8s/celery/lms-worker.yml -{% endif -%} - target: kind: HorizontalPodAutoscaler path: plugins/drydock/k8s/patches/hpa-sync-wave.yml diff --git a/drydock/patches/kustomization-resources b/drydock/patches/kustomization-resources index 291028b8..cb5a0170 100644 --- a/drydock/patches/kustomization-resources +++ b/drydock/patches/kustomization-resources @@ -3,9 +3,6 @@ {%- if DRYDOCK_INIT_JOBS %} - plugins/drydock/k8s/jobs.yml {%- endif %} -{% if DRYDOCK_FLOWER -%} -- plugins/drydock/k8s/flower.yml -{%- endif %} {% if DRYDOCK_INGRESS -%} - plugins/drydock/k8s/ingress/issuer.yml - plugins/drydock/k8s/ingress/lms.yml diff --git a/drydock/patches/lms-env b/drydock/patches/lms-env index f0475835..e69de29b 100644 --- a/drydock/patches/lms-env +++ b/drydock/patches/lms-env @@ -1,3 +0,0 @@ -{% if DRYDOCK_ENABLE_CELERY_TUNING -%} -CELERY_ACKS_LATE: true -{% endif %} diff --git a/drydock/plugin.py b/drydock/plugin.py index f9b6a031..e8ffe1f7 100644 --- a/drydock/plugin.py +++ b/drydock/plugin.py @@ -132,7 +132,6 @@ def get_sync_waves_for_resource(resource_name: str) -> SYNC_WAVES_ORDER_ATTRS_TY "CMS_SSO_USER": "cms", "AUTO_TLS": True, "MIGRATE_FROM": 0, - "FLOWER": False, "INGRESS": False, "INGRESS_EXTRA_HOSTS": [], "INGRESS_LMS_EXTRA_HOSTS": [], @@ -141,7 +140,6 @@ def get_sync_waves_for_resource(resource_name: str) -> SYNC_WAVES_ORDER_ATTRS_TY "CUSTOM_CERTS": {}, "DEBUG": False, "LETSENCRYPT_EMAIL": "{{ CONTACT_EMAIL }}", - "ENABLE_CELERY_TUNING": True, "ENABLE_MULTITENANCY": True, "ENABLE_SCORM": True, "POD_LIFECYCLE": True, diff --git a/drydock/templates/drydock/k8s/celery/cms-worker.yml b/drydock/templates/drydock/k8s/celery/cms-worker.yml deleted file mode 100644 index 7954ad01..00000000 --- a/drydock/templates/drydock/k8s/celery/cms-worker.yml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: cms-worker -spec: - template: - spec: - terminationGracePeriodSeconds: 300 - containers: - - name: cms-worker - args: - - celery - - --app=cms.celery - - worker - - --loglevel=info - - --concurrency=1 - - --hostname=edx.cms.core.default.%%h - - --max-tasks-per-child=1 - - --prefetch-multiplier=1 - - --exclude-queues=edx.lms.core.default diff --git a/drydock/templates/drydock/k8s/celery/lms-worker.yml b/drydock/templates/drydock/k8s/celery/lms-worker.yml deleted file mode 100644 index 77e975b3..00000000 --- a/drydock/templates/drydock/k8s/celery/lms-worker.yml +++ /dev/null @@ -1,20 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: lms-worker -spec: - template: - spec: - terminationGracePeriodSeconds: 300 - containers: - - name: lms-worker - args: - - celery - - --app=lms.celery - - worker - - --loglevel=info - - --concurrency=1 - - --hostname=edx.lms.core.default.%%h - - --max-tasks-per-child=1 - - --prefetch-multiplier=1 - - --exclude-queues=edx.cms.core.default diff --git a/drydock/templates/drydock/k8s/flower.yml b/drydock/templates/drydock/k8s/flower.yml deleted file mode 100644 index 13172355..00000000 --- a/drydock/templates/drydock/k8s/flower.yml +++ /dev/null @@ -1,25 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: flower-edxapp - labels: - app.kubernetes.io/name: flower-edxapp -spec: - selector: - matchLabels: - app.kubernetes.io/name: flower-edxapp - template: - metadata: - labels: - app.kubernetes.io/name: flower-edxapp - spec: - containers: - - name: flower-edxapp - image: docker.io/mher/flower:0.9.5 - ports: - - containerPort: 5555 - env: - - name: CELERY_BROKER_URL - value: redis://{{ REDIS_USERNAME }}:{{ REDIS_PASSWORD }}@{{ REDIS_HOST }}:{{ REDIS_PORT }}/{{ OPENEDX_CELERY_REDIS_DB }} - - name: FLOWER_PORT - value: "5555"