Commit 7b199c9c authored by Kirill Smelkov's avatar Kirill Smelkov

Jupyter: Switch to using JSON in instance parameters

The reason is: we are going to integrate Jupyter into ERP5 SR, and in
ERP5 SR code, there is already established infrastructure, which
requests slave instances. That infrastructure passes parameters in
serialized (= json) form, that's why we need to switch.

On the other hand, slapos.cookbook:slapconfiguration.serialised handles
non-json instance parameters as well: when there parameters format is
not

    {'_' -> <json>}

it decodes them as slapos.cookbook:slapconfiguration would do:

    https://lab.nexedi.com/nexedi/slapos/blob/69229988/slapos/recipe/slapconfiguration.py#L232
    https://lab.nexedi.com/nexedi/slapos/blob/69229988/slapos/recipe/librecipe/__init__.py#L51

So from this point of view, though we don't really need it here (Jupyter
SR is relatively new), we are staying backward compatible.

/cc @tiwariayush
parent df055066
...@@ -34,7 +34,7 @@ develop-eggs-directory = {{ develop_eggs_directory }} ...@@ -34,7 +34,7 @@ develop-eggs-directory = {{ develop_eggs_directory }}
offline = true offline = true
[slapconfiguration] [slapconfiguration]
recipe = slapos.cookbook:slapconfiguration recipe = slapos.cookbook:slapconfiguration.serialised
computer = ${slap-connection:computer-id} computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id} partition = ${slap-connection:partition-id}
url = ${slap-connection:server-url} url = ${slap-connection:server-url}
......
...@@ -60,7 +60,7 @@ recipe = slapos.recipe.template:jinja2 ...@@ -60,7 +60,7 @@ recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance.cfg.in template = ${:_profile_base_location_}/instance.cfg.in
rendered = ${buildout:directory}/template.cfg rendered = ${buildout:directory}/template.cfg
mode = 0644 mode = 0644
md5sum = 1a993b1f8fa3f001c45075fe95a48332 md5sum = 0186ead0c3596e847b69ff8040a43a2f
context = context =
key bin_directory buildout:bin-directory key bin_directory buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory key develop_eggs_directory buildout:develop-eggs-directory
......
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