library/roles/smartgears/dataminer_app: The war and zip versions of dataminer need to cohesist for the time being.

This commit is contained in:
Andrea Dell'Amico 2017-05-12 13:24:01 +02:00
parent 660341fd56
commit 766a276cc2
4 changed files with 39 additions and 4 deletions

View File

@ -2,6 +2,12 @@
dataminer_app_install: False dataminer_app_install: False
dataminer_app_upgrade: False dataminer_app_upgrade: False
# ZIP file
dataminer_product: prod
-dataminer_zip_url: 'http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-analysis/DataMinerConfiguration/webapp/{{ dataminer_product }}/wps.zip'
# Install from WAR
dataminer_war_install: False
dataminer_wps_version: latest dataminer_wps_version: latest
dataminer_wps_name: wps dataminer_wps_name: wps
dataminer_wps_group_id: org.gcube.data-analysis dataminer_wps_group_id: org.gcube.data-analysis
@ -9,4 +15,5 @@ dataminer_wps_extension: war
dataminer_wps_file: '{{ dataminer_wps_name }}-{{ dataminer_wps_version }}.{{ dataminer_wps_extension }}' dataminer_wps_file: '{{ dataminer_wps_name }}-{{ dataminer_wps_version }}.{{ dataminer_wps_extension }}'
dataminer_wps_repository_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}' dataminer_wps_repository_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}'
dataminer_wps_algorithms_svn: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-analysis/DataMinerConfiguration/algorithms/ dataminer_wps_algorithms_svn: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-analysis/DataMinerConfiguration/algorithms/
dataminer_data_file_from_thredds: 'http://thredds.d4science.org/thredds/fileServer/public/netcdf/gebco_08_OCEANS_CLIMATOLOGY_METEOROLOGY_ATMOSPHERE_.nc' dataminer_data_file_from_thredds: 'http://thredds.d4science.org/thredds/fileServer/public/netcdf/gebco_08_OCEANS_CLIMATOLOGY_METEOROLOGY_ATMOSPHERE_.nc'

View File

@ -16,10 +16,6 @@
- name: Download the WPS algorithms from subversion - name: Download the WPS algorithms from subversion
subversion: repo={{ dataminer_wps_algorithms_svn }} dest={{ smartgears_user_home }}/wps_algorithms/algorithms checkout=yes force=yes update=yes subversion: repo={{ dataminer_wps_algorithms_svn }} dest={{ smartgears_user_home }}/wps_algorithms/algorithms checkout=yes force=yes update=yes
- name: TEMPORARY copy the dataminer algorithms into the WPS WEB-INF/lib
shell: cp -a {{ smartgears_user_home }}/wps_algorithms/algorithms/*.jar {{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/WEB-INF/lib/
when: dataminer_wps_copy_algorithms is defined and dataminer_wps_copy_algorithms
- name: Create a directory where to install the gebco_08.nc data file - name: Create a directory where to install the gebco_08.nc data file
file: path={{ smartgears_user_home }}/data state=directory file: path={{ smartgears_user_home }}/data state=directory

View File

@ -0,0 +1,29 @@
---
- block:
- name: Get and unpack the dataminer application
unarchive: src={{ dataminer_zip_url }} dest={{ smartgears_instance_path }}/webapps copy=no creates={{ smartgears_instance_path }}/webapps/wps/config/wps_config.xml
- name: Create a directory where to install the gebco_08.nc data file
file: path={{ smartgears_user_home }}/data state=directory
- name: Install the gebco_08.nc file from thredds. It is big, mostly 2GB
get_url: url={{ dataminer_data_file_from_thredds }} dest={{ smartgears_user_home }}/data/gebco_08.nc timeout=2400
- name: Create a symlink to the gebco_08.nc file
file: src={{ smartgears_user_home }}/data/gebco_08.nc dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/ecocfg/gebco_08.nc state=link
notify: Restart smartgears
- name: Install the script that fixes the WPS configuration
become_user: "{{ d4science_ansible_become_user | default('root') }}"
template: src=wps-config-fixer.j2 dest=/usr/local/bin/wps-config-fixer owner=root group=root mode=0555
with_items: '{{ tomcat_m_instances }}'
- name: Fix the WPS config file
shell: /usr/local/bin/wps-config-fixer
# notify: Restart smartgears
become: True
become_user: '{{ smartgears_user }}'
when: dataminer_app_install
tags: [ 'tomcat', 'dataminer', 'wps' ]

View File

@ -2,4 +2,7 @@
- include: dataminer-upgrade.yml - include: dataminer-upgrade.yml
when: dataminer_app_upgrade when: dataminer_app_upgrade
- include: dataminer-app.yml - include: dataminer-app.yml
when: dataminer_war_install
- include: dataminer-zip.yml
when: not dataminer_war_install
- include: install-gcube-key.yml - include: install-gcube-key.yml