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

Docker healthchecks #3606

Merged
merged 10 commits into from
Jan 9, 2019
Merged

Docker healthchecks #3606

merged 10 commits into from
Jan 9, 2019

Conversation

normanrz
Copy link
Member

@normanrz normanrz commented Jan 8, 2019

  • Adds healthchecks to all dockerfiles for auto-healing and starting order.
  • Uses the new integrated fossildb healthcheck adds Healthcheck fossildb#30

Steps to test:

  • DOCKER_TAG=docker-health__7392 docker-compose pull webknossos webknossos-datastore webknossos-tracingstore
  • DOCKER_TAG=docker-health__7392 docker-compose up webknossos webknossos-datastore webknossos-tracingstore
  • Check docker ps whether all services are reported healthy (after ~1min each)

Issues:


@normanrz normanrz self-assigned this Jan 8, 2019
@normanrz normanrz requested review from fm3 and jstriebel January 8, 2019 17:53
command:
- fossildb
- -c
- skeletons,skeletonUpdates,volumes,volumeData,volumeUpdates
user: ${USER_UID:-fossildb}:${USER_GID:-fossildb}
healthcheck:
Copy link
Member Author

Choose a reason for hiding this comment

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

Not required anymore, because it is defined in fossildb's Dockerfile

@@ -16,5 +16,11 @@ RUN chown -R webknossos . \

USER webknossos

HEALTHCHECK \
--interval=1m --timeout=5s --retries=10 \
CMD curl --fail http://localhost:9090/data/health || exit 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Really weird that docker allows the exit-code to be only 0 or 1.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that's weird.

Copy link
Contributor

@jstriebel jstriebel left a comment

Choose a reason for hiding this comment

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

The tracingstore healthcheck does not work yet, the others look fine.

Logs from the tracingstore, but reported unhealthy:

…
webknossos-tracingstore_1  | 2019-01-09 09:18:52,238 [INFO] - Slf4jLogger started
webknossos-tracingstore_1  | 2019-01-09 09:18:53,582 [INFO] - Slf4jLogger started
webknossos-tracingstore_1  | 2019-01-09 09:18:54,539 [INFO] - Successfully tested FossilDB health at fossildb:7155. Reply: SERVING

webknossos-tracingstore/Dockerfile Outdated Show resolved Hide resolved
webknossos-tracingstore/Dockerfile Outdated Show resolved Hide resolved
@normanrz normanrz merged commit 4c946f0 into master Jan 9, 2019
@normanrz normanrz deleted the docker-health branch January 9, 2019 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add healthcheck to dockerfiles
2 participants