-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #670 from OpenSourceBrain/release/0.6.0
Release/0.6.0
- Loading branch information
Showing
69 changed files
with
2,561 additions
and
446 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule kubespawner
added at
8942af
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM jupyter/base-notebook:hub-1.4.2 | ||
|
||
COPY hub/jupyter_notebook_config.py /etc/jupyter/jupyter_notebook_config.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
harness: | ||
subdomain: notebooks | ||
service: | ||
auto: false | ||
port: 80 | ||
name: proxy-public | ||
deployment: | ||
auto: false | ||
dependencies: | ||
build: | ||
- cloudharness-base | ||
hard: | ||
- jupyterhub | ||
jupyterhub: | ||
args: ["--debug", "--NotebookApp.default_url=/lab", "--NotebookApp.notebook_dir=/opt/workspace"] | ||
applicationHook: "osb_jupyter.change_pod_manifest" | ||
extraConfig: | ||
timing: | | ||
c.Spawner.port = 8000 | ||
c.Spawner.http_timeout = 300 | ||
c.Spawner.start_timeout = 300 | ||
c.JupyterHub.tornado_settings = { "headers": { "Content-Security-Policy": "frame-ancestors 'self' localhost:3000 *.osb.local osb.local localhost *.metacell.us *.opensourcebrain.org"}} | ||
66 changes: 66 additions & 0 deletions
66
applications/jupyterlab-minimal/hub/jupyter_notebook_config.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Copyright (c) Jupyter Development Team. | ||
# Distributed under the terms of the Modified BSD License. | ||
|
||
from jupyter_core.paths import jupyter_data_dir | ||
import subprocess | ||
import os | ||
import errno | ||
import stat | ||
|
||
c = get_config() | ||
c.NotebookApp.ip = '0.0.0.0' | ||
c.NotebookApp.port = 8888 | ||
c.NotebookApp.open_browser = False | ||
|
||
# https://github.com/jupyter/notebook/issues/3130 | ||
c.FileContentsManager.delete_to_trash = False | ||
|
||
print('*'*80) | ||
import notebook | ||
print(c.NotebookApp.tornado_settings) | ||
c.NotebookApp.tornado_settings = { | ||
'headers': { | ||
'Content-Security-Policy': "frame-ancestors 'self' localhost:3000 localhost *.osb.local *.opensourcebrain.org", | ||
} | ||
} | ||
print(c.NotebookApp.tornado_settings) | ||
print('*'*80) | ||
|
||
# Generate a self-signed certificate | ||
if 'GEN_CERT' in os.environ: | ||
dir_name = jupyter_data_dir() | ||
pem_file = os.path.join(dir_name, 'notebook.pem') | ||
try: | ||
os.makedirs(dir_name) | ||
except OSError as exc: # Python >2.5 | ||
if exc.errno == errno.EEXIST and os.path.isdir(dir_name): | ||
pass | ||
else: | ||
raise | ||
|
||
# Generate an openssl.cnf file to set the distinguished name | ||
cnf_file = os.path.join(os.getenv('CONDA_DIR', '/usr/lib'), 'ssl', 'openssl.cnf') | ||
if not os.path.isfile(cnf_file): | ||
with open(cnf_file, 'w') as fh: | ||
fh.write('''\ | ||
[req] | ||
distinguished_name = req_distinguished_name | ||
[req_distinguished_name] | ||
''') | ||
|
||
# Generate a certificate if one doesn't exist on disk | ||
subprocess.check_call(['openssl', 'req', '-new', | ||
'-newkey', 'rsa:2048', | ||
'-days', '365', | ||
'-nodes', '-x509', | ||
'-subj', '/C=XX/ST=XX/L=XX/O=generated/CN=generated', | ||
'-keyout', pem_file, | ||
'-out', pem_file]) | ||
# Restrict access to the file | ||
os.chmod(pem_file, stat.S_IRUSR | stat.S_IWUSR) | ||
c.NotebookApp.certfile = pem_file | ||
|
||
# Change default umask for all subprocesses of the notebook server if set in | ||
# the environment | ||
if 'NB_UMASK' in os.environ: | ||
os.umask(int(os.environ['NB_UMASK'], 8)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.