[openstack-dev] [tripleo] Posibilities to aggregate/merge configs across templates

Kamil Sambor ksambor at redhat.com
Tue Sep 4 15:53:14 UTC 2018

Hi all,

I want to start discussion on: how to solve issue with merging environment
values in TripleO.

In TripleO we experience some issues related to setting parameters in heat
templates. First, it isn't possible to set some params as ultimate source
of truth (disallow to overwrite param in other heat templates). Second it
isn't possible to merge values from different templates [0][1].
Both features are implemented in heat and can be easly used in templates.[2][3]
This doesn't work in TripleO because we overwrite all values in template in
python client instead of aggregating them etc. orsimply let heat do the
job .[4][5]

Example solutions are: we can fix how python tripleo client works with env
and templates and enable heat features or we can write some puppet code
that will work similar to firewall code [6] and will support aggregate and
merge values that we point out. Both solutions have pros and cons but IMHO
solution which give heat to do job is preferable. But solution with merging
give us possibilities to have full control on merging of environments.

Only few as a start: With both solutions we will have the same problem,
porting new patches which will use this functionalities to older version of
rhel. Also upgrades can be really problematic to new version. Also changes
which will enable heat feature will totally change how templates work and we
will need to change all templates and change default behavior (which is merge
params) to override behavior and also add posibilities to run temporaly old

On the end, I prepared two patchsets with two PoC in progress. First one with
merging env in tripleo client but with using heat merging functionality:
https://review.openstack.org/#/c/599322/ . And second where we ignore merget
env and move all files and add them into deployment plan enviroments.

What do you think about each of solution?Which solution should be used
in TripleO?

Kamil Sambor

[0] https://bugs.launchpad.net/tripleo/+bug/1716391
[1] https://bugs.launchpad.net/heat/+bug/1635409
[2] https://docs.openstack.org/heat/pike/template_guide/environment.html#restrict-update-or-replace-of-a-given-resource
[3] https://docs.openstack.org/heat/pike/template_guide/environment.html#environment-merging
[4] https://github.com/openstack/python-tripleoclient/blob/master/tripleoclient/utils.py#L1019
[5] https://github.com/openstack/python-heatclient/blob/f73c2a4177377b710a02577feea38560b00a24bf/heatclient/common/template_utils.py#L191
[6] https://github.com/openstack/puppet-tripleo/tree/master/manifests/firewall

More information about the OpenStack-dev mailing list