group_vars/spd_service_pre/spd_pre.yml added spd service

group_vars/rstudio_dev/rstudio.yml added smartgears distro version (staging repo)
../library/roles/smartgears/r_connector/defaults/main.yml upgrade r_connector version
This commit is contained in:
Roberto Cirillo 2017-03-01 14:16:40 +01:00
parent b31548506d
commit 602ed0f8e8
4 changed files with 45 additions and 1 deletions

View File

@ -1,7 +1,7 @@
--- ---
gcube_repository: 'gcube-staging' gcube_repository: 'gcube-staging'
r_connector_install: False r_connector_install: False
r_connector_ver: 2.1.1-4.2.1-135146 r_connector_ver: 2.1.2-4.3.0-144071
r_connector_name: r-connector r_connector_name: r-connector
r_connector_filename: '{{ r_connector_name }}-{{ r_connector_ver }}.war' r_connector_filename: '{{ r_connector_name }}-{{ r_connector_ver }}.war'
r_connector_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}/org/gcube/data/analysis/{{ r_connector_name }}/{{ r_connector_ver}}/{{ r_connector_filename }}' r_connector_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}/org/gcube/data/analysis/{{ r_connector_name }}/{{ r_connector_ver}}/{{ r_connector_filename }}'

View File

@ -0,0 +1,11 @@
---
gcube_repository: gcube-staging
spd_service_install: False
spd_service_upgrade: False
spd_service_version: latest
spd_service_name: species-products-discovery
spd_group_id: org.gcube.data.spd
spd_extension: war
spd_service_file: '{{ spd_service_name }}-{{ spd_service_version }}.{{ spd_extension }}'
spd_service_repository_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}'

View File

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

View File

@ -0,0 +1,30 @@
---
- block:
- name: Remove the old spd files
file: path={{ smartgears_instance_path }}/webapps/{{ spd_service_name }} state=absent
when: spd_service_upgrade
# NOTE: Install as the smartgears user so we do not mess with the permissions
- name: Get the spd-service
maven_artifact: artifact_id={{ spd_service_name }} version={{ spd_service_version | default(omit) }} group_id={{ spd_group_id }} extension={{ spd_extension | default('war') }} repository_url={{ spd_service_repository_url }} dest={{ smartgears_user_home }}/{{ spd_service_file }}
- name: Create the spd working directory
file: path={{ smartgears_instance_path }}/webapps/{{ spd_service_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
- name: Unarchive the spd war
unarchive: copy=no src={{ smartgears_user_home }}/{{ spd_service_file }} dest={{ smartgears_instance_path }}/webapps/{{ spd_service_name }} creates={{ smartgears_instance_path }}/webapps/{{ spd_service_name }}/WEB-INF/lib
notify: Restart smartgears
become: True
become_user: '{{ d4science_user }}'
when: spd_service_install
tags: [ 'smartgears', 'spd_service', 'tomcat' ]
- block:
- name: Remove the old spd files
file: path={{ smartgears_instance_path }}/webapps/{{ spd_service_name }} state=absent
become: True
become_user: '{{ d4science_user }}'
when: not spd_service_install
tags: [ 'smartgears', 'spd_service', 'tomcat' ]