fuel-ccp/fuel_ccp/common
Kirill Bespalov 29133f2787 Introduce cross-repository config templating
Make possible sharing and using of common parts of configs
like keystone, db, messaging, etc as jinja templates (e.g.
via macros) located at 'exports' directories of related
repositories.

Example of usage:
-------------------------------------------------
share rabbitmq configuration as macros:
-------------------------------------------------
  # file fuel-ccp-rabbitmq/exports/messaging.j2
  {% macro oslo_config() -%}
    [DEFAULT]
    transport_url=rabbit://{{ rabbitmq.user }}
    [oslo_messaging_rabbit]
    rabbit_ha_queues = true
  {%- endmacro %}
-------------------------------------------------
use it in nova.conf.j2:
-------------------------------------------------
  # file fuel-ccp-nova/service/files/nova.conf.j2
  [upgrade_levels]
  compute = auto

  {{ messaging.oslo_config() }} <-----------

  [wsgi]
  api_paste_config = /etc/nova/api-paste.ini
 -------------------------------------------------

During 'ccp deploy' the following occurs:

- loading templates files from /exports/ dirs of avaliable repositories.
- push files to k8s as ConfigMap with name 'exports'.
- adding a container volume '/etc/ccp/macros' with the ConfigMap content
- implicitly adding jinja imports of these templates files to all config
  files from /fuel-ccp-xxx/service/* to make possible macros usage.

Change-Id: I4858d62a9713e90c09300f75e01e06a31d3ac0ae
Depends-On: I429656b7eaf6312ee2d27ccaf0cb8802a234e871
2016-12-13 17:02:23 +00:00
..
__init__.py Rename microservices to fuel-ccp 2016-07-21 13:45:24 +03:00
jinja_utils.py Introduce cross-repository config templating 2016-12-13 17:02:23 +00:00
utils.py Introduce cross-repository config templating 2016-12-13 17:02:23 +00:00