graphprotocol / graphprotocol/graph-node
Healthcheck for graph-node docker image
Nessuno ha ancora preso questa issue.
- Lingua principale
- Rust
- Stelle
- 3.2k
- Fork
- 1.1k
- Merge medio
- 4g 1h
- PR unite (30g)
- 1
Descrizione
Description
The docker image for the graph-node doesn't contain a health check. It would be useful to have a simple way of checking the health of a graph node in the docker image automatically.
Docker health checks are meant to provide a very simple check if the relevant application is running correctly. They should be quick and cheap so that they can execute frequently. In the graph-node case this would be a check if the graph node is up and running and not a check for a particular subgraph.
Proposal
As graph-node doesn't have a native health check, the fairly simple command to check if the node is up and running would be a GraphQL request:
query getVersion {
version {
version
}
}
should return the version of the node. To run this as a shell command, we could use:
curl -s http://localhost:8030/graphql -H 'Content-Type: application/json' -d '{"query": "query getVersion { version { version } }" }' -f -m 2
The command runs inside the docker container. However, the default docker image does not provide curl. So the proposal is two-fold:
- Add a curl dependency to the docker image (i.e.
apt-get -y install curlin the docker file) - Add a health check command to the docker file.
If there is interest in this, I'm happy to create a PR for it.
Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.
No
Some information to help us out
- Tick this box if you plan on implementing this feature yourself.
- I have searched the issue tracker to make sure this issue is not a duplicate.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Individua il Dockerfile utilizzato per l’immagine graph-node predefinita e verifica come sono configurate le relative dipendenze e i controlli di integrità. Usa la richiesta GraphQL proposta verso http://localhost:8030/graphql come controllo; il lavoro è completato quando l’immagine include curl e il controllo di integrità ha esito positivo quando graph-node è in esecuzione e fallisce quando non lo è.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- docker, graphql
- Ambito
- devops, infrastructure
- Tipo di issue
- Funzionalità
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100