From ce2c6e484f96f1ef3a4f6bb636206714dfcd8d34 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 5 Jun 2017 18:12:18 +0200 Subject: [PATCH] library/roles/shinyproxy/defaults/main.yml: New version. Add more configuration options, and the ability to list a number of additional apps. --- shinyproxy/defaults/main.yml | 6 +++++- shinyproxy/templates/shinyproxy-conf.yml.j2 | 19 +++++++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/shinyproxy/defaults/main.yml b/shinyproxy/defaults/main.yml index 82481917..a26a9716 100644 --- a/shinyproxy/defaults/main.yml +++ b/shinyproxy/defaults/main.yml @@ -1,6 +1,6 @@ --- shinyproxy_install: False -shinyproxy_version: 0.8.6 +shinyproxy_version: 0.9.2 shinyproxy_file_name: 'shinyproxy-{{ shinyproxy_version }}.jar' shinyproxy_url: 'https://www.shinyproxy.io/downloads/{{ shinyproxy_file_name }}' shinyproxy_app_name: shinyproxy.jar @@ -9,6 +9,10 @@ shinyproxy_install_dir: /opt/shinyproxy shinyproxy_http_port: 8080 # For logrotate. In days shinyproxy_log_retention: 10 +shinyproxy_default_apps: True +shinyproxy_docker_url: 'http://localhost:2375/' +shinyproxy_docker_host: 127.0.0.1 +shinyproxy_docker_port_range_start: 20000 shinyproxy_app_title: 'Open Analytics Shiny Proxy' shinyproxy_logo_url: 'http://www.openanalytics.eu/sites/www.openanalytics.eu/themes/oa/logo.png' diff --git a/shinyproxy/templates/shinyproxy-conf.yml.j2 b/shinyproxy/templates/shinyproxy-conf.yml.j2 index fa18096d..51b75ac7 100644 --- a/shinyproxy/templates/shinyproxy-conf.yml.j2 +++ b/shinyproxy/templates/shinyproxy-conf.yml.j2 @@ -5,7 +5,7 @@ shiny: landing-page: / heartbeat-rate: 10000 heartbeat-timeout: 60000 - port: 8080 + port: {{ shinyproxy_http_port }} authentication: {{ shinyproxy_authentication }} admin-groups: {{ shinyproxy_admin_group }} {% if shinyproxy_ldap_enabled %} @@ -29,10 +29,11 @@ shiny: # Docker configuration docker: cert-path: /home/none - url: http://localhost:2375 - host: 127.0.0.1 - port-range-start: 20000 + url: {{ shinyproxy_docker_url }} + host: {{ shinyproxy_docker_host }} + port-range-start: {{ shinyproxy_docker_port_range_start }} apps: +{% if shinyproxy_default_apps %} - name: 01_hello display-name: Hello Application description: Application which demonstrates the basics of a Shiny app @@ -43,6 +44,16 @@ shiny: docker-cmd: ["R", "-e shinyproxy::run_06_tabsets()"] docker-image: openanalytics/shinyproxy-demo groups: scientists +{% endif %} +{% if shinyproxy_apps is defined %} +{% for app in shinyproxy_apps %} + - name: {{ app.name }} + display-name: {{ app.display_name }} + description: {{ app.description }} + docker-cmd: ["R", "-e {{ app.cmd }}"] + docker-image: {{ app.docker_image }} +{% endfor %} +{% endif %} security: basic: