smartgears-node-upgrade.yml added role for fhn_manager service

This commit is contained in:
Roberto Cirillo 2016-07-29 16:00:06 +02:00
parent 6b5176e82f
commit f8d93f6fbf
3 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,9 @@
---
fhn_manager_install: True
smart_executor_install: False
fhn_manager_version: 1.1.0-4.0.0-130390
fhn_manager_name: fhn-manager-service
smart_executor_name: smart-executor
fhn_manager_file: '{{ fhn_manager_name }}-{{ fhn_manager_version }}.war'
fhn_manager_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}/org/gcube/resources/federation/{{fhn_manager_name}}/{{ fhn_manager_version }}/{{ fhn_manager_file }}'

View File

@ -0,0 +1,3 @@
---
- name: Restart smartgears
service: name='tomcat-instance-{{ smartgears_http_port }}' state=restarted

View File

@ -0,0 +1,29 @@
---
- block:
- name: Remove the old smart executor files if present
file: path={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }} state=absent
when: ( not smart_executor_install ) or ( smartgears_upgrade )
- name: Remove the old fhn-manager files
file: path={{ smartgears_instance_path }}/webapps/{{ fhn_manager_name }} state=absent
when: ( not fhn_manager_install ) or ( smartgears_upgrade )
# NOTE: Install as the smartgears user so we do not mess with the permissions
- name: Get the fhn-manager-service
get_url: url={{ fhn_manager_url }} dest={{ smartgears_user_home }}/{{ fhn_manager_file }}
when: fhn_manager_install
- name: Create the fhn manager working directory
file: path={{ smartgears_instance_path }}/webapps/{{ fhn_manager_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
when: fhn_manager_install
- name: Unarchive the fhn_manager war
unarchive: copy=no src={{ smartgears_user_home }}/{{ fhn_manager_file }} dest={{ smartgears_instance_path }}/webapps/{{ fhn_manager_name }} creates={{ smartgears_instance_path }}/webapps/{{ fhn_manager_name }}/WEB-INF/lib
when: fhn_manager_install
notify: Restart smartgears
become: True
become_user: '{{ d4science_user }}'
tags: [ 'smartgears', 'fhn_manager', 'tomcat' ]