library/roles/smartgears/dataminer_app: Move from the zip file to a war. Install the algorithms checking them out from the subversion repository.

This commit is contained in:
Andrea Dell'Amico 2017-05-08 18:20:57 +02:00
parent cc7c04342a
commit 08220160ad
2 changed files with 25 additions and 9 deletions

View File

@ -2,10 +2,10 @@
dataminer_app_install: False
dataminer_app_upgrade: False
# dev or prod
dataminer_product: prod
dataminer_zip_url: 'http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-analysis/DataMinerConfiguration/webapp/{{ dataminer_product }}/wps.zip'
dataminer_52north_webapp_name: wps
dataminer_data_file_from_thredds: 'http://thredds.d4science.org/thredds/fileServer/public/netcdf/gebco_08_OCEANS_CLIMATOLOGY_METEOROLOGY_ATMOSPHERE_.nc'
dataminer_wps_version: latest
dataminer_wps_name: wps
dataminer_wps_group_id: org.gcube.data-analysis
dataminer_wps_extension: war
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_algorithms_svn: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-analysis/DataMinerConfiguration/algorithms/

View File

@ -1,7 +1,23 @@
---
- 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
maven_artifact: artifact_id={{ dataminer_wps_name }} version={{ dataminer_wps_version | default(omit) }} group_id={{ dataminer_wps_group_id }} extension={{ dataminer_wps_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_user_home }}/{{ dataminer_wps_file }}
- name: Create the dataminer wps working directory
file: path={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
- name: Unarchive the dataminer_wps war
unarchive: copy=no src={{ smartgears_user_home }}/{{ dataminer_wps_file }} dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }} creates={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/WEB-INF/lib
notify: Restart smartgears
- name: Create a directory where to install the algorithms directory
file: path={{ smartgears_user_home }}/wps_algorithms state=directory
- name: Download the WPS algorithms from subversion
subversion: repo={{ dataminer_wps_algorithms_svn }} dest={{ smartgears_user_home }}/wps_algorithms
- name: Create a symlink to the algorithms from WEB-INF/lib
file: src={{ smartgears_user_home }}/wps_algorithms/algorithms dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/WEB-INF/lib/algorithms
notify: Restart smartgears
- name: Create a directory where to install the gebco_08.nc data file
@ -11,7 +27,7 @@
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_52north_webapp_name }}/ecocfg/gebco_08.nc state=link
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