healthchecks #32

Merged
moritz merged 8 commits from healthchecks into main 2023-01-12 21:16:32 +00:00
Member

Adding healthchecks for the container web (this is testing the whole chain nginx->php-fpm->nextcloud), mariadb, redis and php-fpm (Solving #22)

Adding healthchecks for the container web (this is testing the whole chain nginx->php-fpm->nextcloud), mariadb, redis and php-fpm (Solving https://git.coopcloud.tech/coop-cloud/nextcloud/issues/22)
moritz added 4 commits 2023-01-10 16:47:17 +00:00
moritz force-pushed healthchecks from d98ca0ff02 to 3f778ef1eb 2023-01-10 17:25:24 +00:00 Compare
Author
Member

Does anyone have any idea why the drone build fails with Error loading key "(stdin)": invalid format?

Does anyone have any idea why the drone build fails with `Error loading key "(stdin)": invalid format`?
moritz added 1 commit 2023-01-10 17:31:34 +00:00
continuous-integration/drone/pr Build is failing Details
55866403ee
fix CI deployment: set healthcheck version
decentral1se reviewed 2023-01-11 10:03:10 +00:00
decentral1se left a comment
Owner

Nice to have healthchecks but these seem brittle and prone to breaking. In my experiecne a broken healthcheck can be worse than no healthcheck because your container will fail in ways which can be very mysterious until you remember to check the healthcheck 😅 (abra could help more here too...) Is there any way to make these more future proof? Thanks!

Nice to have healthchecks but these seem brittle and prone to breaking. In my experiecne a broken healthcheck can be worse than no healthcheck because your container will fail in ways which can be very mysterious until you remember to check the healthcheck 😅 (`abra` could help more here too...) Is there any way to make these more future proof? Thanks!
compose.yml Outdated
@ -36,0 +36,4 @@
secrets:
- admin_password
healthcheck:
test: ["CMD-SHELL", 'curl -s -N --user admin:$$(cat /run/secrets/admin_password) localhost/ocs/v2.php/apps/serverinfo/api/v1/info | grep "statuscode>200<"']
Owner

localhost/ocs/v2.php/apps/serverinfo/api/v1/info There's two version strings in this URI? I wonder if they'll change? Could be some breakages here... any other way to do it?

`localhost/ocs/v2.php/apps/serverinfo/api/v1/info` There's two version strings in this URI? I wonder if they'll change? Could be some breakages here... any other way to do it?
Author
Member

This uses the https://github.com/nextcloud/serverinfo app, which is installed per default. It is able to check the nextcloud health in more depth.
https://github.com/nextcloud/docker/issues/676
But I can't guarantee that this app won't change in future.
A more future prove approach is to use /status.php as for the php-fpm healthcheck.

This uses the https://github.com/nextcloud/serverinfo app, which is installed per default. It is able to check the nextcloud health in more depth. https://github.com/nextcloud/docker/issues/676 But I can't guarantee that this app won't change in future. A more future prove approach is to use /status.php as for the php-fpm healthcheck.
moritz marked this conversation as resolved
healthcheck.sh Outdated
@ -0,0 +1,8 @@
#!/bin/bash
which cgi-fcgi > /dev/null || (apt-get update && apt-get install -y libfcgi-bin)
Owner

Seems like overkill having to install for a healthcheck + also confusing to do that installation inside the actual healthcheck logic. Can't you first open a ticket upstream (ideal to have the package in the image) or do it in the entrypoint?

Seems like overkill having to install for a healthcheck + also confusing to do that installation inside the actual healthcheck logic. Can't you first open a ticket upstream (ideal to have the package in the image) or do it in the entrypoint?
Author
Member

I put it in the entrypoint for now, but I try to get it upstream.

I put it in the entrypoint for now, but I try to get it upstream.
moritz marked this conversation as resolved
Owner

Does anyone have any idea why the drone build fails with Error loading key "(stdin)": invalid format?

I think that's a permission thing? It doesn't have access to the key it needs due to being a PR? In general, our CI for the recipes is a bit confusing, some do it, some don't. We could coordinate to figure out a way to make this work better.

> Does anyone have any idea why the drone build fails with Error loading key "(stdin)": invalid format? I think that's a permission thing? It doesn't have access to the key it needs due to being a PR? In general, our CI for the recipes is a bit confusing, some do it, some don't. We could coordinate to figure out a way to make this work better.
moritz added 2 commits 2023-01-11 14:39:41 +00:00
moritz added 1 commit 2023-01-11 14:58:51 +00:00
continuous-integration/drone/pr Build is failing Details
30ce2ba98e
remvove unnecessary admin_password from web container
decentral1se approved these changes 2023-01-12 20:17:08 +00:00
decentral1se left a comment
Owner

Great work! LGTM!

Great work! LGTM!
moritz merged commit 19c260b8da into main 2023-01-12 21:16:32 +00:00
moritz referenced this issue from a commit 2023-01-12 21:16:37 +00:00
moritz deleted branch healthchecks 2023-01-12 21:16:44 +00:00
cgalo5758 referenced this issue from a commit 2023-08-08 08:30:09 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/nextcloud#32
No description provided.