dataminer: Install the web.xml file in the correct place.

dataminer: Remove the old wps_algorithms directory when moving from the old to the new algorithms setup.
This commit is contained in:
Andrea Dell'Amico 2017-10-13 15:15:30 +02:00
parent ef48aaf3f2
commit 3477ccc615
1 changed files with 14 additions and 2 deletions

View File

@ -40,16 +40,24 @@
notify: Restart smartgears
- name: Install the dataminer web.xml
template: src=web.xml.j2 dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/WEB-INF/lib/web.xml
template: src=web.xml.j2 dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/WEB-INF/web.xml
notify: Restart smartgears
- name: Verify if we have the old algorithms setup
stat: path={{ smartgears_user_home }}/wps_algorithms/algorithms/AAPS_NASO_PUBLISHER.jar
register: old_algo_setup
- name: Wipe away the algoriths directory if it comes from the old setup
file: dest={{ smartgears_user_home }}/wps_algorithms state=absent
when: old_algo_setup.stat.exists
- name: Create a directory where to install the algorithms directory
file: path={{ smartgears_user_home }}/wps_algorithms/algorithms state=directory
tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_svn' ]
- name: Install the subversion packages
become_user: root
apt: pkg=subversion state=present update_cache=yes cache_valid_time=1800 force=yes
apt: pkg=subversion state=present update_cache=yes cache_valid_time=1800
- name: Download the WPS algorithms from subversion
subversion: repo={{ dataminer_wps_algorithms_svn }} dest={{ smartgears_user_home }}/wps_algorithms/algorithms/{{ dataminer_infra_reference }} checkout=yes force=yes update=yes
@ -78,6 +86,10 @@
template: src=algorithms-updater.j2 dest=/usr/local/bin/algorithms-updater mode=0755
tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_script' ]
- name: Remove the list of the installed algorithms if we are upgrading from the old algorithms setup
file: dest={{ smartgears_user_home }}/wps_algorithms_install_log/already_installed_algorithms.txt state=absent
when: old_algo_setup.stat.exists
- name: Cron job that updates the algorithms repository and adds the missing algorithms configurations
cron: name="SVN update the algorithms repository" minute="{{ dataminer_algorithms_updater_minute_frequency }}" hour="{{ dataminer_algorithms_updater_hour_frequency }}" job="/usr/local/bin/algorithms-updater > {{ smartgears_user_home }}/wps_algorithms_install_log/algorithms_updater_cron.log 2>&1" user='{{ smartgears_user }}' state={{ dataminer_algorithms_updater_cron }}
tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_cron' ]