put config in a single config directory

instead of top-level files

- ensure directory is private
- both tljh and jupyterhub config go in there
- move old config.yaml to new location at install time
This commit is contained in:
Min RK
2018-08-28 14:00:43 +02:00
parent 49a8a6f8f0
commit 2bf23f0b28
3 changed files with 49 additions and 10 deletions

View File

@@ -27,7 +27,11 @@ INSTALL_PREFIX = os.environ.get('TLJH_INSTALL_PREFIX', '/opt/tljh')
HUB_ENV_PREFIX = os.path.join(INSTALL_PREFIX, 'hub')
USER_ENV_PREFIX = os.path.join(INSTALL_PREFIX, 'user')
STATE_DIR = os.path.join(INSTALL_PREFIX, 'state')
CONFIG_FILE = os.path.join(INSTALL_PREFIX, 'config.yaml')
CONFIG_DIR = os.path.join(INSTALL_PREFIX, 'config')
CONFIG_FILE = os.path.join(CONFIG_DIR, 'config.yaml')
# deprecated config file location
OLD_CONFIG_FILE = os.path.join(INSTALL_PREFIX, 'config.yaml')
def set_item_in_config(config, property_path, value):