Commit 9b0e8316 authored by Levin Zimmermann's avatar Levin Zimmermann

stack/erp5: Make erp5 jupyter kernel accessible from zope

See merge request !1217
parents 6c6c12e6 706f3900
...@@ -149,7 +149,6 @@ link-binary = ...@@ -149,7 +149,6 @@ link-binary =
[template-run-zelenium] [template-run-zelenium]
< = download-base < = download-base
[template] [template]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe # XXX: "template.cfg" is hardcoded in instanciation recipe
...@@ -229,6 +228,11 @@ context = ...@@ -229,6 +228,11 @@ context =
key unixodbc_location unixodbc:location key unixodbc_location unixodbc:location
key wget_location wget:location key wget_location wget:location
key extra_path_list eggs:extra-paths key extra_path_list eggs:extra-paths
key python_executable_for_kernel erp5-python-interpreter-jupyter:interpreter_path
key erp5_kernel_location erp5-kernel:location
key erp5_kernel_filename erp5-kernel:filename
key kernel_json_location kernel-json:location
key kernel_json_filename kernel-json:filename
[template-erp5] [template-erp5]
<= download-base <= download-base
...@@ -392,6 +396,18 @@ initialization = ...@@ -392,6 +396,18 @@ initialization =
eggs += ${eggs:eggs} eggs += ${eggs:eggs}
extra-paths += ${eggs:extra-paths} extra-paths += ${eggs:extra-paths}
[erp5-python-interpreter-jupyter]
<= erp5-python-interpreter
interpreter = pythonwitheggs_jupyter
interpreter_path = ${buildout:directory}/bin/${:interpreter}
eggs +=
jupyter_client
jupyter_core
ipython_genutils
ipykernel
ipywidgets
requests
[zope-product-with-eggtestinfo] [zope-product-with-eggtestinfo]
recipe = zc.recipe.egg:custom recipe = zc.recipe.egg:custom
setup-eggs = setup-eggs =
......
...@@ -70,7 +70,7 @@ md5sum = b95084ae9eed95a68eada45e28ef0c04 ...@@ -70,7 +70,7 @@ md5sum = b95084ae9eed95a68eada45e28ef0c04
[template] [template]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 9a7f7888ba4183c9d900e862074f3baf md5sum = 5747c487edd721d8a53061392307b55f
[template-erp5] [template-erp5]
filename = instance-erp5.cfg.in filename = instance-erp5.cfg.in
...@@ -86,7 +86,7 @@ md5sum = 0ac4b74436f554cd677f19275d18d880 ...@@ -86,7 +86,7 @@ md5sum = 0ac4b74436f554cd677f19275d18d880
[template-zope] [template-zope]
filename = instance-zope.cfg.in filename = instance-zope.cfg.in
md5sum = c3e3f8cd985407931b705d15bdedc8d9 md5sum = 57a19c90d281b8cbf3e36207db48f0bd
[template-balancer] [template-balancer]
filename = instance-balancer.cfg.in filename = instance-balancer.cfg.in
......
...@@ -53,6 +53,22 @@ partition. No more (undefined result), no less (IndexError). ...@@ -53,6 +53,22 @@ partition. No more (undefined result), no less (IndexError).
[jinja2-template-base] [jinja2-template-base]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
[erp5-kernel]
recipe = slapos.cookbook:symbolic.link
link-binary = {{ parameter_dict['erp5-kernel-location'] }}/{{ parameter_dict['erp5-kernel-filename'] }}
target-directory = ${directory:erp5-kernel-dir}
[kernel-json-dir]
<= jinja2-template-base
template = {{ parameter_dict['kernel-json-location'] }}/{{ parameter_dict['kernel-json-filename'] }}
rendered = ${directory:erp5-kernel-dir}/kernel.json
context =
raw erp5_url {{ ipv4 }}
raw python_executable {{ parameter_dict['python-executable-for-kernel'] }}
raw kernel_dir ${erp5-kernel:target-directory}/{{ parameter_dict['erp5-kernel-filename'] }}
raw display_name ERP5
raw language_name python
[run-common] [run-common]
<= userhosts-wrapper-base <= userhosts-wrapper-base
environment-extra = environment-extra =
...@@ -66,6 +82,9 @@ environment += ...@@ -66,6 +82,9 @@ environment +=
INSTANCE_HOME=${:instance-home} INSTANCE_HOME=${:instance-home}
CAUCASE={{ slapparameter_dict['caucase-url'] }} CAUCASE={{ slapparameter_dict['caucase-url'] }}
FONTCONFIG_FILE=${fontconfig-conf:output} FONTCONFIG_FILE=${fontconfig-conf:output}
JUPYTER_PATH=${directory:jupyter-dir}
JUPYTER_CONFIG_DIR=${directory:jupyter-config-dir}
JUPYTER_RUNTIME_DIR=${directory:jupyter-runtime-dir}
{% if slapparameter_dict.get('wendelin-core-zblk-fmt') %} {% if slapparameter_dict.get('wendelin-core-zblk-fmt') %}
WENDELIN_CORE_ZBLK_FMT={{ slapparameter_dict['wendelin-core-zblk-fmt'] }} WENDELIN_CORE_ZBLK_FMT={{ slapparameter_dict['wendelin-core-zblk-fmt'] }}
{% endif %} {% endif %}
...@@ -103,6 +122,11 @@ var = ${buildout:directory}/var ...@@ -103,6 +122,11 @@ var = ${buildout:directory}/var
plugin = ${:etc}/plugin plugin = ${:etc}/plugin
unit-test-path = ${:srv}/test-instance/unit_test unit-test-path = ${:srv}/test-instance/unit_test
fontconfig-cache = ${buildout:directory}/.fontconfig fontconfig-cache = ${buildout:directory}/.fontconfig
jupyter-dir = ${buildout:directory}/jupyter
jupyter-config-dir = ${:jupyter-dir}/etc
jupyter-runtime-dir = ${:jupyter-dir}/runtime
jupyter-kernel-dir = ${:jupyter-dir}/kernels
erp5-kernel-dir = ${:jupyter-kernel-dir}/ERP5
[fontconfig-conf] [fontconfig-conf]
recipe = slapos.recipe.template:jinja2 recipe = slapos.recipe.template:jinja2
...@@ -575,3 +599,5 @@ extends = ...@@ -575,3 +599,5 @@ extends =
parts += parts +=
{{ '\n '.join(part_list) }} {{ '\n '.join(part_list) }}
publish publish
erp5-kernel
kernel-json-dir
...@@ -114,6 +114,11 @@ extra-path-list = {{ dumps(extra_path_list) }} ...@@ -114,6 +114,11 @@ extra-path-list = {{ dumps(extra_path_list) }}
matplotlibrc = {{ matplotlibrc_location }} matplotlibrc = {{ matplotlibrc_location }}
erp5-location = {{ erp5_location }} erp5-location = {{ erp5_location }}
egg-interpreter = {{egg_interpreter}} egg-interpreter = {{egg_interpreter}}
erp5-kernel-location = {{ erp5_kernel_location }}
erp5-kernel-filename = {{ erp5_kernel_filename }}
kernel-json-location = {{ kernel_json_location }}
kernel-json-filename = {{ kernel_json_filename }}
python-executable-for-kernel = {{ python_executable_for_kernel }}
[dynamic-template-zope] [dynamic-template-zope]
<= jinja2-template-base <= jinja2-template-base
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment