Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AC-144] Worker Cron Process Design Doc #226

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

roberthunterjr
Copy link

@roberthunterjr roberthunterjr commented Feb 5, 2025

Creates a Worker Cron Process Design Doc from SPIKE AC-144.

This provides the research and recommendations needed to setup the Health Check and Instance workers on a cron schedule using Docker.

Proof of concept:
Ed-Fi-Alliance-OSS/Ed-Fi-Admin-Console-Health-Check-Worker-Process#17

@roberthunterjr roberthunterjr marked this pull request as draft February 5, 2025 22:44

These can be exposed either by using the `AppSettingVariable__NestedKey=VALUE` accessor pattern to expose the values to the container.

The `ClientId` and `ClientSecret` values will need to be retrieved from upon instance creation.

Choose a reason for hiding this comment

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

Note: there are two different sets of credentials:

  • For either worker to access Admin API
  • For Health Check to access ODS/API

Thes second set can be retrieved at runtime from Admin API. App settings or env var will need to provide the Admin API credentials to go along with the AccessTokenUrl.

COPY --from=build /app .

# Execute the app via chron
CMD ["cron", "-f"]

Choose a reason for hiding this comment

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

How will the sys admin adjust the schedule?

Copy link
Author

Choose a reason for hiding this comment

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

There is a local crontab file that will be included in the docker image when building image from source. This allows you to set the schedule, log file, and command to be executed.

We can further investigate parameterizing this particular part of the string so that users can configure at runtime.

Choose a reason for hiding this comment

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

Since this is a design doc, I'm good with that. Please create a follow-up ticket for implementation, and include a note about needing to parametrize the schedule.

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.

3 participants