planetary-social / ansible-scripts

Ansible automation scripts used at Planetary
MIT License
2 stars 3 forks source link

Add dynamic health check command to Health check role #73

Closed cooldracula closed 8 months ago

cooldracula commented 8 months ago

This is a small change that adds a var for the health check command.

Previously it was a curl command that could go to a dynamic health endpoint. This works in most cases, except when we are trying to ping a relay where the service is only directly connectable through nostr. A standard curl redirects to webflow and doesn't correctly verify that our relay service is up.

I added a new health_check_command var that defaults to the standard curl. I updated our relay role to use a custom curl command that adds an appropriate nostr header and pings the service directly. I also did some minor fixes in the role and the crossposting vars that I found during the work.

This was deployed to relay-dev.ansible.fun and then relay.nos.social, which now has a health check that we can monitor via our prometheus/grafana setup.