Skip to content

feat: add 1st version of rendered jobs#10

Merged
mariajgrimaldi merged 13 commits into
mainfrom
MJG/init-jobs
Sep 21, 2022
Merged

feat: add 1st version of rendered jobs#10
mariajgrimaldi merged 13 commits into
mainfrom
MJG/init-jobs

Conversation

@mariajgrimaldi
Copy link
Copy Markdown
Contributor

@mariajgrimaldi mariajgrimaldi commented Sep 14, 2022

Description

This PR adds a list of jobs for the most used services. This list can be configured using a variable defined in the config.yml with optional services such as minio or forum; required services like LMS are not removable. There's also a specified order in which they're run:
image
We configured this behavior using waves from argoCD.

How to test

  1. Specify DRYDOCK_INIT_JOBS with the list of services
  2. Run tutor drydock save -r reference.yml
  3. Check the rendered jobs

Comment thread drydock/templates/kustomized/tutor13/base/kustomization.yml Outdated
@mariajgrimaldi mariajgrimaldi marked this pull request as ready for review September 19, 2022 22:51
Copy link
Copy Markdown
Member

@MoisesGSalas MoisesGSalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add a TTL so the jobs don't linger for ever after finished. Something like

ttlSecondsAfterFinished: 100

# Secret resource that will be used to store the account's private key.
privateKeySecretRef:
name: {{ K8S_NAMESPACE }}-letsencrypt-account-key
server: https://acme-v02.api.letsencrypt.org/directory
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for testing. I'll remove this shortly

- k8s/volumes.yml
{%- if not DRYDOCK_DISABLE_JOBS | default(false) %}
- k8s/jobs.yml
{%- if DRYDOCK_INIT_JOBS %}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can I enable only the default jobs (lms,cms,mysql)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, just disable the plugins & you'll have the default jobs

@@ -0,0 +1,31 @@
{%- if "minio" in DRYDOCK_INIT_JOBS %}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be a bit hacky, but one way to know if a plugin like this is installed is to check if MINIO_DOCKER_IMAGE is defined. Then we add all the files but they will be empty if the plugin isn't enabled. What do you think?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 👯

Comment thread drydock/templates/kustomized/tutor13/base/k8s/deployments.yml
@mariajgrimaldi
Copy link
Copy Markdown
Contributor Author

Warning ⚠️
We'll merge this PR since all jobs but forum are working, so we advise you not to use forum for now. We'll attach a fix soon.

@mariajgrimaldi mariajgrimaldi merged commit e0e4162 into main Sep 21, 2022
@MoisesGSalas MoisesGSalas deleted the MJG/init-jobs branch November 16, 2023 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants