Closed Bug 1344716 Opened 8 years ago Closed 8 years ago

use healthchecks to block on successful container startup

Categories

(Release Engineering Graveyard :: Applications: Balrog (backend), enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bhearsum, Assigned: Oluwadamilola.durodola)

References

Details

(Whiteboard: [ready])

We have 5 docker containers in our docker-compose.yml, and some dependencies between them. Right now, we don't really enforce those dependencies well. Eg: balrogadmin simply sleeps before starting up (to wait for the database), and balrogagent just spews errors until balrogadmin is started. As of Docker 1.12.0, there's a new "healthcheck" feature that can be used to delay a container startup until the healthcheck command is successful. http://stackoverflow.com/questions/31746182/docker-compose-wait-for-container-x-before-starting-y/41854997#41854997 has a very relevant example. For our purposes, we'll want: * balrogadmin to wait until mysql is up (we can probably use nc to check port 3306 of the balrogdb container for this) * balrogpub to wait until mysql is up * balrogagent to wait until balrogadmin is up (we can probably use a similar curl command as the stackoverflow link for this) * balrogui to wait until balrogadmin is up
Priority: -- → P2
Assignee: nobody → Oluwadamilola.durodola
Commit pushed to master at https://github.com/mozilla/balrog https://github.com/mozilla/balrog/commit/b74d1fba10a43d0bea91fd1ea70218ac9bbead6d Bug 1344716: Add health checks to Docker-compose file (#297). r=bhearsum
Depends on: 1355970
This is a great improvement to the developer experience, thank you Durodola!
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Release Engineering → Release Engineering Graveyard
You need to log in before you can comment on or make changes to this bug.