Commit fcb40b86 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

sofware/beremiz-ide: don't use websockify anymore

parent f48a06ec
...@@ -15,11 +15,11 @@ ...@@ -15,11 +15,11 @@
[instance] [instance]
filename = instance.cfg.in filename = instance.cfg.in
md5sum = db7fe97f4c6b84cfadb7b5c68eab517a md5sum = e8aae0fe3a8bc3f006b8638ed326bbcb
[template-instance-beremiz] [template-instance-beremiz]
filename = instance-beremiz.cfg.jinja2.in filename = instance-beremiz.cfg.jinja2.in
md5sum = 9d59c9392636ab71f37b43fd8008fd10 md5sum = 2b990148e527117bcfb366f8b700c807
[template-instance-beremiz-test] [template-instance-beremiz-test]
filename = instance-beremiz-test.cfg.jinja2.in filename = instance-beremiz-test.cfg.jinja2.in
...@@ -28,3 +28,7 @@ md5sum = a2fa2b9d3a225a1dd71db67bd4fea769 ...@@ -28,3 +28,7 @@ md5sum = a2fa2b9d3a225a1dd71db67bd4fea769
[template-fluxbox-menu.in] [template-fluxbox-menu.in]
filename = fluxbox-menu.in filename = fluxbox-menu.in
md5sum = 09560314eae0225b6085f8626f1a603a md5sum = 09560314eae0225b6085f8626f1a603a
[template-nginx_conf.in]
filename = nginx_conf.in
md5sum = 9ca886120a99befe25ca761ddc54753c
...@@ -27,35 +27,55 @@ stop-on-error = true ...@@ -27,35 +27,55 @@ stop-on-error = true
cert-file = ${directory:ssl}/beremiz.crt cert-file = ${directory:ssl}/beremiz.crt
key-file = ${directory:ssl}/beremiz.key key-file = ${directory:ssl}/beremiz.key
[novnc-instance] [nginx-tempdir]
recipe = slapos.cookbook:novnc recipe = slapos.cookbook:mkdirectory
path = ${directory:bin}/novnc tmp = ${buildout:directory}/tmp
client-body-temp-path = ${:tmp}/client_body_temp_path
proxy-temp-path = ${:tmp}/proxy_temp_path
fastcgi-temp-path = ${:tmp}/fastcgi_temp_path
uwsgi-temp-path = ${:tmp}/uwsgi_temp_path
scgi-temp-path = ${:tmp}/scgi_temp_path
[nginx-launcher]
recipe = slapos.cookbook:wrapper
command-line = {{ nginx_executable }} -c ${nginx-config:output}
wrapper-path = ${directory:services}/nginx
[nginx-config]
recipe = slapos.recipe.template:jinja2
url = {{ template_nginx }}
output = ${directory:etc}/nginx.conf
context =
section params nginx-params
section ca gen-certificate
section tempdir nginx-tempdir
raw docroot {{ novnc_location }}
raw mime {{ nginx_mime }}
[nginx-params]
path-pid = ${directory:run}/nginx.pid
path-error-log = ${directory:log}/nginx-error.log
path-access-log = ${directory:log}/nginx-access.log
ip = {{ ipv6 }} ip = {{ ipv6 }}
port = 6080 port = 6080
vnc-ip = {{ ipv4 }} websocket-ip = {{ ipv4 }}
vnc-port = ${x11vnc:port} websocket-port = ${x11vnc:port}
novnc-location = {{ novnc_location }} websocket-path = websockify
websockify-path = {{ websockify_bin }} nb-workers = 2
ssl-key-path = ${gen-certificate:key-file}
ssl-cert-path = ${gen-certificate:cert-file} [nginx-graceful]
recipe = slapos.recipe.template
[websockify-sighandler] output = ${directory:scripts}/nginx-graceful
recipe = slapos.cookbook:signalwrapper inline =
wrapper-path = ${directory:bin}/websockify-sighandler #!/bin/sh
wrapped-path = ${novnc-instance:path} exec kill -s SIGHUP $(cat ${nginx-params:path-pid})
[websockify-sighandler-service]
recipe = slapos.cookbook:wrapper
command-line = ${websockify-sighandler:wrapper-path}
wrapper-path = ${directory:services}/websockify
hash-existing-files = ${buildout:directory}/software_release/buildout.cfg
[novnc-promise] [novnc-promise]
<= monitor-promise-base <= monitor-promise-base
promise = check_socket_listening promise = check_socket_listening
name = novnc_promise.py name = novnc_promise.py
config-host = ${novnc-instance:ip} config-host = ${nginx-params:ip}
config-port = ${novnc-instance:port} config-port = ${nginx-params:port}
[x11vnc] [x11vnc]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
...@@ -216,7 +236,8 @@ recipe = slapos.cookbook:requestoptional ...@@ -216,7 +236,8 @@ recipe = slapos.cookbook:requestoptional
shared = true shared = true
config-https-only = True config-https-only = True
config-type = websocket config-type = websocket
config-url = https://[${novnc-instance:ip}]:${novnc-instance:port} config-url = https://[${nginx-params:ip}]:${nginx-params:port}
config-websocket-path-list = ${nginx-params:websocket-path}
return = secure_access domain return = secure_access domain
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
software-type = RootSoftwareInstance software-type = RootSoftwareInstance
...@@ -226,9 +247,8 @@ name = Beremiz VNC ...@@ -226,9 +247,8 @@ name = Beremiz VNC
[publish-connection-information] [publish-connection-information]
<= monitor-publish <= monitor-publish
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
backend-url = https://[${novnc-instance:ip}]:${novnc-instance:port}/vnc.html?host=[${novnc-instance:ip}]&port=${novnc-instance:port}&encrypt=1 backend-url = https://[${nginx-params:ip}]:${nginx-params:port}/vnc.html?encrypt=1&password=${random-password:passwd}
url = ${request-vnc-frontend:connection-secure_access}/vnc.html?host=${request-vnc-frontend:connection-domain}&port=443&encrypt=1 url = ${request-vnc-frontend:connection-secure_access}/vnc.html?encrypt=1&password=${random-password:passwd}
vnc-password = ${random-password:passwd}
[buildout] [buildout]
extends = extends =
...@@ -242,7 +262,8 @@ parts = ...@@ -242,7 +262,8 @@ parts =
xserver-promise xserver-promise
x11vnc-listen-promise x11vnc-listen-promise
beremiz-x11 beremiz-x11
websockify-sighandler-service nginx-launcher
nginx-graceful
request-vnc-frontend request-vnc-frontend
generate-vnc-password generate-vnc-password
publish-connection-information publish-connection-information
......
...@@ -34,6 +34,7 @@ context = ...@@ -34,6 +34,7 @@ context =
key computer_id slap-configuration:computer key computer_id slap-configuration:computer
raw bin_directory {{ bin_directory }} raw bin_directory {{ bin_directory }}
raw template_monitor {{ template_monitor_cfg }} raw template_monitor {{ template_monitor_cfg }}
raw template_nginx {{ template_nginx }}
raw template_logrotate {{ logrotate_cfg }} raw template_logrotate {{ logrotate_cfg }}
raw logrotate_cfg {{ logrotate_cfg }} raw logrotate_cfg {{ logrotate_cfg }}
raw python_bin {{ python_bin }} raw python_bin {{ python_bin }}
...@@ -62,9 +63,10 @@ extra-context = ...@@ -62,9 +63,10 @@ extra-context =
raw gtk3_location {{ gtk3_location }} raw gtk3_location {{ gtk3_location }}
raw matiec_location {{ matiec_location }} raw matiec_location {{ matiec_location }}
raw mesa_location {{ mesa_location }} raw mesa_location {{ mesa_location }}
raw nginx_executable {{ nginx_executable }}
raw nginx_mime {{ nginx_mime }}
raw novnc_location {{ novnc_location }} raw novnc_location {{ novnc_location }}
raw openssl_bin {{ openssl_location }}/bin/openssl raw openssl_bin {{ openssl_location }}/bin/openssl
raw websockify_bin {{ bin_directory }}/websockify
raw x11vnc_bin {{ x11vnc_location }}/bin/x11vnc raw x11vnc_bin {{ x11vnc_location }}/bin/x11vnc
raw xvfb_bin {{ xserver_location }}/bin/Xvfb raw xvfb_bin {{ xserver_location }}/bin/Xvfb
raw xterm_bin {{ xterm_location }}/bin/xterm raw xterm_bin {{ xterm_location }}/bin/xterm
......
worker_processes {{ params['nb-workers'] }};
pid {{ params['path-pid'] }};
error_log {{ params['path-error-log'] }};
daemon off;
events {
worker_connections 1024;
accept_mutex off;
}
http {
include {{ mime }};
default_type application/octet-stream;
types_hash_bucket_size 64;
access_log {{ params['path-access-log'] }} combined;
index novnc.html;
upstream vnc_proxy {
server {{ params['websocket-ip'] }}:{{ params['websocket-port'] }};
}
server {
listen [{{ params['ip'] }}]:{{ params['port'] }} ssl http2;
server_name _;
ssl_certificate {{ ca['cert-file'] }};
ssl_certificate_key {{ ca['key-file'] }};
ssl_session_timeout 1d;
ssl_session_cache shared:MozSSL:10m;
ssl_session_tickets off;
ssl_protocols TLSv1.3;
ssl_prefer_server_ciphers off;
keepalive_timeout 5;
client_body_temp_path {{ tempdir['client-body-temp-path'] }};
proxy_temp_path {{ tempdir['proxy-temp-path'] }};
fastcgi_temp_path {{ tempdir['fastcgi-temp-path'] }};
uwsgi_temp_path {{ tempdir['uwsgi-temp-path'] }};
scgi_temp_path {{ tempdir['scgi-temp-path'] }};
# path for static files
root {{ docroot }};
location /{{ params['websocket-path'] }} {
proxy_http_version 1.1;
proxy_pass http://vnc_proxy/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# VNC connection timeout
proxy_read_timeout 61s;
# Disable cache
proxy_buffering off;
}
}
}
...@@ -9,7 +9,6 @@ extends = ...@@ -9,7 +9,6 @@ extends =
../../component/noVNC/buildout.cfg ../../component/noVNC/buildout.cfg
../../component/nginx/buildout.cfg ../../component/nginx/buildout.cfg
../../component/lxml-python/buildout.cfg ../../component/lxml-python/buildout.cfg
../../component/numpy/buildout.cfg
../../component/numpy/openblas.cfg ../../component/numpy/openblas.cfg
../../component/matplotlib/buildout.cfg ../../component/matplotlib/buildout.cfg
../../component/wxpython/buildout.cfg ../../component/wxpython/buildout.cfg
...@@ -74,10 +73,8 @@ recipe = zc.recipe.egg ...@@ -74,10 +73,8 @@ recipe = zc.recipe.egg
eggs = eggs =
${wxPython:egg} ${wxPython:egg}
${python-cryptography:egg} ${python-cryptography:egg}
${lxml-python:egg}
${matplotlib:egg} ${matplotlib:egg}
future future
websockify
zeroconf2 zeroconf2
enum34 enum34
pyro pyro
...@@ -131,6 +128,7 @@ context = ...@@ -131,6 +128,7 @@ context =
key template_instance_beremiz template-instance-beremiz:target key template_instance_beremiz template-instance-beremiz:target
key template_instance_beremiz_test template-instance-beremiz-test:target key template_instance_beremiz_test template-instance-beremiz-test:target
key template_logrotate template-logrotate-base:output key template_logrotate template-logrotate-base:output
key template_nginx template-nginx_conf.in:target
key fontconfig_location fontconfig:location key fontconfig_location fontconfig:location
key font_dejavu dejavu-fonts:location key font_dejavu dejavu-fonts:location
key font_liberation liberation-fonts:location key font_liberation liberation-fonts:location
...@@ -144,6 +142,8 @@ context = ...@@ -144,6 +142,8 @@ context =
key instance_template_type :type key instance_template_type :type
key matiec_location matiec:location key matiec_location matiec:location
key mesa_location mesa:location key mesa_location mesa:location
key nginx_executable nginx-output:nginx
key nginx_mime nginx-output:mime
key novnc_location noVNC:location key novnc_location noVNC:location
key nxdtest_template nxdtest-instance.cfg:output key nxdtest_template nxdtest-instance.cfg:output
key python_bin :python-bin key python_bin :python-bin
...@@ -168,12 +168,15 @@ output = ${buildout:directory}/instance-beremiz-test.cfg.jinja2 ...@@ -168,12 +168,15 @@ output = ${buildout:directory}/instance-beremiz-test.cfg.jinja2
<= download-template <= download-template
output = ${buildout:directory}/fluxbox-menu.in output = ${buildout:directory}/fluxbox-menu.in
[template-nginx_conf.in]
<= download-template
output = ${buildout:directory}/nginx_conf.in
[versions] [versions]
Pillow = 6.2.2 Pillow = 6.2.2
matplotlib = 2.2.5 matplotlib = 2.2.5
kiwisolver = 1.1.0 kiwisolver = 1.1.0
cycler = 0.10.0 cycler = 0.10.0
websockify = 0.9.0
Pyro = 3.16 Pyro = 3.16
zeroconf2 = 0.19.2 zeroconf2 = 0.19.2
cython = 0.29.24 cython = 0.29.24
......
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