[Container-tools] Discussions on nested Nulecule applications

Ratnadeep Debnath rtnpro at gmail.com
Thu Dec 17 07:24:43 UTC 2015


Hi all,

On Dec 16, 2015, dustymabe, cdrage, tkral and myself (rtnpro) got
together to discuss on the challenges to implement nested Nulecule
applications and find solutions for them.

One of the challenges is regarding current params/answers structure in
Nulecule[1]. We have already started working on a proof of concept to
resolve it at [2].

However, when working on the above, we hit some new questions:

1. How to consume an external Nulecule component in another?
==============================================
We're having thoughts to output certain runtime info about a Nulecule component
after it's deployed, so that these values, could be reused by other components.
However, this complicates things in the scope of Nulecule, by trying to do some
basic orchestration, which is handled by our providers in a comprehensive way.
Possible cases of using these runtime info would be for linking
containers, service
discovery, etc. Many container images make this harder by hard coding
various values in their definitions.

We cannot do much, but educate folks on best practices to write reusable
containers. However, what we can easily do, is encourage writing Nulecule
apps where values like service name, name, pod name, etc. are configurable.
This will allow the consumer (another Nulecule app) customize things as needed
by their environment.

2. How do we create aliases for environment variables for easy reuse?
==================================================
There are many containers, for the same application, which do not use the
same nomenclature for, say, environment variables. An example would
be official postges[3] and centos postgresql[4] container images. So,
an application developed based on one of the containers cannot be run
using the other because of the differences in the names of the environment
variables exposed.

One of the ways to solve this problem in Nulecule is by mapping the data
from answers to respective environment variables needed by different Nulecule
components. However, one trade off to this is that these environment variables
set by Nulecule will not be reactively updated when the values change on
runtime.

This issue can be solved in a better way if the providers were to
allow to add aliases for environment variables to keep the alias environment
variables always in sync with the source environment variable.



Things started to look much better after our discussions. We're able devise
simple and easy solutions for complicated problems towards implementing
nested Nulecule applications.

We'll work on a proof-of-concept nested Nulecule application based on [2]
and see how does it shape up. We'll keep you posted on this. If you have
any feedback, please feel free to share :)


[1]: https://github.com/projectatomic/nulecule/issues/187
[2]: https://github.com/projectatomic/atomicapp/pull/442
[3]: https://hub.docker.com/_/postgres/
[4]: https://hub.docker.com/r/centos/postgresql-94-centos7/

Thanks,
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