forked from ISTI-ansible-roles/ansible-roles
library/roles/smartgears/sharelatex_connector: connector to link sharelatex to the portal ldap server.
This commit is contained in:
parent
fe35bffb24
commit
020fea5444
|
@ -0,0 +1,10 @@
|
||||||
|
---
|
||||||
|
sharelatex_connector_install: False
|
||||||
|
sharelatex_connector_version: 1.0.0
|
||||||
|
#sharelatex_connector_version: latest
|
||||||
|
sharelatex_connector_name: sharelatex-connector
|
||||||
|
sharelatex_connector_group_id: org.gcube.data.access
|
||||||
|
sharelatex_connector_extension: war
|
||||||
|
sharelatex_connector_file: '{{ sharelatex_connector_name }}-{{ sharelatex_connector_version }}.{{ sharelatex_connector_extension }}'
|
||||||
|
sharelatex_connector_repository_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}'
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
- block:
|
||||||
|
- name: Remove the old sharelatex-connector files
|
||||||
|
file: path={{ smartgears_instance_path }}/webapps/{{ sharelatex_connector_name }} state=absent
|
||||||
|
|
||||||
|
become: True
|
||||||
|
become_user: '{{ d4science_user }}'
|
||||||
|
when: ( not sharelatex_connector_install ) or ( smartgears_upgrade )
|
||||||
|
tags: [ 'smartgears', 'sharelatex_connector', 'tomcat' ]
|
||||||
|
|
||||||
|
- block:
|
||||||
|
# NOTE: Install as the smartgears user so we do not mess with the permissions
|
||||||
|
- name: Get the sharelatex-connector war
|
||||||
|
maven_artifact: artifact_id={{ sharelatex_connector_name }} version={{ sharelatex_connector_version | default(omit) }} group_id={{ sharelatex_connector_group_id }} extension={{ sharelatex_connector_extension | default('war') }} repository_url={{ sharelatex_connector_repository_url }} dest={{ smartgears_user_home }}/{{ sharelatex_connector_file }}
|
||||||
|
|
||||||
|
- name: Create the data trasfer working directory
|
||||||
|
file: path={{ smartgears_instance_path }}/webapps/{{ sharelatex_connector_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||||
|
|
||||||
|
- name: Unarchive the sharelatex_connector war
|
||||||
|
unarchive: copy=no src={{ smartgears_user_home }}/{{ sharelatex_connector_file }} dest={{ smartgears_instance_path }}/webapps/{{ sharelatex_connector_name }} creates={{ smartgears_instance_path }}/webapps/{{ sharelatex_connector_name }}/WEB-INF/lib
|
||||||
|
notify: Restart smartgears
|
||||||
|
|
||||||
|
- name: Set the sharelatex-connector properties
|
||||||
|
template: src=sharelatex-web.xml.j2 dest={{ smartgears_instance_path }}/webapps/{{ sharelatex_connector_name }}/WEB-INF/web.xml
|
||||||
|
|
||||||
|
become: True
|
||||||
|
become_user: '{{ d4science_user }}'
|
||||||
|
when: sharelatex_connector_install
|
||||||
|
tags: [ 'smartgears', 'sharelatex_connector', 'tomcat' ]
|
|
@ -0,0 +1,37 @@
|
||||||
|
<web-app>
|
||||||
|
<context-param>
|
||||||
|
<param-name>internalLoginUrl</param-name>
|
||||||
|
<param-value>http://localhost:{{ sharelatex_container_public_port }}/login</param-value>
|
||||||
|
</context-param>
|
||||||
|
<context-param>
|
||||||
|
<param-name>hostName</param-name>
|
||||||
|
<param-value>{{ sharelatex.d4science.org }}</param-value>
|
||||||
|
</context-param>
|
||||||
|
<context-param>
|
||||||
|
<param-name>mongoHost</param-name>
|
||||||
|
<param-value>{{ sharelatex_mongodb_host }}</param-value>
|
||||||
|
</context-param>
|
||||||
|
<context-param>
|
||||||
|
<param-name>mongoPort</param-name>
|
||||||
|
<param-value>27017</param-value>
|
||||||
|
</context-param>
|
||||||
|
<context-param>
|
||||||
|
<param-name>mongoDatabaseName</param-name>
|
||||||
|
<param-value>{{ sharelatex_mongodb_db }}</param-value>
|
||||||
|
</context-param>
|
||||||
|
<!-- <context-param>
|
||||||
|
<param-name>mongoLogin</param-name>
|
||||||
|
<param-value></param-value>
|
||||||
|
</context-param>
|
||||||
|
<context-param>
|
||||||
|
<param-name>mongoPwd</param-name>
|
||||||
|
<param-value></param-value>
|
||||||
|
</context-param> -->
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>org.gcube.data.access.sharelatex.connector.Connector</servlet-name>
|
||||||
|
</servlet>
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>org.gcube.data.access.sharelatex.connector.Connector</servlet-name>
|
||||||
|
<url-pattern>/gcube/service/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
</web-app>
|
Loading…
Reference in New Issue