[Container-tools] Support dynamic data in Nulecule

Ratnadeep Debnath rtnpro at gmail.com
Wed Sep 9 16:17:56 UTC 2015


Hi all,

This is with reference to discussion[1][2] on supporting dynamic data
in Nulecule.

So, what do we mean by dynamic data, here?

We mean data, which is generated during run time, e.g.,
- container properties: name, id, exposed ports, ip
- service/pod properties in kubernetes, etc.

So, in a Nulecule spec for a multi tier application, say sentry[3], we
have services:
- postgres
- redis
- sentry

To make it more complicated, we can have two sentry application
servers running behind a load balancer, say haproxy.
- sentry1, sentry2
- haproxy

I should be able to say
- sentry1, sentry2 depends on postgres.id (container id of postgres)
and redis.id
- haproxy depends on sentry1.id and sentry2.id

However, the ID (or any other property) of the container is not known
beforehand, but only realized during runtime, when the container comes
up. However, using this explicit info on the dependency amongst apps
in the Nulecule file, a Nulecule implementation, atomicapp, in our
case, can resolve the dependency graph, and order the deployment of
containers: bring up independent containers in parallel and dependent
containers sequentially. In this case:
- containers postgres and redis can come up in parallel
- containers for sentry1 and sentry2 can come up in parallel, but only
after postgres and redis containers has come up
- haproxy container can come up only after sentry1 and sentry2 has come up

Some providers might support such ordering already, some wouldn't
care, and some will not support. With this dependency information with
Nulecule, a Nulecule implementation can generate optimized default
configurations for various providers, as needed.

This declarative approach will give a better understanding for a
service stack and the orchestration required to deploy it.


[1]: https://github.com/projectatomic/nulecule/issues/97
[2]: https://www.redhat.com/archives/container-tools/2015-September/msg00023.html
[3]: https://hub.docker.com/_/sentry/

Regards,
rtnpro
-- 
Ratnadeep Debnath,
https://www.waartaa.com
GPG Fingerprint: 033C 8041 A0E9 CDBA 2E02  B785 2119 5486 F245 DFD6




More information about the Container-tools mailing list