forked from ISTI-ansible-roles/ansible-roles
Merge branch 'master' of gitorious.research-infrastructures.eu:infrastructure-management/ansible-playbooks
This commit is contained in:
commit
218aa3e3c2
|
@ -1,4 +1,16 @@
|
|||
---
|
||||
- block:
|
||||
- name: Remove the accounting service app
|
||||
file: dest={{ item }} state=absent
|
||||
with_items:
|
||||
- '{{ smartgears_instance_path }}/webapps/{{ accounting_service_name }}'
|
||||
- '{{ smartgears_instance_path }}/webapps/{{ accounting_service_name }}.{{ accounting_service_extension }}'
|
||||
|
||||
become: True
|
||||
become_user: '{{ smartgears_user }}'
|
||||
when: not accounting_service_install
|
||||
tags: [ 'smartgears', 'accounting_service', 'tomcat' ]
|
||||
|
||||
- block:
|
||||
- name: Get the accounting_service war
|
||||
maven_artifact: artifact_id={{ accounting_service_name }} version={{ accounting_service_version | default('latest') }} group_id={{ accounting_service_group_id }} extension={{ accounting_service_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ accounting_service_file }}
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
---
|
||||
- block:
|
||||
- name: Remove the old accounting aggregator plugin
|
||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/accounting-aggregator-se-plugin-*-jar-with-dependencies.jar
|
||||
|
||||
become: True
|
||||
become_user: '{{ smartgears_user }}'
|
||||
when: not accounting_aggregator_se_plugin_install
|
||||
tags: [ 'smartgears', 'accounting_aggregator_se', 'tomcat' ]
|
||||
|
||||
- block:
|
||||
- name: Get the accounting aggregator plugin and install it inside the smart executor
|
||||
maven_artifact: artifact_id={{ accounting_aggregator_se_plugin_name }} version={{ accounting_aggregator_se_plugin_version | default(omit) }} group_id={{ accounting_aggregator_se_plugin_group_id }} extension={{ accounting_aggregator_se_plugin_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ accounting_aggregator_se_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ accounting_aggregator_se_plugin_file }}
|
||||
|
@ -10,8 +19,7 @@
|
|||
tags: [ 'smartgears', 'accounting_aggregator_se', 'tomcat' ]
|
||||
|
||||
- name: Copy the accounting aggregator plugin to its final destination
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ accounting_aggregator_se_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ accounting_aggregator_se_plugin_file }} remote_src=yes
|
||||
when: (accounting_aggregator_download | changed)
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ accounting_aggregator_se_plugin_file }} dest={{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ accounting_aggregator_se_plugin_file }} remote_src=yes force=yes
|
||||
notify: Restart smartgears
|
||||
|
||||
become: True
|
||||
|
|
|
@ -1,4 +1,13 @@
|
|||
---
|
||||
- block:
|
||||
- name: Remove the old accounting insert storage plugin
|
||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ accounting_insert_storage_se_plugin_maven_artifact_id }}-*-jar-with-dependencies.jar
|
||||
|
||||
become: True
|
||||
become_user: '{{ smartgears_user }}'
|
||||
when: not accounting_insert_storage_se_plugin_install
|
||||
tags: [ 'smartgears', 'accounting_insert_storage_se', 'tomcat' ]
|
||||
|
||||
- block:
|
||||
- name: Get the accounting insert storage plugin and install it inside the smart executor
|
||||
maven_artifact: artifact_id={{ accounting_insert_storage_se_plugin_name }} version={{ accounting_insert_storage_se_plugin_version | default(omit) }} group_id={{ accounting_insert_storage_se_plugin_group_id }} extension={{ accounting_insert_storage_se_plugin_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ accounting_insert_storage_se_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ accounting_insert_storage_se_plugin_file }}
|
||||
|
|
|
@ -1,4 +1,16 @@
|
|||
---
|
||||
- block:
|
||||
- name: Remove the old accounting insert storage plugin
|
||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ smart_executor_name }}/WEB-INF/lib/{{ accounting_insert_rstudio_se_plugin_maven_artifact_id }}-*-jar-with-dependencies.jar
|
||||
|
||||
- name: Disable the cron job that calculates the home used space
|
||||
cron: name="Calculate the home used space" special_time=hourly user=root job="/usr/local/bin/calculate_home_space >/dev/null 2>&1" state=absent
|
||||
|
||||
become: True
|
||||
become_user: '{{ smartgears_user }}'
|
||||
when: not accounting_insert_rstudio_se_plugin_install
|
||||
tags: [ 'smartgears', 'accounting_insert_rstudio_se', 'tomcat' ]
|
||||
|
||||
- block:
|
||||
- name: Get the accounting insert storage plugin and install it inside the smart executor
|
||||
maven_artifact: artifact_id={{ accounting_insert_rstudio_se_plugin_name }} version={{ accounting_insert_rstudio_se_plugin_version | default(omit) }} group_id={{ accounting_insert_rstudio_se_plugin_group_id }} extension={{ accounting_insert_rstudio_se_plugin_extension | default('war') }} repository_url={{ smartgears_global_base_url }} classifier={{ accounting_insert_rstudio_se_plugin_classifier }} dest={{ smartgears_downloads_dir }}/{{ accounting_insert_rstudio_se_plugin_file }}
|
||||
|
@ -17,7 +29,7 @@
|
|||
become_user: root
|
||||
template: src=calculate_home_space.j2 dest=/usr/local/bin/calculate_home_space mode=0755 owner=root group=root
|
||||
|
||||
- name: Install a cron job that runs the calculates the home used space
|
||||
- name: Install a cron job that calculates the home used space
|
||||
cron: name="Calculate the home used space" special_time=hourly user=root job="/usr/local/bin/calculate_home_space >/dev/null 2>&1"
|
||||
|
||||
become: True
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
catalogue_ws_install: False
|
||||
catalogue_ws_upgrade: False
|
||||
catalogue_ws_version: latest
|
||||
catalogue_ws_name: catalogue-ws
|
||||
|
||||
|
|
|
@ -1,18 +1,22 @@
|
|||
---
|
||||
- block:
|
||||
- name: Remove the old catalogue ws files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ catalogue_ws_name }} state=absent
|
||||
when: catalogue_ws_upgrade
|
||||
file: path={{ item }} state=absent
|
||||
with_items:
|
||||
- '{{ smartgears_instance_path }}/webapps/{{ catalogue_ws_name }}'
|
||||
- '{{ smartgears_instance_path }}/webapps/{{ catalogue_ws_name }}.{{ catalogue_ws_extension }}'
|
||||
|
||||
# NOTE: Install as the smartgears user so we do not mess with the permissions
|
||||
become: True
|
||||
become_user: '{{ d4science_user }}'
|
||||
when: not catalogue_ws_install
|
||||
tags: [ 'smartgears', 'catalogue_ws', 'tomcat' ]
|
||||
|
||||
- block:
|
||||
- name: Get the catalogue-ws
|
||||
maven_artifact: artifact_id={{ catalogue_ws_name }} version={{ catalogue_ws_version | default(omit) }} group_id={{ catalogue_ws_group_id }} extension={{ catalogue_ws_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_user_home }}/{{ catalogue_ws_file }}
|
||||
maven_artifact: artifact_id={{ catalogue_ws_name }} version={{ catalogue_ws_version | default(omit) }} group_id={{ catalogue_ws_group_id }} extension={{ catalogue_ws_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ catalogue_ws_file }}
|
||||
|
||||
- name: Create the catalogue ws working directory
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ catalogue_ws_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||
|
||||
- name: Unarchive the catalogue ws war
|
||||
unarchive: copy=no src={{ smartgears_user_home }}/{{ catalogue_ws_file }} dest={{ smartgears_instance_path }}/webapps/{{ catalogue_ws_name }} creates={{ smartgears_instance_path }}/webapps/{{ catalogue_ws_name }}/WEB-INF/lib
|
||||
- name: Copy the catalogue ws war into the tomcat webapps directory
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ catalogue_ws_file }} dest={{ smartgears_instance_path }}/webapps/{{ catalogue_ws_name }}.{{ catalogue_ws_extension }} remote_src=yes force=yes
|
||||
notify: Restart smartgears
|
||||
|
||||
become: True
|
||||
|
@ -20,11 +24,3 @@
|
|||
when: catalogue_ws_install
|
||||
tags: [ 'smartgears', 'catalogue_ws', 'tomcat' ]
|
||||
|
||||
- block:
|
||||
- name: Remove the old catalogue ws files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ catalogue_ws_name }} state=absent
|
||||
|
||||
become: True
|
||||
become_user: '{{ d4science_user }}'
|
||||
when: not catalogue_ws_install
|
||||
tags: [ 'smartgears', 'catalogue_ws', 'tomcat' ]
|
||||
|
|
|
@ -12,7 +12,6 @@ dm_pool_prod_ghost_instance: 'PROTO_PROD_STAGING_HOST: dataminer-proto-ghost.d4s
|
|||
dm_pool_dev_ghost_instance: 'DEV_STAGING_HOST: dataminer1-devnext.d4science.org'
|
||||
dm_pool_manager_pkgs:
|
||||
- subversion
|
||||
- 'ansible'
|
||||
|
||||
dm_pool_svn_url: https://svn.d4science.research-infrastructures.eu:443/gcube/trunk/data-analysis
|
||||
svn_user: svn.d4science
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: '../library/roles/ansible_ppa'
|
||||
|
|
@ -1,18 +1,25 @@
|
|||
---
|
||||
- block:
|
||||
- name: Remove the old dm_pool_manager files
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }} state=absent
|
||||
when: dm_pool_manager_upgrade
|
||||
file: path={{ item }} state=absent
|
||||
with_items:
|
||||
- '{{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }}'
|
||||
- '{{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }}.{{ dm_pool_manager_extension }}'
|
||||
|
||||
become: True
|
||||
become_user: '{{ d4science_user }}'
|
||||
when: not dm_pool_manager_install
|
||||
tags: [ 'smartgears', 'dm_pool_manager', 'tomcat' ]
|
||||
|
||||
|
||||
# NOTE: Install as the smartgears user so we do not mess with the permissions
|
||||
- name: Get the dm_pool_manager
|
||||
maven_artifact: artifact_id={{ dm_pool_manager_name }} version={{ dm_pool_manager_version | default(omit) }} group_id={{ dm_pool_manager_group_id }} extension={{ dm_pool_manager_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_user_home }}/{{ dm_pool_manager_file }}
|
||||
maven_artifact: artifact_id={{ dm_pool_manager_name }} version={{ dm_pool_manager_version | default(omit) }} group_id={{ dm_pool_manager_group_id }} extension={{ dm_pool_manager_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ dm_pool_manager_file }}
|
||||
|
||||
- name: Create the dm_pool_manager working directory
|
||||
file: path={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||
|
||||
- name: Unarchive the dm_pool_manager war
|
||||
unarchive: copy=no src={{ smartgears_user_home }}/{{ dm_pool_manager_file }} dest={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }} creates={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }}/WEB-INF/lib
|
||||
unarchive: copy=no src={{ smartgears_downloads_dir }}/{{ dm_pool_manager_file }} dest={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }} creates={{ smartgears_instance_path }}/webapps/{{ dm_pool_manager_name }}/WEB-INF/lib
|
||||
|
||||
- name: Install the dm-pool-manager web.xml template
|
||||
template: src=web.xml.j2 dest={{ smartgears_instance_path }}/webapps/dataminer-pool-manager/WEB-INF/web.xml mode=0440
|
||||
|
@ -26,10 +33,6 @@
|
|||
with_items: '{{ tomcat_m_instances }}'
|
||||
notify: Restart smartgears
|
||||
|
||||
- name: Install the ansible repository
|
||||
become_user: root
|
||||
apt_repository: repo="deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" update_cache=yes state=present
|
||||
|
||||
- name: Install the packages required to dm-pool-manager-service
|
||||
become_user: root
|
||||
apt: pkg={{ item }} state=present update_cache=yes cache_valid_time=1800 force=yes
|
||||
|
|
|
@ -5,5 +5,4 @@ gcube_oauth_name: oauth
|
|||
gcube_oauth_group_id: org.gcube.portal
|
||||
gcube_oauth_extension: war
|
||||
gcube_oauth_file: '{{ gcube_oauth_name }}-{{ gcube_oauth_version }}.{{ gcube_oauth_extension }}'
|
||||
gcube_oauth_repository_url: 'http://maven.research-infrastructures.eu/nexus/content/repositories/{{ gcube_repository }}'
|
||||
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
---
|
||||
- block:
|
||||
- name: Remove the old gcube oauth files
|
||||
file: path={{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }} state=absent
|
||||
file: path={{ item }} state=absent
|
||||
with_items:
|
||||
- '{{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }}'
|
||||
- '{{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }}.{{ gcube_oauth_extension }}'
|
||||
|
||||
become: True
|
||||
become_user: '{{ d4science_user }}'
|
||||
when: ( not gcube_oauth_install ) or ( smartgears_upgrade )
|
||||
when: not gcube_oauth_install
|
||||
tags: [ 'smartgears', 'gcube_oauth', 'tomcat' ]
|
||||
|
||||
- block:
|
||||
# NOTE: Install as the smartgears user so we do not mess with the permissions
|
||||
- name: Get the gcube-oauth war
|
||||
maven_artifact: artifact_id={{ gcube_oauth_name }} version={{ gcube_oauth_version | default(omit) }} group_id={{ gcube_oauth_group_id }} extension={{ gcube_oauth_extension | default('war') }} repository_url={{ gcube_oauth_repository_url }} dest={{ smartgears_user_home }}/{{ gcube_oauth_file }}
|
||||
maven_artifact: artifact_id={{ gcube_oauth_name }} version={{ gcube_oauth_version | default(omit) }} group_id={{ gcube_oauth_group_id }} extension={{ gcube_oauth_extension | default('war') }} repository_url={{ smartgears_global_base_url }} dest={{ smartgears_downloads_dir }}/{{ gcube_oauth_file }}
|
||||
|
||||
- name: Create the gcube-oauth working directory
|
||||
file: path={{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||
|
||||
- name: Unarchive the gcube_oauth war
|
||||
unarchive: copy=no src={{ smartgears_user_home }}/{{ gcube_oauth_file }} dest={{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }} creates={{ smartgears_instance_path }}/webapps/{{ gcube_oauth_name }}/WEB-INF/lib
|
||||
- name: Copy the gcube_oauth war into the webapps directory
|
||||
copy: src={{ smartgears_downloads_dir }}/{{ gcube_oauth_file }} dest={{ smartgears_instance_path }}/webapps/gcube-{{ gcube_oauth_name }}.{{ gcube_oauth_extension }} remote_src=yes force=yes
|
||||
notify: Restart smartgears
|
||||
|
||||
become: True
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
sis_geotk_dt_plugin_install: False
|
||||
sis_geotk_dt_plugin_name: sis-geotk-plugin
|
||||
|
||||
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 }}'
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
- block:
|
||||
- name: Remove the old Sis geotk data transfer plugin
|
||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/{{ sis_geotk_dt_plugin_name }}-*-jar-with-dependencies.jar
|
||||
|
||||
become: True
|
||||
become_user: '{{ smartgears_user }}'
|
||||
when: not sis_geotk_dt_plugin_install
|
||||
tags: [ 'smartgears', 'sis_geotk', 'tomcat' ]
|
||||
|
||||
- block:
|
||||
- name: Get the Sis geotk data transfer plugin and install it inside the smart executor
|
||||
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 }}
|
||||
register: sis_geotk_download
|
||||
|
||||
- name: Remove the old Sis geotk data transfer plugin
|
||||
shell: rm -f {{ smartgears_instance_path }}/webapps/{{ data_trasfer_service_name }}/WEB-INF/lib/{{ sis_geotk_dt_plugin_name }}-*-jar-with-dependencies.jar
|
||||
when: (sis_geotk_download | changed)
|
||||
|
||||
- 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/{{ sis_geotk_dt_plugin_file }} remote_src=yes force=yes
|
||||
notify: Restart smartgears
|
||||
|
||||
become: True
|
||||
become_user: '{{ smartgears_user }}'
|
||||
when: sis_geotk_dt_plugin_install
|
||||
tags: [ 'smartgears', 'sis_geotk', 'tomcat' ]
|
||||
|
|
@ -6,5 +6,4 @@ smartgears_install_generic_virthost: True
|
|||
#smartgears_nginx_serveraliases:
|
||||
smartgears_nginx_cors_enabled: False
|
||||
nginx_cors_acl_origin: ''
|
||||
data_transfer_service_install: False
|
||||
smartgears_nginx_expose_tomcat_logs: False
|
||||
|
|
|
@ -77,3 +77,7 @@ smartgears_debugging_port: '{{ tomcat_m_remote_debugging_port }}'
|
|||
# tcp_rules: True
|
||||
# tcp:
|
||||
# - { port: '{{ smartgears_debugging_port }}', allowed_hosts: [ '{{ network.isti }}', '{{ network.nmis }}', '{{ network.eduroam }}' ] }
|
||||
|
||||
# This is only used to setup the nginx reverse proxy. The data-trasfer war file is always installed
|
||||
data_transfer_service_install: False
|
||||
data_trasfer_service_name: data-transfer-service
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: Create a directory where to store all the smartgears related downloads to avoid cluttering the home directory
|
||||
file: dest={{ smartgears_downloads_dir }} state=directory
|
||||
file: dest={{ smartgears_downloads_dir }} state=directory owner={{ smartgears_user }} group={{ smartgears_user }}
|
||||
tags: [ 'smartgears', 'tomcat', 'smartgears_download_dir', 'smartgears_downloads_dir' ]
|
||||
|
||||
- name: Remove the smartgears distribution archive to force un upgrade
|
||||
|
|
Loading…
Reference in New Issue