Open hackermd opened 7 years ago
This is an intentional change introduced in 0.9. With this new approach we can now maintain a reasonable build cache similar to Docker's. The problem with the old approach is that we started up all the services, and rebuilt them all, essentially from scratch, with each run of build
. It performed poorly, to say the least. With this new approach, we can skip running roles when there is no change detected in the role, which gives us much better performance on repeat builds.
Connections between containers need to be handled at application runtime, which is the same philosophy followed by K8s and OpenShift. It takes some thought, and deliberate programming to get it right, but it's entirely possible to have one service wait on another service to be available before taking action, and that's the path applications should follow.
ISSUE TYPE
Bug Report
container.yml
https://github.com/TissueMAPS/TmDeploy/blob/fb0526c348708099bb63b6fb432ada47bfc4e86b/tmdeploy/share/container/projects/tissuemaps/container.yml
OS / ENVIRONMENT
SUMMARY
In contrast to earlier versions of ansible-container, each container image is build separately instead of all being build collectively at the end of the build process. As a consequence, a container cannot connect to another container during build (even if a dependency is declared in
container.yml
). In addition, the host name of another container cannot be dynamically looked up, because the container is no longer running and the information therefore not available on the network.STEPS TO REPRODUCE
EXPECTED RESULTS
Expected that the master_add_node() function would execute successfully in this task given the
db_master
host defined in container.yml.ACTUAL RESULTS
The
app
container cannot connect to thedb_master
container, because thedb_master
container is no longer running.