Add health checks for V2X-Hub automated integration tests#847
Add health checks for V2X-Hub automated integration tests#847paulbourelly999 merged 5 commits intodevelopfrom
Conversation
configuration/docker-compose.yml
Outdated
| - v2xhub-logs-volume:/var/log/tmx:rw | ||
| - v2xhub-download-volume:/var/www/download/:rw | ||
| - ssl-certs-volume:/var/www/plugins/ssl:rw | ||
| - ./tests/MAP:/var/www/download/MAP:ro |
There was a problem hiding this comment.
We do not want to add any volumes or configurations to our main docker compose just for the integration tests. Instead, we can override docker-compose details by having a docker compose in the integration testing report that adds these volumes and simply calling
docker compose -f <configuration/docker-compose.yml> -f <integration_test/docker-compose.yml> up -d
Please look into docker compose documentation for merge https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/
paulbourelly999
left a comment
There was a problem hiding this comment.
We do not want to add any volumes or configurations to our main docker compose just for the integration tests. Instead, we can override docker-compose details by having a docker compose in the integration testing report that adds these volumes and simply calling
docker compose -f <configuration/docker-compose.yml> -f <integration_test/docker-compose.yml> up -d
Please look into docker compose documentation for merge https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/
configuration/docker-compose.yml
Outdated
| - ssl-certs-volume:/etc/apache2/ssl:ro | ||
|
|
||
| healthcheck: | ||
| test: ["CMD-SHELL", "ps -ef | grep -v grep | grep -E -q 'apache2|httpd' || exit 1"] |
There was a problem hiding this comment.
Health checks should ideally check functionality. This only checks that services are running. Instead we can run a curl command to ensure the web-ui is responding
There was a problem hiding this comment.
Updated health checks and tested locally
configuration/docker-compose.yml
Outdated
| - v2xhub-download-volume:/var/www/download/:rw | ||
| - ssl-certs-volume:/var/www/plugins/ssl:rw | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "ps -ef | grep -v grep | grep -q tmx || exit 1"] |
There was a problem hiding this comment.
For this one since it maybe a harder task to do a functional check. Lets ensure all required services are running. This should include Tmx core services as well as Command Plugin
There was a problem hiding this comment.
updated
|



PR Details
This PR updates configuration/docker-compose.yml with health checks to support the V2X-Hub integration test environment in usdot-fhwa-OPS/v2xhub-integration-tests.
Description
Related GitHub Issue
Related Jira Key
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: