Move all config files inside INSTALL_PREFIX

Makes cleanup easier!
This commit is contained in:
yuvipanda
2018-06-27 03:10:41 -07:00
parent de7fda47db
commit 12698a20ed
4 changed files with 7 additions and 5 deletions

View File

@@ -31,8 +31,10 @@ def ensure_jupyterhub_service(prefix):
systemd.install_unit('jupyterhub.service', hub_unit_template.format(**unit_params))
# Set up proxy / hub secret oken if it is not already setup
if not os.path.exists('/etc/jupyterhub/configurable-http-proxy.secret'):
with open('/etc/jupyterhub/configurable-http-proxy.secret', 'w') as f:
# FIXME: Check umask here properly
proxy_secret_path = os.path.join(INSTALL_PREFIX, 'configurable-http-proxy.secret')
if not os.path.exists(proxy_secret_path):
with open(proxy_secret_path, 'w') as f:
f.write('CONFIGPROXY_AUTH_TOKEN=' + secrets.token_hex(32))

View File

@@ -29,4 +29,4 @@ c.JupyterHub.port = 80
c.SystemdSpawner.extra_paths = [os.path.join(USER_ENV_PREFIX, 'bin')]
configurer.apply_yaml_config('/etc/jupyterhub/jupyterhub.yaml', c)
configurer.apply_yaml_config(os.path.join(INSTALL_PREFIX, 'jupyterhub.yaml'), c)

View File

@@ -13,7 +13,7 @@ PrivateTmp=yes
PrivateDevices=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
EnvironmentFile=/etc/jupyterhub/configurable-http-proxy.secret
EnvironmentFile={install_prefix}/configurable-http-proxy.secret
ExecStart={install_prefix}/hub/bin/configurable-http-proxy \
--ip 0.0.0.0 \
--port 80 \

View File

@@ -17,6 +17,6 @@ PrivateDevices=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
# Source CONFIGPROXY_AUTH_TOKEN from here!
EnvironmentFile=/etc/jupyterhub/configurable-http-proxy.secret
EnvironmentFile={install_prefix}/configurable-http-proxy.secret
Environment=TLJH_INSTALL_PREFIX={install_prefix}
ExecStart={python_interpreter_path} -m jupyterhub.app -f {jupyterhub_config_path}