Skip to content

Conversation

@marcomc
Copy link
Contributor

@marcomc marcomc commented Jan 26, 2023

Resolves #666
Introduce Docker HealthCheck for local builds of the console

The health check process:

  1. The HealthCheck action steps generate a measurable condition during the execution of the Dynamic Entrypoint
  2. The HealthCheck test run a command that verify if the health check condition is met
  3. docker-composer will wait for the HealthCheck command to find the console container in a healthy status before releasing control over the containers to the following commands

Defaults:

All HealthCheck action, test and timing parameters are configurable (see _src/base/CHANGELOG.md)

  • The HealthCheck action is set to create the /HEALTHCHECK.txt file
  • The HealthCheck test command is set to launch the /healthcheck.test.sh script
  • The HealthCheck healthcheck.test.sh is populated with steps that check if /HEALTHCHECK.txt has been created

This health check considers the console healthy when all the commands run inside the Dynamic Entrypoint have completed, with the creation of the /HEALTHCHECK.txt file as the last of the steps. If the file exists everything else has completed.
The HealthCheck can be much more complex if we need a more accurate health condition

@marcomc marcomc added enhancement New feature or request harness-php PHP harness labels Jan 26, 2023
version: develop
console:
healthcheck:
enabled: true
Copy link
Contributor

Choose a reason for hiding this comment

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

can it be enabled for helm and CI as well? It's useful for seeing the deployment readiness, and CI should act the same as local

Copy link
Contributor

Choose a reason for hiding this comment

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

technically helm way is enough being a common console.healthcheck.enabled, as it'll get the same file CI was built from

Copy link
Contributor

Choose a reason for hiding this comment

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

note though that the helm way is hard coded to app state

@kierenevans kierenevans changed the base branch from 1.5.x to 1.6.x May 16, 2023 06:40
@andytson-inviqa
Copy link
Contributor

I'm a bit nervous of the PR still, but now this sort of thing also needs to be a docker harness thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request harness-php PHP harness

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Console container startup issue

3 participants