From 965d6bf6aede830a1b714598f6d3ddd0f2fd1705 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 7 Jul 2016 17:39:27 +0200 Subject: [PATCH] library/roles/ubuntu-deb-general/defaults/main.yml: Install xmlstarlet. library/roles/smartgears: Change the default versions to the new production ones. library/roles/smartgears/smartgears/tasks/smartgears-app.yml: Task that sets the loglevel. The default is WARN. --- smartgears/generic_worker/defaults/main.yml | 4 +--- smartgears/smart_executor/defaults/main.yml | 4 +--- smartgears/smartgears/defaults/main.yml | 6 +++--- smartgears/smartgears/tasks/smartgears-app.yml | 8 ++++++++ ubuntu-deb-general/defaults/main.yml | 1 + 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/smartgears/generic_worker/defaults/main.yml b/smartgears/generic_worker/defaults/main.yml index 757ee67..11952b7 100644 --- a/smartgears/generic_worker/defaults/main.yml +++ b/smartgears/generic_worker/defaults/main.yml @@ -1,9 +1,7 @@ --- generic_worker_install: False -#smart_generic_worker_plugin_ver: 1.0.1-3.9.0 -#smart_generic_worker_plugin_ver: 1.0.2-3.10.1 -smart_generic_worker_plugin_ver: 1.0.3-3.11.0-128830 +smart_generic_worker_plugin_ver: 1.0.3-4.0.0-128830 smart_generic_worker_plugin_name: 'smart-generic-worker-{{ smart_generic_worker_plugin_ver }}-jar-with-dependencies.jar' smart_generic_worker_plugin_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}/org/gcube/dataanalysis/smart-generic-worker/{{ smart_generic_worker_plugin_ver }}/{{ smart_generic_worker_plugin_name }}' diff --git a/smartgears/smart_executor/defaults/main.yml b/smartgears/smart_executor/defaults/main.yml index 83fa19a..a522af7 100644 --- a/smartgears/smart_executor/defaults/main.yml +++ b/smartgears/smart_executor/defaults/main.yml @@ -1,9 +1,7 @@ --- smart_executor_install: False -#smart_executor_version: 1.2.0-3.9.0 -#smart_executor_version: 1.3.0-3.10.1 -smart_executor_version: 1.3.0-3.11.0-128844 +smart_executor_version: 1.3.0-4.0.0-128844 smart_executor_name: smart-executor smart_executor_file: '{{ smart_executor_name }}-{{ smart_executor_version }}.war' smart_executor_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}/org/gcube/vremanagement/smart-executor/{{ smart_executor_version }}/{{ smart_executor_file }}' diff --git a/smartgears/smartgears/defaults/main.yml b/smartgears/smartgears/defaults/main.yml index 9ddaba8..27e820c 100644 --- a/smartgears/smartgears/defaults/main.yml +++ b/smartgears/smartgears/defaults/main.yml @@ -15,9 +15,7 @@ smartgears_user: '{{ d4science_user }}' smartgears_user_home: '{{ d4science_user_home }}' smartgears_instance_path: '{{ smartgears_user_home }}/tomcat' smartgears_install_path: '{{ smartgears_user_home }}/SmartGears' -#smartgears_distribution_version: 1.2.6-3.10.0 -#smartgears_distribution_version: 1.2.7-3.10.1 -smartgears_distribution_version: 1.2.7-3.11.0-125799 +smartgears_distribution_version: 1.2.8-4.0.0-129615 smartgears_file: 'smartgears-distribution-{{ smartgears_distribution_version }}.tar.gz' smartgears_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}/org/gcube/distribution/smartgears-distribution/{{ smartgears_distribution_version }}/{{ smartgears_file }}' smartgears_mode: online @@ -31,6 +29,8 @@ smartgears_location: pisa smartgears_http_port: 9000 smartgears_service_name: 'tomcat-instance-{{ smartgears_http_port }}' +smartgears_loglevel: WARN + # The iptables rules use this http_port: '{{ smartgears_http_port }}' diff --git a/smartgears/smartgears/tasks/smartgears-app.yml b/smartgears/smartgears/tasks/smartgears-app.yml index c9b6868..7afaefb 100644 --- a/smartgears/smartgears/tasks/smartgears-app.yml +++ b/smartgears/smartgears/tasks/smartgears-app.yml @@ -61,6 +61,14 @@ notify: Restart smartgears tags: [ 'smartgears', 'smartgears_conf', 'tomcat' ] +- name: Change the smartgears log level + become: True + become_user: '{{ d4science_user }}' + shell: LOGLEVEL=$( xmlstarlet sel -t -v "/configuration/logger/@level" {{ item.user_home }}/tomcat/lib/logback.xml | grep {{ smartgears_loglevel }} ) ; [ $? -ne 0 ] && xmlstarlet ed -u "/configuration/logger[@level]/@level" -v {{ smartgears_loglevel }} {{ item.user_home }}/tomcat/lib/logback.xml > {{ item.user_home }}/tomcat/lib/logback.xml.new ; mv {{ item.user_home }}/tomcat/lib/logback.xml.new {{ item.user_home }}/tomcat/lib/logback.xml + with_items: '{{ tomcat_m_instances }}' + notify: Restart smartgears + tags: [ 'smartgears', 'tomcat', 'smartgears_loglevel' ] + - name: Remove some wrong symbolic links created by the install/upgrade script file: dest={{ smartgears_install_path }}/state state=absent with_items: diff --git a/ubuntu-deb-general/defaults/main.yml b/ubuntu-deb-general/defaults/main.yml index 18f613b..11377ac 100644 --- a/ubuntu-deb-general/defaults/main.yml +++ b/ubuntu-deb-general/defaults/main.yml @@ -27,6 +27,7 @@ common_packages: - sudo - apt-transport-https - nano + - xmlstarlet # Set this variable in your playbook # additional_packages: