diff --git a/smartgears/dataminer_app/defaults/main.yml b/smartgears/dataminer_app/defaults/main.yml index d7fc8adc..5e5542c9 100644 --- a/smartgears/dataminer_app/defaults/main.yml +++ b/smartgears/dataminer_app/defaults/main.yml @@ -9,3 +9,4 @@ 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/ +dataminer_data_file_from_thredds: 'http://thredds.d4science.org/thredds/fileServer/public/netcdf/gebco_08_OCEANS_CLIMATOLOGY_METEOROLOGY_ATMOSPHERE_.nc' diff --git a/smartgears/dataminer_app/tasks/dataminer-app.yml b/smartgears/dataminer_app/tasks/dataminer-app.yml index fc5be2e0..fe0b6911 100644 --- a/smartgears/dataminer_app/tasks/dataminer-app.yml +++ b/smartgears/dataminer_app/tasks/dataminer-app.yml @@ -14,10 +14,10 @@ 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 + subversion: repo={{ dataminer_wps_algorithms_svn }} dest={{ smartgears_user_home }}/wps_algorithms/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 + file: src={{ smartgears_user_home }}/wps_algorithms/algorithms dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/WEB-INF/lib/algorithms state=link notify: Restart smartgears - name: Create a directory where to install the gebco_08.nc data file diff --git a/smartgears/dataminer_app/tasks/dataminer-upgrade.yml b/smartgears/dataminer_app/tasks/dataminer-upgrade.yml index e459da47..1db229e1 100644 --- a/smartgears/dataminer_app/tasks/dataminer-upgrade.yml +++ b/smartgears/dataminer_app/tasks/dataminer-upgrade.yml @@ -4,7 +4,7 @@ service: name=tomcat-instance-{{ smartgears_http_port }} state=stopped - name: If it is an upgrade, brutally remove the wps installation - file: dest={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }} state=absent + file: dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }} state=absent when: dataminer_app_upgrade tags: [ 'tomcat', 'dataminer', 'dataminer_upgrade', 'wps' ] diff --git a/smartgears/dataminer_app/tasks/install-gcube-key.yml b/smartgears/dataminer_app/tasks/install-gcube-key.yml index 3b813ec1..a38fd364 100644 --- a/smartgears/dataminer_app/tasks/install-gcube-key.yml +++ b/smartgears/dataminer_app/tasks/install-gcube-key.yml @@ -1,7 +1,7 @@ --- - block: - name: Install the production gcube keys - get_url: url={{ item.url }} dest={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/ecocfg/PARALLEL_PROCESSING/{{ item.name }} owner={{ smartgears_user }} group={{ smartgears_user }} mode=0600 + get_url: url={{ item.url }} dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/ecocfg/PARALLEL_PROCESSING/{{ item.name }} owner={{ smartgears_user }} group={{ smartgears_user }} mode=0600 with_items: - '{{ gcube_prod_key_1 }}' - '{{ gcube_prod_key_2 }}' @@ -15,7 +15,7 @@ when: install_gcube_prod_key - name: Remove the production gcube keys - file: dest={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/ecocfg/PARALLEL_PROCESSIN/{{ item.name }} state=absent + file: dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/ecocfg/PARALLEL_PROCESSIN/{{ item.name }} state=absent with_items: - '{{ gcube_prod_key_1 }}' - '{{ gcube_prod_key_2 }}' @@ -26,7 +26,7 @@ when: not install_gcube_prod_key - name: Install the devel gcube keys - get_url: url={{ item.url }} dest={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/ecocfg/PARALLEL_PROCESSING/{{ item.name }} owner={{ smartgears_user }} group={{ smartgears_user }} mode=0600 + get_url: url={{ item.url }} dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/ecocfg/PARALLEL_PROCESSING/{{ item.name }} owner={{ smartgears_user }} group={{ smartgears_user }} mode=0600 with_items: - '{{ gcube_dev_key_1 }}' - '{{ gcube_dev_key_2 }}' @@ -35,7 +35,7 @@ when: install_gcube_dev_key - name: Remove the devel gcube keys - file: dest={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/ecocfg/PARALLEL_PROCESSING/{{ item.name }} state=absent + file: dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/ecocfg/PARALLEL_PROCESSING/{{ item.name }} state=absent with_items: - '{{ gcube_dev_key_1 }}' - '{{ gcube_dev_key_2 }}' @@ -44,14 +44,14 @@ when: not install_gcube_dev_key - name: Install the preprod gcube keys - get_url: url={{ item.url }} dest={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/ecocfg/PARALLEL_PROCESSING/{{ item.name }} owner={{ smartgears_user }} group={{ smartgears_user }} mode=0600 + get_url: url={{ item.url }} dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/ecocfg/PARALLEL_PROCESSING/{{ item.name }} owner={{ smartgears_user }} group={{ smartgears_user }} mode=0600 with_items: - '{{ gcube_pre_key_1 }}' notify: Restart smartgears when: install_gcube_preprod_key - name: Remove the preprod gcube keys - file: dest={{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/ecocfg/PARALLEL_PROCESSING/{{ item.name }} state=absent + file: dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/ecocfg/PARALLEL_PROCESSING/{{ item.name }} state=absent with_items: - '{{ gcube_pre_key_1 }}' notify: Restart smartgears diff --git a/smartgears/dataminer_app/templates/download-dataminer.sh.j2 b/smartgears/dataminer_app/templates/download-dataminer.sh.j2 deleted file mode 100644 index 04c513e3..00000000 --- a/smartgears/dataminer_app/templates/download-dataminer.sh.j2 +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -RETVAL= - -cd {{ smartgears_user_home }} -# Install the rapidminer custom jar -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 - -RETVAL=$? -if [ $RETVAL -ne 0 ] ; then - exit 1 -fi - -# Install the org.gcube.dataanalysis dataminer jar -{% if dataminer_jar_url is defined %} -cd {{ smartgears_user_home }}/tomcat/webapps/wps/WEB-INF/lib -wget {{ dataminer_jar_url }} -{% else %} -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 -{% endif %} - -RETVAL=$? -if [ $RETVAL -ne 0 ] ; then - exit 1 -fi - -# Install the org.gcube.dataanalysis dataminer jar dependencies -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 - - -RETVAL=$? -if [ $RETVAL -ne 0 ] ; then - exit 1 -fi - -touch {{ smartgears_user_home }}/.dataminer_installation_{{ dataminer_dataminer_jar_version }} -exit 0 diff --git a/smartgears/dataminer_app/templates/wps-config-fixer.j2 b/smartgears/dataminer_app/templates/wps-config-fixer.j2 index dabfaaea..1ef8dd1a 100644 --- a/smartgears/dataminer_app/templates/wps-config-fixer.j2 +++ b/smartgears/dataminer_app/templates/wps-config-fixer.j2 @@ -1,7 +1,7 @@ #!/bin/bash # -WPS_CONFIG_FILE='{{ smartgears_instance_path }}/webapps/{{ dataminer_52north_webapp_name }}/config/wps_config.xml' +WPS_CONFIG_FILE='{{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/config/wps_config.xml' # Fix the hostname sed -Ei 's/hostname=\".*\"\ hostport/hostname="{{ smartgears_hostname }}" hostport/' $WPS_CONFIG_FILE