[Horizon] ensure horizon secret key stays same

We can't regenerate secret key for horizon in each packstack run
as it causes restart of httpd daemon.

Change-Id: Id6581fd12c223389c20e545703d79d3f505b4ad1
This commit is contained in:
Lukas Bezdicka
2015-06-05 11:17:44 -04:00
parent 06b9806822
commit 6c5dfae7e6
2 changed files with 15 additions and 1 deletions

View File

@@ -841,6 +841,9 @@ OpenStack Horizon Config parameters
**CONFIG_HORIZON_SSL**
Specify 'y' to set up Horizon communication over https. ['y', 'n']
**CONFIG_HORIZON_SECRET_KEY**
Secret key to use for Horizon Secret Encryption Key.
SSL Config parameters
---------------------

View File

@@ -49,6 +49,18 @@ def initConfig(controller):
"USE_DEFAULT": False,
"NEED_CONFIRM": False,
"CONDITION": False},
{"CMD_OPTION": "os-horizon-secretkey",
"PROMPT": "Horizon Secret Encryption Key",
"OPTION_LIST": [],
"VALIDATORS": [validators.validate_not_empty],
"DEFAULT_VALUE": uuid.uuid4().hex,
"MASK_INPUT": True,
"LOOSE_VALIDATION": False,
"CONF_NAME": "CONFIG_HORIZON_SECRET_KEY",
"USE_DEFAULT": True,
"NEED_CONFIRM": False,
"CONDITION": False},
]
update_params_usage(basedefs.PACKSTACK_DOC, params, sectioned=False)
group = {"GROUP_NAME": "OSHORIZON",
@@ -128,7 +140,6 @@ def initSequences(controller):
# -------------------------- step functions --------------------------
def create_manifest(config, messages):
config["CONFIG_HORIZON_SECRET_KEY"] = uuid.uuid4().hex
horizon_host = config['CONFIG_CONTROLLER_HOST']
manifestfile = "%s_horizon.pp" % horizon_host