From 2150af25c09b8b94d7b484278a2fdf3ae9e764ff Mon Sep 17 00:00:00 2001 From: Andrey Pavlov Date: Fri, 3 Mar 2017 14:35:24 +0400 Subject: [PATCH] Adding global secret configs support Change-Id: I00fab3d6926eb1fa0a8c6817d2b6f698ea930e6d --- fuel_ccp_entrypoint/start_script.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fuel_ccp_entrypoint/start_script.py b/fuel_ccp_entrypoint/start_script.py index ee48a50..4453bc4 100644 --- a/fuel_ccp_entrypoint/start_script.py +++ b/fuel_ccp_entrypoint/start_script.py @@ -24,6 +24,7 @@ import six VARIABLES = {} GLOBALS_PATH = '/etc/ccp/globals/globals.json' +GLOBALS_SECRETS_PATH = '/etc/ccp/global-secrets/global-secrets.json' NODES_CONFIG_PATH = '/etc/ccp/nodes-config/nodes-config.json' SERVICE_CONFIG_PATH = '/etc/ccp/service-config/service-config.json' META_FILE = "/etc/ccp/meta/meta.json" @@ -505,6 +506,9 @@ def get_variables(role_name): LOG.info("Getting global variables from %s", GLOBALS_PATH) with open(GLOBALS_PATH) as f: variables = json.load(f) + with open(GLOBALS_SECRETS_PATH) as f: + secrets = json.load(f) + merge_configs(variables, secrets) if os.path.isfile(SERVICE_CONFIG_PATH): LOG.info("Getting service variables from %s", SERVICE_CONFIG_PATH) with open(SERVICE_CONFIG_PATH) as f: