From a73b69154541b213297bd1acc726ae83c90c0b0f Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 16 Nov 2017 16:05:22 +0100 Subject: [PATCH 1/6] sis_geotk_dt_plugin: We must download and install both the uber jar and the plugin jar. --- .../sis_geotk_dt_plugin/defaults/main.yml | 5 ++-- smartgears/sis_geotk_dt_plugin/tasks/main.yml | 24 ++++++++++++++----- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/smartgears/sis_geotk_dt_plugin/defaults/main.yml b/smartgears/sis_geotk_dt_plugin/defaults/main.yml index fe7e0674..93bedc91 100644 --- a/smartgears/sis_geotk_dt_plugin/defaults/main.yml +++ b/smartgears/sis_geotk_dt_plugin/defaults/main.yml @@ -6,8 +6,9 @@ sis_geotk_dt_plugin_group_id : org.gcube.data.transfer sis_geotk_dt_plugin_artifact_id : '{{ sis_geotk_dt_plugin_name }}' sis_geotk_dt_plugin_version : latest sis_geotk_dt_plugin_extension: jar -sis_geotk_dt_plugin_classifier: jar-with-dependencies -sis_geotk_dt_plugin_file: '{{ sis_geotk_dt_plugin_name }}-{{ sis_geotk_dt_plugin_version }}-jar-with-dependencies.{{ sis_geotk_dt_plugin_extension }}' +sis_geotk_dt_plugin_classifier: uberjar +sis_geotk_dt_plugin_uber_file: '{{ sis_geotk_dt_plugin_name }}-{{ sis_geotk_dt_plugin_version }}-{{ sis_geotk_dt_plugin_classifier }}.{{ sis_geotk_dt_plugin_extension }}' +sis_geotk_dt_plugin_file: '{{ sis_geotk_dt_plugin_name }}-{{ sis_geotk_dt_plugin_version }}.{{ sis_geotk_dt_plugin_extension }}' catalina_apps_conf: - { app_name: '{{ data_trasfer_service_name }}', plugin_name: '{{ sis_geotk_dt_plugin_name }}' } diff --git a/smartgears/sis_geotk_dt_plugin/tasks/main.yml b/smartgears/sis_geotk_dt_plugin/tasks/main.yml index 4fbd92a8..d64e5ea2 100644 --- a/smartgears/sis_geotk_dt_plugin/tasks/main.yml +++ b/smartgears/sis_geotk_dt_plugin/tasks/main.yml @@ -9,24 +9,36 @@ tags: [ 'smartgears', 'sis_geotk', 'tomcat' ] - block: - - name: Create the plugin directory inside data transfer - file: dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }} state=directory + - name: Get the Sis geotk data transfer uber plugin + maven_artifact: artifact_id={{ sis_geotk_dt_plugin_name }} version={{ sis_geotk_dt_plugin_version }} group_id={{ sis_geotk_dt_plugin_group_id }} extension={{ sis_geotk_dt_plugin_extension }} repository_url={{ smartgears_global_base_url }} classifier={{ sis_geotk_dt_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_uber_file }} + register: sis_geotk_download - - name: Get the Sis geotk data transfer plugin - maven_artifact: artifact_id={{ sis_geotk_dt_plugin_name }} version={{ sis_geotk_dt_plugin_version | default(omit) }} group_id={{ sis_geotk_dt_plugin_group_id }} extension={{ sis_geotk_dt_plugin_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ sis_geotk_dt_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_file }} + - name: Get the Sis geotk data transfer uber plugin + maven_artifact: artifact_id={{ sis_geotk_dt_plugin_name }} version={{ sis_geotk_dt_plugin_version }} group_id={{ sis_geotk_dt_plugin_group_id }} extension={{ sis_geotk_dt_plugin_extension }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_file }} register: sis_geotk_download - name: Remove the old Sis geotk data transfer plugin file: dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }} state=absent when: (sis_geotk_download | changed) + - name: Create the plugin directory inside data transfer + file: dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }} state=directory + - name: Copy the Sis geotk data transfer plugin to its final destination copy: src={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }}/{{ sis_geotk_dt_plugin_file }} remote_src=yes notify: Restart smartgears - - name: Unarchive the Sis geotk data transfer plugin to expose its libraries - unarchive: src={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }}/ copy=no + - name: Unarchive the Sis geotk data transfer uber plugin to expose its libraries + unarchive: src={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_uber_file }} dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }}/ copy=no when: (sis_geotk_download | changed) + notify: Restart smartgears + + - name: Remove the Sis geotk uber jar org and META-INF directories + file: dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }}/{{ item }} state=absent + with_items: + - org + - 'META-INF' + notify: Restart smartgears become: True become_user: '{{ smartgears_user }}' From 098e64504199eada53cc62de777a3b45bf32d477 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 16 Nov 2017 16:24:28 +0100 Subject: [PATCH 2/6] sis_geotk_dt_plugin: use the keep_name=yes variable to keep the version name of the plugin jar. --- smartgears/sis_geotk_dt_plugin/tasks/main.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/smartgears/sis_geotk_dt_plugin/tasks/main.yml b/smartgears/sis_geotk_dt_plugin/tasks/main.yml index d64e5ea2..d196376c 100644 --- a/smartgears/sis_geotk_dt_plugin/tasks/main.yml +++ b/smartgears/sis_geotk_dt_plugin/tasks/main.yml @@ -9,10 +9,6 @@ tags: [ 'smartgears', 'sis_geotk', 'tomcat' ] - block: - - name: Get the Sis geotk data transfer uber plugin - maven_artifact: artifact_id={{ sis_geotk_dt_plugin_name }} version={{ sis_geotk_dt_plugin_version }} group_id={{ sis_geotk_dt_plugin_group_id }} extension={{ sis_geotk_dt_plugin_extension }} repository_url={{ smartgears_global_base_url }} classifier={{ sis_geotk_dt_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_uber_file }} - register: sis_geotk_download - - name: Get the Sis geotk data transfer uber plugin maven_artifact: artifact_id={{ sis_geotk_dt_plugin_name }} version={{ sis_geotk_dt_plugin_version }} group_id={{ sis_geotk_dt_plugin_group_id }} extension={{ sis_geotk_dt_plugin_extension }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_file }} register: sis_geotk_download @@ -24,15 +20,15 @@ - name: Create the plugin directory inside data transfer file: dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }} state=directory - - name: Copy the Sis geotk data transfer plugin to its final destination - copy: src={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }}/{{ sis_geotk_dt_plugin_file }} remote_src=yes - notify: Restart smartgears - - name: Unarchive the Sis geotk data transfer uber plugin to expose its libraries unarchive: src={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_uber_file }} dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }}/ copy=no when: (sis_geotk_download | changed) notify: Restart smartgears + - name: Get the Sis geotk data transfer uber plugin + maven_artifact: artifact_id={{ sis_geotk_dt_plugin_name }} version={{ sis_geotk_dt_plugin_version }} group_id={{ sis_geotk_dt_plugin_group_id }} extension={{ sis_geotk_dt_plugin_extension }} repository_url={{ smartgears_global_base_url }} classifier={{ sis_geotk_dt_plugin_classifier }} dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }} keep_name=yes + when: (sis_geotk_download | changed) + - name: Remove the Sis geotk uber jar org and META-INF directories file: dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }}/{{ item }} state=absent with_items: From 14960384b2797966c8591edafedba177da52e11e Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 16 Nov 2017 16:37:36 +0100 Subject: [PATCH 3/6] sis_geotk_dt_plugin: Fix the file names in the various tasks. --- smartgears/sis_geotk_dt_plugin/tasks/main.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/smartgears/sis_geotk_dt_plugin/tasks/main.yml b/smartgears/sis_geotk_dt_plugin/tasks/main.yml index d196376c..e69954e7 100644 --- a/smartgears/sis_geotk_dt_plugin/tasks/main.yml +++ b/smartgears/sis_geotk_dt_plugin/tasks/main.yml @@ -10,8 +10,8 @@ - block: - name: Get the Sis geotk data transfer uber plugin - maven_artifact: artifact_id={{ sis_geotk_dt_plugin_name }} version={{ sis_geotk_dt_plugin_version }} group_id={{ sis_geotk_dt_plugin_group_id }} extension={{ sis_geotk_dt_plugin_extension }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_file }} - register: sis_geotk_download + maven_artifact: artifact_id={{ sis_geotk_dt_plugin_name }} version={{ sis_geotk_dt_plugin_version }} group_id={{ sis_geotk_dt_plugin_group_id }} extension={{ sis_geotk_dt_plugin_extension }} repository_url={{ smartgears_global_base_url }} classifier={{ sis_geotk_dt_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ sis_geotk_dt_plugin_uber_file }} + register: sis_geotk_download - name: Remove the old Sis geotk data transfer plugin file: dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }} state=absent @@ -26,8 +26,7 @@ notify: Restart smartgears - name: Get the Sis geotk data transfer uber plugin - maven_artifact: artifact_id={{ sis_geotk_dt_plugin_name }} version={{ sis_geotk_dt_plugin_version }} group_id={{ sis_geotk_dt_plugin_group_id }} extension={{ sis_geotk_dt_plugin_extension }} repository_url={{ smartgears_global_base_url }} classifier={{ sis_geotk_dt_plugin_classifier }} dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }} keep_name=yes - when: (sis_geotk_download | changed) + maven_artifact: artifact_id={{ sis_geotk_dt_plugin_name }} version={{ sis_geotk_dt_plugin_version }} group_id={{ sis_geotk_dt_plugin_group_id }} extension={{ sis_geotk_dt_plugin_extension }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }} keep_name=yes - name: Remove the Sis geotk uber jar org and META-INF directories file: dest={{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/plugins/{{ sis_geotk_dt_plugin_name }}/{{ item }} state=absent From 76380acdfe803da6f5201996cf8269abfbacc32f Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 16 Nov 2017 20:15:16 +0100 Subject: [PATCH 4/6] shinyproxy: update the version number. --- shinyproxy/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shinyproxy/defaults/main.yml b/shinyproxy/defaults/main.yml index 4d0105f3..1452b58b 100644 --- a/shinyproxy/defaults/main.yml +++ b/shinyproxy/defaults/main.yml @@ -1,6 +1,6 @@ --- shinyproxy_install: False -shinyproxy_version: 1.0.0 +shinyproxy_version: 1.0.2 shinyproxy_file_name: 'shinyproxy-{{ shinyproxy_version }}.jar' shinyproxy_url: 'https://www.shinyproxy.io/downloads/{{ shinyproxy_file_name }}' shinyproxy_app_name: shinyproxy.jar From 33fe3715b6c2548cccfdb177ef676a4fbc66ac16 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 17 Nov 2017 11:59:42 +0100 Subject: [PATCH 5/6] letsencrypt changed the TOS document. --- letsencrypt-acmetool-client/defaults/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/letsencrypt-acmetool-client/defaults/main.yml b/letsencrypt-acmetool-client/defaults/main.yml index 14951eb8..2d7da682 100644 --- a/letsencrypt-acmetool-client/defaults/main.yml +++ b/letsencrypt-acmetool-client/defaults/main.yml @@ -22,7 +22,8 @@ letsencrypt_acme_certs_dir: '{{ letsencrypt_acme_user_home }}/live/{{ ansible_fq letsencrypt_acme_services_scripts_dir: /usr/lib/acme/hooks # responses parameters -letsencrypt_tos_url: 'https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf' +#letsencrypt_tos_url: 'https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf' +letsencrypt_tos_url: 'https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf' letsencrypt_acme_agree_tos: true letsencrypt_acme_rsa_key_size: 4096 letsencrypt_ocsp_must_staple: True From f1b286dbe066d4523f06531cf0305fa128fe9efb Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 17 Nov 2017 13:11:48 +0100 Subject: [PATCH 6/6] letsencrypt: add a specific tag for the user task. --- letsencrypt-acmetool-client/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/letsencrypt-acmetool-client/tasks/main.yml b/letsencrypt-acmetool-client/tasks/main.yml index 8c17a575..d0e9ffde 100644 --- a/letsencrypt-acmetool-client/tasks/main.yml +++ b/letsencrypt-acmetool-client/tasks/main.yml @@ -28,7 +28,7 @@ - name: Create the letsencrypt acme user user: name={{ letsencrypt_acme_user }} home={{ letsencrypt_acme_user_home }} createhome=no shell=/usr/sbin/nologin system=yes when: letsencrypt_acme_install - tags: letsencrypt + tags: [ 'letsencrypt', 'letsencrypt_user' ] - name: Create the letsencrypt acme home, if it does not exist already. In a separate step because it could be already there. file: dest={{ letsencrypt_acme_user_home }} owner={{ letsencrypt_acme_user }} group={{ letsencrypt_acme_user }} state=directory recurse=yes