forked from ISTI-ansible-roles/ansible-roles
library/roles/smartgears/cmems_importer_se_plugin: The plugin is now a uber jar.
This commit is contained in:
parent
abfbc08846
commit
14556c36a6
|
@ -6,7 +6,11 @@ cmems_importer_se_plugin_version: latest
|
||||||
cmems_importer_se_plugin_group_id: 'org.gcube.dataanalysis'
|
cmems_importer_se_plugin_group_id: 'org.gcube.dataanalysis'
|
||||||
cmems_importer_se_plugin_name: 'cmems-importer-se-plugin'
|
cmems_importer_se_plugin_name: 'cmems-importer-se-plugin'
|
||||||
cmems_importer_se_plugin_extension: 'jar'
|
cmems_importer_se_plugin_extension: 'jar'
|
||||||
cmems_importer_se_plugin_classifier: 'jar-with-dependencies'
|
cmems_importer_se_plugin_classifier: 'uberjar'
|
||||||
cmems_importer_se_plugin_file: '{{ cmems_importer_se_plugin_name }}-{{ cmems_importer_se_plugin_version }}-jar-with-dependencies.{{ cmems_importer_se_plugin_extension }}'
|
cmems_importer_se_plugin_uber_file: '{{ cmems_importer_se_plugin_name }}-{{ cmems_importer_se_plugin_version }}-{{ cmems_importer_se_plugin_classifier }}.{{ cmems_importer_se_plugin_extension }}'
|
||||||
|
cmems_importer_se_plugin_file: '{{ cmems_importer_se_plugin_name }}-{{ cmems_importer_se_plugin_version }}.{{ cmems_importer_se_plugin_extension }}'
|
||||||
|
|
||||||
|
catalina_apps_conf:
|
||||||
|
- { app_name: '{{ smart_executor_name }}', plugin_name: '{{ cmems_importer_se_plugin_name }}' }
|
||||||
|
|
||||||
# Note: the deb package nco is required
|
# Note: the deb package nco is required
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
dependencies:
|
||||||
|
- role: '../library/roles/smartgears/smart_executor'
|
||||||
|
- role: '../library/roles/smartgears/catalina-app-conf'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
- block:
|
- block:
|
||||||
- name: Remove the old cmems-importer plugin
|
- name: Remove the cmems-importer smart executor plugin
|
||||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ cmems_importer_se_plugin_name }}-*-{{ cmems_importer_se_plugin_classifier }}.{{ cmems_importer_se_plugin_extension }}
|
file: dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/plugins/{{ cmems_importer_se_plugin_name }} state=absent
|
||||||
notify: Restart smartgears
|
notify: Restart smartgears
|
||||||
|
|
||||||
become: True
|
become: True
|
||||||
|
@ -11,18 +11,33 @@
|
||||||
|
|
||||||
|
|
||||||
- block:
|
- block:
|
||||||
- name: Download the cmems-importer plugin
|
- name: Download the cmems-importer plugin uber jar
|
||||||
maven_artifact: artifact_id={{ cmems_importer_se_plugin_name }} version={{ cmems_importer_se_plugin_version | default('latest') }} group_id={{ cmems_importer_se_plugin_group_id }} extension={{ cmems_importer_se_plugin_extension }} repository_url={{ smartgears_global_base_url }} classifier={{ cmems_importer_se_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ cmems_importer_se_plugin_file }}
|
maven_artifact: artifact_id={{ cmems_importer_se_plugin_name }} version={{ cmems_importer_se_plugin_version | default('latest') }} group_id={{ cmems_importer_se_plugin_group_id }} extension={{ cmems_importer_se_plugin_extension }} repository_url={{ smartgears_global_base_url }} classifier={{ cmems_importer_se_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ cmems_importer_se_plugin_uber_file }}
|
||||||
register: cmems_importer_download
|
register: cmems_importer_download
|
||||||
|
|
||||||
- name: Remove the old cmems-importer plugin
|
- name: Remove the old cmems-importer smart executor plugin
|
||||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ cmems_importer_se_plugin_name }}-*-{{ cmems_importer_se_plugin_classifier }}.{{ cmems_importer_se_plugin_extension }}
|
file: dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/plugins/{{ cmems_importer_se_plugin_name }} state=absent
|
||||||
when: ( cmems_importer_download | changed )
|
when: ( cmems_importer_download | changed )
|
||||||
notify: Restart smartgears
|
notify: Restart smartgears
|
||||||
|
|
||||||
- name: Copy the cmems-importer plugin on the correct place
|
- name: Create the plugin directory inside the smart executor
|
||||||
copy: src={{ smartgears_downloads_dir }}/{{ cmems_importer_se_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ cmems_importer_se_plugin_file }} remote_src=yes force=yes
|
file: dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/plugins/{{ cmems_importer_se_plugin_name }} state=directory
|
||||||
when: ( cmems_importer_download | changed )
|
register: cmems_importer_create_dir
|
||||||
|
|
||||||
|
- name: Unarchive the cmems-importer uber jar to expose its libraries
|
||||||
|
unarchive: src={{ smartgears_downloads_dir }}/{{ cmems_importer_se_plugin_uber_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/plugins/{{ cmems_importer_se_plugin_name }}/ copy=no
|
||||||
|
when: (cmems_importer_create_dir | changed)
|
||||||
|
notify: Restart smartgears
|
||||||
|
|
||||||
|
- name: Download the cmems-importer plugin jar file
|
||||||
|
maven_artifact: artifact_id={{ cmems_importer_se_plugin_name }} version={{ cmems_importer_se_plugin_version }} group_id={{ cmems_importer_se_plugin_group_id }} extension={{ cmems_importer_se_plugin_extension }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/plugins/{{ cmems_importer_se_plugin_name }} keep_name=yes
|
||||||
|
notify: Restart smartgears
|
||||||
|
|
||||||
|
- name: Remove the Sis geotk uber jar org and META-INF directories
|
||||||
|
file: dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/plugins/{{ cmems_importer_se_plugin_name }}/{{ item }} state=absent
|
||||||
|
with_items:
|
||||||
|
- org
|
||||||
|
- 'META-INF'
|
||||||
notify: Restart smartgears
|
notify: Restart smartgears
|
||||||
|
|
||||||
- name: Install the nco package
|
- name: Install the nco package
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
smart_executor_install: True
|
||||||
|
|
Loading…
Reference in New Issue