library/roles/shinyproxy: Fix the startup script so that it can read the custom configuration now. Install a custom configuration.

This commit is contained in:
Andrea Dell'Amico 2017-03-31 21:23:36 +02:00
parent 07a8832789
commit 0fcfb566a6
5 changed files with 64 additions and 1 deletions

View File

@ -7,3 +7,14 @@ shinyproxy_app_name: shinyproxy.jar
shinyproxy_user: shinyproxy
shinyproxy_install_dir: /opt/shinyproxy
shinyproxy_http_port: 8080
shinyproxy_app_title: 'Open Analytics Shiny Proxy'
shinyproxy_logo_url: 'http://www.openanalytics.eu/sites/www.openanalytics.eu/themes/oa/logo.png'
shinyproxy_authentication: ldap
shinyproxy_admin_group: ''
shinyproxy_ldap_server: 'ldap://ldap.forumsys.com:389/dc=example,dc=com'
shinyproxy_ldap_admin: cn=read-only-admin,dc=example,dc=com
shinyproxy_ldap_admin_pwd: password
shinyproxy_user_dn_pattern: 'uid={0}'
shinyproxy_group_search_base: ''
shinyproxy_group_search_filter: '(uniqueMember={0})'

View File

@ -0,0 +1,3 @@
---
- name: Restart shinyproxy
service: name=shinyproxy state=restarted

View File

@ -17,6 +17,11 @@
template: src=upstart-shinyproxy.conf.j2 dest=/etc/init/shinyproxy.conf owner=root group=root mode=0644
when: is_trusty
- name: Install the shinyproxy configuration file
template: src=shinyproxy-conf.yml.j2 dest={{ shinyproxy_install_dir }}/application.yml owner=root group={{ shinyproxy_user }} mode=0640
notify: Restart shinyproxy
tags: [ 'shinyproxy', 'shinyproxy_conf' ]
- name: Ensure that the shinyproxy service is enabled and running
service: name=shinyproxy state=started enabled=yes

View File

@ -0,0 +1,40 @@
shiny:
proxy:
title: {{ shinyproxy_app_title }}
logo-url: {{ shinyproxy_logo_url }}
landing-page: /
heartbeat-rate: 10000
heartbeat-timeout: 60000
port: 8080
authentication: {{ shinyproxy_authentication }}
admin-groups: {{ shinyproxy_admin_group }}
# LDAP configuration
ldap:
url: {{ shinyproxy_ldap_server }}
user-dn-pattern: {{ shinyproxy_user_dn_pattern }}
group-search-base: {{ shinyproxy_group_search_base }}
group-search-filter: {{ shinyproxy_group_search_filter }}
manager-dn: {{ shinyproxy_ldap_admin }}
manager-password: {{ shinyproxy_ldap_admin_pwd }}
# Docker configuration
docker:
cert-path: /home/none
url: http://localhost:2375
host: 127.0.0.1
port-range-start: 20000
apps:
- name: 01_hello
display-name: Hello Application
description: Application which demonstrates the basics of a Shiny app
docker-cmd: ["R", "-e shinyproxy::run_01_hello()"]
docker-image: openanalytics/shinyproxy-demo
groups: scientists, mathematicians
- name: 06_tabsets
docker-cmd: ["R", "-e shinyproxy::run_06_tabsets()"]
docker-image: openanalytics/shinyproxy-demo
groups: scientists
logging:
file:
shinyproxy.log

View File

@ -10,4 +10,8 @@ respawn limit 10 5
setuid {{ shinyproxy_user }}
setgid {{ shinyproxy_user }}
exec java -jar {{ shinyproxy_install_dir }}/{{ shinyproxy_app_name }}
script
cd {{ shinyproxy_install_dir }}
exec java -jar ./{{ shinyproxy_app_name }}
end script