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.
This commit is contained in:
Andrea Dell'Amico 2016-07-07 17:39:27 +02:00
parent 3376bc3031
commit 965d6bf6ae
5 changed files with 14 additions and 9 deletions

View File

@ -1,9 +1,7 @@
--- ---
generic_worker_install: False generic_worker_install: False
#smart_generic_worker_plugin_ver: 1.0.1-3.9.0 smart_generic_worker_plugin_ver: 1.0.3-4.0.0-128830
#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_name: 'smart-generic-worker-{{ smart_generic_worker_plugin_ver }}-jar-with-dependencies.jar' 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 }}' 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 }}'

View File

@ -1,9 +1,7 @@
--- ---
smart_executor_install: False smart_executor_install: False
#smart_executor_version: 1.2.0-3.9.0 smart_executor_version: 1.3.0-4.0.0-128844
#smart_executor_version: 1.3.0-3.10.1
smart_executor_version: 1.3.0-3.11.0-128844
smart_executor_name: smart-executor smart_executor_name: smart-executor
smart_executor_file: '{{ smart_executor_name }}-{{ smart_executor_version }}.war' 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 }}' smart_executor_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}/org/gcube/vremanagement/smart-executor/{{ smart_executor_version }}/{{ smart_executor_file }}'

View File

@ -15,9 +15,7 @@ smartgears_user: '{{ d4science_user }}'
smartgears_user_home: '{{ d4science_user_home }}' smartgears_user_home: '{{ d4science_user_home }}'
smartgears_instance_path: '{{ smartgears_user_home }}/tomcat' smartgears_instance_path: '{{ smartgears_user_home }}/tomcat'
smartgears_install_path: '{{ smartgears_user_home }}/SmartGears' smartgears_install_path: '{{ smartgears_user_home }}/SmartGears'
#smartgears_distribution_version: 1.2.6-3.10.0 smartgears_distribution_version: 1.2.8-4.0.0-129615
#smartgears_distribution_version: 1.2.7-3.10.1
smartgears_distribution_version: 1.2.7-3.11.0-125799
smartgears_file: 'smartgears-distribution-{{ smartgears_distribution_version }}.tar.gz' 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_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}/org/gcube/distribution/smartgears-distribution/{{ smartgears_distribution_version }}/{{ smartgears_file }}'
smartgears_mode: online smartgears_mode: online
@ -31,6 +29,8 @@ smartgears_location: pisa
smartgears_http_port: 9000 smartgears_http_port: 9000
smartgears_service_name: 'tomcat-instance-{{ smartgears_http_port }}' smartgears_service_name: 'tomcat-instance-{{ smartgears_http_port }}'
smartgears_loglevel: WARN
# The iptables rules use this # The iptables rules use this
http_port: '{{ smartgears_http_port }}' http_port: '{{ smartgears_http_port }}'

View File

@ -61,6 +61,14 @@
notify: Restart smartgears notify: Restart smartgears
tags: [ 'smartgears', 'smartgears_conf', 'tomcat' ] 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 - name: Remove some wrong symbolic links created by the install/upgrade script
file: dest={{ smartgears_install_path }}/state state=absent file: dest={{ smartgears_install_path }}/state state=absent
with_items: with_items:

View File

@ -27,6 +27,7 @@ common_packages:
- sudo - sudo
- apt-transport-https - apt-transport-https
- nano - nano
- xmlstarlet
# Set this variable in your playbook # Set this variable in your playbook
# additional_packages: # additional_packages: