From fab98c012b87c4bfbea4edbe17555df7c8c47251 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 6 Jan 2022 19:24:07 +0100 Subject: [PATCH] Version 2.6.0. New config options. --- defaults/main.yml | 11 ++++++++++- templates/shinyproxy-2-conf.yml.j2 | 25 +++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index f62ec48..6510037 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -3,13 +3,14 @@ shinyproxy_install: True shinyproxy_as_docker_service: False shinyproxy_major_ver: 2 -shinyproxy_minor_ver: 5 +shinyproxy_minor_ver: 6 shinyproxy_patch_ver: 0 shinyproxy_version: '{{ shinyproxy_major_ver }}.{{ shinyproxy_minor_ver }}.{{ shinyproxy_patch_ver }}' shinyproxy_file_name: 'shinyproxy-{{ shinyproxy_version }}.jar' shinyproxy_url: 'https://www.shinyproxy.io/downloads/{{ shinyproxy_file_name }}' shinyproxy_app_name: shinyproxy.jar shinyproxy_user: shinyproxy +shinyproxy_spring_name: "ShinyProxy" shinyproxy_landing_page: '/' shinyproxy_install_dir: /opt/shinyproxy shinyproxy_conf_dir: '{{ shinyproxy_install_dir }}' @@ -19,6 +20,14 @@ shinyproxy_http_port: 8080 shinyproxy_docker_http_port_mode: 'ingress' shinyproxy_heartbeat_rate: 10000 shinyproxy_heartbeat_timeout: 60000 +# None, Confirm, Auto +shinyproxy_default_websocket_reconnection_mode: 'Auto' +shinyproxy_stop_proxies_on_shutdown: 'false' +shinyproxy_recover_running_proxies: 'true' +shinyproxy_recover_running_proxies_from_different_config: 'true' +shinyproxy_default_stop_proxy_on_logout: 'true' +# max lifetime, in minutes +shinyproxy_default_proxy_max_lifetime: 60 shinyproxy_undertow_loglevel: 'INFO' shinyproxy_prometheus_port: 9090 shinyproxy_expose_prometheus: True diff --git a/templates/shinyproxy-2-conf.yml.j2 b/templates/shinyproxy-2-conf.yml.j2 index dad0e46..90aaa91 100644 --- a/templates/shinyproxy-2-conf.yml.j2 +++ b/templates/shinyproxy-2-conf.yml.j2 @@ -14,6 +14,14 @@ proxy: heartbeat-rate: {{ shinyproxy_heartbeat_rate }} heartbeat-timeout: {{ shinyproxy_heartbeat_timeout }} container-wait-time: {{ shinyproxy_container_wait_time }} +{% if shinyproxy_version is version_compare('2.6.0', '>=') %} + default-webSocket-reconnection-mode: {{ shinyproxy_default_websocket_reconnection_mode }} + stop-proxies-on-shutdown: {{ shinyproxy_stop_proxies_on_shutdown }} + recover-running-proxies: {{ shinyproxy_recover_running_proxies }} + recover-running-proxies-from-different-config: {{ shinyproxy_recover_running_proxies_from_different_config }} + default-stop-proxy-on-logout: {{ shinyproxy_default_stop_proxy_on_logout }} + default-proxy-max-lifetime: {{ shinyproxy_default_proxy_max_lifetime }} +{% endif %} {% if shinyproxy_container_backend == 'docker-swarm' %} bind-address: 0.0.0.0 {% else %} @@ -82,7 +90,14 @@ proxy: container-cmd: ["R", "-e {{ app.cmd }}"] container-image: {{ app.docker_image }} container-memory: {{ app.docker_memory | default('2g') }} - {% if shinyproxy_as_docker_service %} +{% if shinyproxy_version is version_compare('2.6.0', '>=') %} + + stop-on-logout: {{ app.stop_on_logout | default('true') }} + max-lifetime: {{ app.max-lifetime | default(shinyproxy_default_proxy_max_lifetime) }} + +{% endif %} + +{% if shinyproxy_as_docker_service %} {% if shinyproxy_container_backend == 'docker-swarm' %} container-network: {{ shinyproxy_as_docker_stack_name }}_{{ shinyproxy_docker_network }} @@ -113,7 +128,13 @@ management: prometheus: enabled: true {% endif %} - + +{% if shinyproxy_version is version_compare('2.6.0', '>=') %} +spring: + application: + name: {{ shinyproxy_spring_name }} +{% endif %} + logging: file: {{ shinyproxy_log_dir }}/shinyproxy.log #max-size: {{ shinyproxy_max_log_size }}