forked from ISTI-ansible-roles/ansible-roles
106 lines
5.1 KiB
YAML
106 lines
5.1 KiB
YAML
|
---
|
||
|
- name: Install some packages needed to download the dataminer environment
|
||
|
apt: pkg={{ item }} state=present
|
||
|
with_items: '{{ dataminer_additional_packages }}'
|
||
|
when: dataminer_app_install
|
||
|
tags: [ 'tomcat', 'dataminer' ]
|
||
|
|
||
|
- name: Ensure that the maven configuration directory exists for the smartgears user
|
||
|
become: True
|
||
|
become_user: '{{ smartgears_user }}'
|
||
|
file: path={{ smartgears_user_home }}/.m2 state=directory mode=0755
|
||
|
when: dataminer_app_install
|
||
|
tags: [ 'tomcat', 'dataminer', 'wps' ]
|
||
|
|
||
|
- name: Create a directory where to install the pom file needed to download the dataminer jar
|
||
|
become: True
|
||
|
become_user: '{{ smartgears_user }}'
|
||
|
file: path={{ smartgears_user_home }}/.m2/dataminer state=directory mode=0755
|
||
|
when: dataminer_app_install
|
||
|
tags: [ 'tomcat', 'dataminer', 'wps' ]
|
||
|
|
||
|
- name: Install the maven configuration
|
||
|
become: True
|
||
|
become_user: '{{ smartgears_user }}'
|
||
|
template: src=maven-settings.xml.j2 dest={{ smartgears_user_home }}/.m2/settings.xml mode=0640
|
||
|
when: dataminer_app_install
|
||
|
tags: [ 'tomcat', 'dataminer', 'wps' ]
|
||
|
|
||
|
- name: Install a fake maven POM file to download the dataminer app dependencies
|
||
|
become: True
|
||
|
become_user: '{{ smartgears_user }}'
|
||
|
template: src=pom.xml.j2 dest={{ smartgears_user_home }}/.m2/pom.xml mode=0640
|
||
|
when: dataminer_app_install
|
||
|
tags: [ 'tomcat', 'dataminer', 'wps' ]
|
||
|
|
||
|
- name: Install a fake maven POM file to download the dataminer jar
|
||
|
become: True
|
||
|
become_user: '{{ smartgears_user }}'
|
||
|
template: src=dataminer-pom.xml.j2 dest={{ smartgears_user_home }}/.m2/dataminer/pom.xml mode=0640
|
||
|
when: dataminer_app_install
|
||
|
tags: [ 'tomcat', 'dataminer', 'wps' ]
|
||
|
|
||
|
- name: Install the rapidminer-custom jar
|
||
|
become: True
|
||
|
become_user: '{{ smartgears_user }}'
|
||
|
shell: mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:copy -Dartifact=rapidminer-custom:52n-wps-server:3.3.2 -DoutputDirectory={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/WEB-INF/lib
|
||
|
args:
|
||
|
creates: '{{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/WEB-INF/lib/52n-wps-server-3.3.2.jar'
|
||
|
notify: Restart smartgears
|
||
|
when: dataminer_app_install
|
||
|
tags: [ 'tomcat', 'dataminer', 'wps' ]
|
||
|
|
||
|
- name: Install the org.gcube.dataanalysis dataminer jar
|
||
|
become: True
|
||
|
become_user: '{{ smartgears_user }}'
|
||
|
shell: cd {{ smartgears_user_home }}/.m2/dataminer ; mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:copy -Dartifact=org.gcube.dataanalysis:dataminer:{{ dataminer_dataminer_jar_version }} -DoutputDirectory={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/WEB-INF/lib
|
||
|
args:
|
||
|
creates: '{{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/WEB-INF/lib/dataminer-{{ dataminer_dataminer_jar_version }}.jar'
|
||
|
notify: Restart smartgears
|
||
|
when: dataminer_app_install
|
||
|
tags: [ 'tomcat', 'dataminer', 'wps' ]
|
||
|
|
||
|
- name: Install the org.gcube.dataanalysis dataminer jar dependencies
|
||
|
become: True
|
||
|
become_user: '{{ smartgears_user }}'
|
||
|
shell: cd {{ smartgears_user_home }}/.m2 ; mvn -DexcludeScope=provided org.apache.maven.plugins:maven-dependency-plugin:2.8:copy-dependencies -Dartifact=org.gcube.dataanalysis:dataminer:{{ dataminer_dataminer_jar_version }} -DoutputDirectory={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/WEB-INF/lib
|
||
|
args:
|
||
|
creates: '{{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/WEB-INF/lib/ecological-engine-1.8.6-3.9.0.jar'
|
||
|
notify: Restart smartgears
|
||
|
when: dataminer_app_install
|
||
|
tags: [ 'tomcat', 'dataminer', 'wps' ]
|
||
|
|
||
|
- name: Remove the unwanted jars from the 52 north webapp distribution and from the org.gcube.dataanalysis dataminer dependencies
|
||
|
become: True
|
||
|
become_user: '{{ smartgears_user }}'
|
||
|
file: dest={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/WEB-INF/lib/{{ item }} state=absent
|
||
|
with_items: '{{ dataminer_jars_to_remove }}'
|
||
|
notify: Restart smartgears
|
||
|
when: dataminer_app_install
|
||
|
tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_deps_cleanup' ]
|
||
|
|
||
|
- name: Download the ecocfg config from subversion
|
||
|
become: True
|
||
|
become_user: '{{ smartgears_user }}'
|
||
|
subversion: repo={{ dataminer_ecocfg_svn_repo }} dest={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/ecocfg force=yes
|
||
|
notify: Restart smartgears
|
||
|
when: dataminer_app_install
|
||
|
tags: [ 'tomcat', 'dataminer', 'wps' ]
|
||
|
|
||
|
- name: Download the ecocfg parallel processing libraries from subversion
|
||
|
become: True
|
||
|
become_user: '{{ smartgears_user }}'
|
||
|
subversion: repo={{ dataminer_ecocfg_parallelproc_svn_repo }} dest={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/ecocfg/PARALLEL_PROCESSING force=yes
|
||
|
notify: Restart smartgears
|
||
|
when: dataminer_app_install
|
||
|
tags: [ 'tomcat', 'dataminer', 'wps' ]
|
||
|
|
||
|
- name: Install the wps config file
|
||
|
become: True
|
||
|
become_user: '{{ smartgears_user }}'
|
||
|
template: src=wps_config.xml.j2 dest={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/config/wps_config.xml mode=0444
|
||
|
notify: Restart smartgears
|
||
|
when: dataminer_app_install
|
||
|
tags: [ 'tomcat', 'dataminer', 'wps' ]
|
||
|
|