• Kirill Smelkov's avatar
    ERP5 and Jupyter integrated together · 0a446263
    Kirill Smelkov authored
    This patch teaches ERP5 software release to automatically instantiate Jupyter
    notebook web UI and tune it to connect to ERP5 by default. When Jupyter is
    enabled, it also installs on-server erp5_data_notebook bt5 (nexedi/erp5!29)
    which handles code execution requested for Jupyter.
    
    For ERP5 - for security and backward compatibility reasons - Jupyter
    instantiation and erp5_data_notebook bt5 install happen only if jupyter is
    explicitly enabled in instance parameters. The default is not to have Jupyter
    out of the box.
    
    On the other hand for Wendelin SR, which inherits from ERP5 SR, the
    default is to have Jupyter out of the box, because Wendelin SR is fresh
    enough without lots of backward compatibility needs, and Jupyter is
    usually very handy for people who use Wendelin.
    
    ~~~~
    
    For integration, we reuse already established in ERP5 infrastructure, to
    request various slave instances, and request Jupyter in a way so it
    automatically tunes and connects to balancer of one of Zope family.
    
    Jupyter code itself is compiled by reusing
    software/ipython_notebook/software.cfg, and Jupyter instance code is
    reused by hooking software/ipython_notebook/instance.cfg.in into ERP5 SR
    properly (the idea to override instance-jupyter not to render into
    default template.cfg is taken from previous work by @tiwariayush).
    
    ~~~~
    
    I tested this patch inside webrunner with create-erp5-site software type and
    various configurations (whether to have or not have jupyter, to which zope
    family to connect it, etc).
    
    I have not tested frontend instantiation fully - because tests were done only
    in webrunner, but I've tried to make sure generated buildout code is valid for
    cases with frontend.
    
    NOTE the code in this patch depends erp5_data_notebook bt5 (nexedi/erp5!29) which just got merged to erp5.git recently (see nexedi/erp5@f662b5a2)
    
    NOTE even when erp5_data_notebook bt5 is installed, on a freshly installed ERP5, it
    is required to "check site consistency" first, so that initial bt5(s) are
    actually installed and erp5 is ready to function.
    
    /cc @vpelletier, @Tyagov, @klaus, @Camata, @tiwariayush, @Kreisel, @jerome, @nexedi
    /proposed-for-review-on nexedi/slapos!43
    0a446263
instance.cfg.in 5.14 KB