Cleanup some dataminer tasks. Remove the old zip installation tasks.

This commit is contained in:
Andrea Dell'Amico 2018-03-23 13:40:09 +01:00
parent 538b05abb2
commit 9ef7736f10
3 changed files with 10 additions and 38 deletions

View File

@ -13,9 +13,12 @@
# This is only needed to force an upgrade
- block:
- name: Remove the old dataminer algorithm installer
- name: Remove the old dataminer algorithm installer to force an upgrade
file: path={{ smartgears_user_home }}/algorithmInstaller state=absent
- name: Remove the old dataminer algorithm installer distributions from the downloads directory
shell: rm -fr {{ smartgears_user_home }}/downloads/dataminer-algorithms-importer*.tar.gz
become: True
become_user: '{{ smartgears_user }}'
when:
@ -30,7 +33,7 @@
- name: Remove the old dataminer installation
file: path={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }} state=absent
when: (dataminer_app_downloaded | changed)
when: dataminer_app_downloaded is changed
- name: Create the dataminer wps working directory
file: path={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
@ -63,14 +66,14 @@
subversion: repo={{ dataminer_wps_algorithms_svn }} dest={{ smartgears_user_home }}/wps_algorithms/algorithms/{{ dataminer_infra_reference }} checkout=yes force=yes update=yes
tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_svn' ]
- name: Get and unpack the algorithms installer
- name: Get the algorithms installer via maven_artifact
maven_artifact: artifact_id={{ dataminer_algorithms_name }} version={{ dataminer_algorithms_version | default(omit) }} group_id={{ dataminer_algorithms_group_id }} extension={{ dataminer_algorithms_extension | default('war') }} repository_url={{ dataminer_algorithms_base_url }} dest={{ smartgears_downloads_dir }}/{{ dataminer_algorithms_file }}
register: algorithms_installer_downloaded
tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_installer' ]
- name: Remove the old dataminer algorithm installer
file: path={{ smartgears_user_home }}/algorithmInstaller state=absent
when: (algorithms_installer_downloaded | changed)
when: algorithms_installer_downloaded is changed
tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_installer' ]
- name: Unarchive the algorithms installer

View File

@ -1,29 +0,0 @@
---
- 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

@ -1,8 +1,6 @@
---
- include: dataminer-upgrade.yml
- import_tasks: dataminer-upgrade.yml
when: dataminer_app_upgrade
- include: dataminer-app.yml
- import_tasks: dataminer-app.yml
when: dataminer_war_install
- include: dataminer-zip.yml
when: not dataminer_war_install
- include: install-gcube-key.yml
- import_tasks: install-gcube-key.yml