You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2021/02/23 00:02:23 UTC

[airavata] branch develop updated (a252e9c -> 6d18965)

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git.


    from a252e9c  Adding new JS IP address for dev amp gateway
     add a8fc69b  Merge branch 'AIRAVATA-3297'
     add 3e209ad  Ansible: fix for firewalld issue on Ubuntu
     add 1875631  Adding new RegSNPs and Immune Gateways
     add 5abbf62  Adding new RegSNPs and Immune Gateways
     add 75a478a  Adding new RegSNPs and Immune Gateways
     add e4d32c1  Adding new RegSNPs gateway CILogon and SSH public key.
     add e6dc223  Adding Immune Portal Cilogon and Credentail store key
     add 6663206  Ansible: enable SELinux httpd_tmp_exec
     add e9bafb7  Adding new emails for gateway notifications from PIs
     add c156d06  Adding global flood assessment gateway
     add 5b5aa31  Adding global flood assessment gateway
     add 4706980  Adding global-flood gateway
     add 9a6177d  Adding CILogon and SSH token to the Global Flood Assessment gateway
     add 4369bf0  fixed a typo in the global-flood/vars.yml
     new 461da06  AIRAVATA-3411 Ansible: tusd role
     new 6d18965  Merge branch 'airavata-3411' into develop

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 dev-tools/ansible/django.yml                       |  2 +
 .../scigap/develop/group_vars/django/vars.yml      |  2 +-
 .../scigap/develop/host_vars/delta/vars.yml        |  4 +-
 .../scigap/production/group_vars/django/vars.yml   |  2 +-
 .../scigap/production/host_vars/delta/vars.yml     |  4 +-
 .../scigap/production/host_vars/dreg/vars.yml      |  2 +-
 .../production/host_vars/futurewater/vars.yml      |  2 +-
 .../host_vars/{tsunami => global-flood}/vars.yml   | 25 ++++---
 .../production/host_vars/global-flood/vault.yml    | 15 ++++
 .../host_vars/{tsunami => immune}/vars.yml         | 25 ++++---
 .../scigap/production/host_vars/immune/vault.yml   | 15 ++++
 .../host_vars/microbial-genomes/vars.yml           |  2 +-
 .../scigap/production/host_vars/mines/vars.yml     |  2 +-
 .../host_vars/{tsunami => regsnps}/vars.yml        | 23 +++---
 .../scigap/production/host_vars/regsnps/vault.yml  | 15 ++++
 .../scigap/production/host_vars/simccs/vars.yml    |  2 +-
 .../production/host_vars/simvascular/vars.yml      |  2 +-
 .../ansible/inventories/scigap/production/hosts    |  3 +
 .../production/{host_vars/geo => immune}/vault.yml |  0
 .../scigap/staging/group_vars/django/vars.yml      |  2 +-
 dev-tools/ansible/roles/django/defaults/main.yml   |  1 -
 dev-tools/ansible/roles/django/tasks/main.yml      | 10 +++
 .../roles/django/templates/settings_local.py.j2    |  6 +-
 dev-tools/ansible/roles/env_setup/tasks/main.yml   |  1 +
 .../ansible/roles/tusd/defaults/main.yml           | 38 +++++-----
 .../roles/{keycloak => tusd}/handlers/main.yml     |  9 +--
 dev-tools/ansible/roles/tusd/tasks/main.yml        | 86 ++++++++++++++++++++++
 .../templates/tus-vhost.conf.j2}                   | 34 ++++-----
 .../ansible/roles/tusd/templates/tus.service.j2    | 23 +++---
 .../init/03-appcatalog-migrations.sql              |  6 +-
 .../src/main/containers/docker-compose.yml         |  4 +-
 31 files changed, 255 insertions(+), 112 deletions(-)
 copy dev-tools/ansible/inventories/scigap/production/host_vars/{tsunami => global-flood}/vars.yml (57%)
 create mode 100644 dev-tools/ansible/inventories/scigap/production/host_vars/global-flood/vault.yml
 copy dev-tools/ansible/inventories/scigap/production/host_vars/{tsunami => immune}/vars.yml (58%)
 create mode 100644 dev-tools/ansible/inventories/scigap/production/host_vars/immune/vault.yml
 copy dev-tools/ansible/inventories/scigap/production/host_vars/{tsunami => regsnps}/vars.yml (61%)
 create mode 100644 dev-tools/ansible/inventories/scigap/production/host_vars/regsnps/vault.yml
 copy dev-tools/ansible/inventories/scigap/production/{host_vars/geo => immune}/vault.yml (100%)
 copy modules/distribution/src/main/resources/email-monitor/conf/airavata-server.properties => dev-tools/ansible/roles/tusd/defaults/main.yml (52%)
 copy dev-tools/ansible/roles/{keycloak => tusd}/handlers/main.yml (89%)
 create mode 100644 dev-tools/ansible/roles/tusd/tasks/main.yml
 copy dev-tools/ansible/roles/{api-orch/templates/apiorch.service.j2 => tusd/templates/tus-vhost.conf.j2} (60%)
 copy .travis.yml => dev-tools/ansible/roles/tusd/templates/tus.service.j2 (78%)


[airavata] 01/02: AIRAVATA-3411 Ansible: tusd role

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git

commit 461da06fe90bd21b60feb5aff6f184d6e3472147
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Mon Feb 22 18:56:39 2021 -0500

    AIRAVATA-3411 Ansible: tusd role
---
 dev-tools/ansible/django.yml                       |  2 +
 .../scigap/develop/group_vars/django/vars.yml      |  2 +-
 .../scigap/develop/host_vars/delta/vars.yml        |  4 +-
 .../scigap/production/group_vars/django/vars.yml   |  2 +-
 .../scigap/production/host_vars/delta/vars.yml     |  4 +-
 .../scigap/production/host_vars/dreg/vars.yml      |  2 +-
 .../production/host_vars/futurewater/vars.yml      |  2 +-
 .../scigap/production/host_vars/simccs/vars.yml    |  2 +-
 .../production/host_vars/simvascular/vars.yml      |  2 +-
 .../scigap/staging/group_vars/django/vars.yml      |  2 +-
 dev-tools/ansible/roles/django/defaults/main.yml   |  1 -
 .../roles/django/templates/settings_local.py.j2    |  6 +-
 .../vars.yml => roles/tusd/defaults/main.yml}      | 32 ++++----
 .../vars.yml => roles/tusd/handlers/main.yml}      | 21 ++----
 dev-tools/ansible/roles/tusd/tasks/main.yml        | 86 ++++++++++++++++++++++
 .../tusd/templates/tus-vhost.conf.j2}              | 37 +++++-----
 .../tusd/templates/tus.service.j2}                 | 26 +++----
 .../init/03-appcatalog-migrations.sql              |  6 +-
 .../src/main/resources/docker-compose.yml          |  4 +-
 19 files changed, 163 insertions(+), 80 deletions(-)

diff --git a/dev-tools/ansible/django.yml b/dev-tools/ansible/django.yml
index 9f9227f..a0976bc 100644
--- a/dev-tools/ansible/django.yml
+++ b/dev-tools/ansible/django.yml
@@ -37,6 +37,8 @@
       when: inventory_hostname == groups['django_' +  ansible_hostname][0]
     - role: django_setup
       when: inventory_hostname == groups['django_' +  ansible_hostname][0]
+    - role: tusd
+      when: inventory_hostname == groups['django_' +  ansible_hostname][0] and tusd_vhost_servername is defined and tusd_vhost_servername
 
 # Create a django virtual host
 - hosts: django
diff --git a/dev-tools/ansible/inventories/scigap/develop/group_vars/django/vars.yml b/dev-tools/ansible/inventories/scigap/develop/group_vars/django/vars.yml
index 194ace4..0619bb1 100644
--- a/dev-tools/ansible/inventories/scigap/develop/group_vars/django/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/develop/group_vars/django/vars.yml
@@ -29,6 +29,6 @@ admin_emails: "[('SGRC Group', 'sgrc-iu-group@iu.edu')]"
 django_error_emails: "[('Marcus Christie', 'machrist@iu.edu'), ('Eroma Abeysinghe', 'eabeysin@iu.edu')]"
 django_database_name: "django_{{ gateway_id }}"
 django_hidden_airavata_apps: "['django_airavata_dataparsers']"
-django_tus_endpoint: "https://tus.dev.scigap.org/files/"
+tusd_vhost_servername: "tus.dev.scigap.org"
 airavata_django_git_branch: "develop"
 # django_keycloak_ca_certfile_path: 'os.path.join(BASE_DIR, "django_airavata", "resources", "incommon_rsa_server_ca.pem")'
diff --git a/dev-tools/ansible/inventories/scigap/develop/host_vars/delta/vars.yml b/dev-tools/ansible/inventories/scigap/develop/host_vars/delta/vars.yml
index 9c1abf8..aa56d26 100644
--- a/dev-tools/ansible/inventories/scigap/develop/host_vars/delta/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/develop/host_vars/delta/vars.yml
@@ -21,8 +21,8 @@
 ---
 gateway_data_store_hostname: "delta-topology.jetstream-cloud.org"
 gateway_data_store_resource_id: "delta-topology.jetstream-cloud.org_a272f087-f733-433c-a32c-745577ed6067"
-#django_tus_endpoint: "https://tus.scigap.org/files/" this requires manual installation steps outside of Ansible.
-#django_tus_endpoint:
+# tus isn't setup yet
+tusd_vhost_servername:
 
 # No symlink, user_data_dir is same as real_user_data_dir
 user_data_dir: "{{ real_user_data_dir }}"
diff --git a/dev-tools/ansible/inventories/scigap/production/group_vars/django/vars.yml b/dev-tools/ansible/inventories/scigap/production/group_vars/django/vars.yml
index 8f5d4a8..59b6506 100644
--- a/dev-tools/ansible/inventories/scigap/production/group_vars/django/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/production/group_vars/django/vars.yml
@@ -27,7 +27,7 @@ django_wsgi_processes: 1
 doc_root_dir: "/var/www/portals/django-{{gateway_id}}"
 django_database_name: "django_{{ inventory_hostname }}"
 django_hidden_airavata_apps: "['django_airavata_dataparsers']"
-django_tus_endpoint: "https://tus.airavata.org/files/"
+tusd_vhost_servername: "tus.airavata.org"
 # django_keycloak_ca_certfile_path: 'os.path.join(BASE_DIR, "django_airavata", "resources", "incommon_rsa_server_ca.pem")'
 
 # Default email settings
diff --git a/dev-tools/ansible/inventories/scigap/production/host_vars/delta/vars.yml b/dev-tools/ansible/inventories/scigap/production/host_vars/delta/vars.yml
index 2dcf3c3..7c28933 100644
--- a/dev-tools/ansible/inventories/scigap/production/host_vars/delta/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/production/host_vars/delta/vars.yml
@@ -24,8 +24,8 @@
 
 gateway_data_store_hostname: "delta-topology.org"
 gateway_data_store_resource_id: "delta-topology.jetstream-cloud.org_61fe21d4-07ea-41fc-9f2e-104bc3061318"
-#django_tus_endpoint: "https://tus.scigap.org/files/" this requires manual installation steps outside of Ansible.
-django_tus_endpoint:
+# tus isn't setup yet
+tusd_vhost_servername:
 airavata_django_git_branch: "delta-topology-workshop"
 
 vhost_servername: "delta-topology.org"
diff --git a/dev-tools/ansible/inventories/scigap/production/host_vars/dreg/vars.yml b/dev-tools/ansible/inventories/scigap/production/host_vars/dreg/vars.yml
index 56a0f48..f826288 100644
--- a/dev-tools/ansible/inventories/scigap/production/host_vars/dreg/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/production/host_vars/dreg/vars.yml
@@ -24,7 +24,7 @@
 
 gateway_data_store_hostname: "dreg.dnasequence.org"
 gateway_data_store_resource_id: "js-156-72.jetstream-cloud.org_758cf5c0-71f4-4268-bb42-5ede23cfeea9"
-django_tus_endpoint: "https://tus.dreg.scigap.org/files/"
+tusd_vhost_servername: "tus.dreg.scigap.org"
 # Increase max upload size to 1GB
 django_file_upload_max_file_size_mb: 1024
 
diff --git a/dev-tools/ansible/inventories/scigap/production/host_vars/futurewater/vars.yml b/dev-tools/ansible/inventories/scigap/production/host_vars/futurewater/vars.yml
index 65fe47d..721ca28 100644
--- a/dev-tools/ansible/inventories/scigap/production/host_vars/futurewater/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/production/host_vars/futurewater/vars.yml
@@ -24,7 +24,7 @@
 
 gateway_data_store_hostname: "gateway.futurewater.indiana.edu"
 gateway_data_store_resource_id: "js-171-92.jetstream-cloud.org_1a76397d-cc28-4ec9-82e8-d27c5cf80c79"
-django_tus_endpoint: "https://tus.scigap.org/files/"
+tusd_vhost_servername: "tus.scigap.org"
 
 vhost_servername: "gateway.futurewater.indiana.edu"
 vhost_ssl: True
diff --git a/dev-tools/ansible/inventories/scigap/production/host_vars/simccs/vars.yml b/dev-tools/ansible/inventories/scigap/production/host_vars/simccs/vars.yml
index 2222b8d..4c8d6d7 100644
--- a/dev-tools/ansible/inventories/scigap/production/host_vars/simccs/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/production/host_vars/simccs/vars.yml
@@ -24,7 +24,7 @@
 gateway_data_store_hostname: "scigap11.sciencegateways.iu.edu"
 gateway_data_store_resource_id: "scigap11.sciencegateways.iu.edu_96b8dcec-ac84-438a-9927-91baaf87758b"
 
-django_tus_endpoint: "https://tus.simccs.scigap.org/files/"
+tusd_vhost_servername: "tus.simccs.scigap.org"
 # simccs_maptool_branch: "master"
 simccs_maptool_branch: "dev"
 airavata_django_extra_dependencies:
diff --git a/dev-tools/ansible/inventories/scigap/production/host_vars/simvascular/vars.yml b/dev-tools/ansible/inventories/scigap/production/host_vars/simvascular/vars.yml
index 3c9195f..93922dd 100644
--- a/dev-tools/ansible/inventories/scigap/production/host_vars/simvascular/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/production/host_vars/simvascular/vars.yml
@@ -22,7 +22,7 @@
 
 # Simvascular is deployed on its own server at simvascular.stanford.edu
 
-django_tus_endpoint: "https://tus.simvascular.scigap.org/files/"
+tusd_vhost_servername: "tus.simvascular.scigap.org"
 # configure user_data_dir and real_user_data_dir
 user_data_dir: "/var/www/portals/gateway-user-data"
 real_user_data_dir: "/home/www-shared/gateway-user-data"
diff --git a/dev-tools/ansible/inventories/scigap/staging/group_vars/django/vars.yml b/dev-tools/ansible/inventories/scigap/staging/group_vars/django/vars.yml
index 861ca9e..9e404e7 100644
--- a/dev-tools/ansible/inventories/scigap/staging/group_vars/django/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/staging/group_vars/django/vars.yml
@@ -27,7 +27,7 @@ django_wsgi_processes: 2
 doc_root_dir: "/var/www/portals/django-{{gateway_id}}"
 django_database_name: "django_{{ inventory_hostname }}"
 django_hidden_airavata_apps: "['django_airavata_dataparsers']"
-django_tus_endpoint: "https://tus.staging.scigap.org/files/"
+tusd_vhost_servername: "tus.staging.scigap.org"
 # django_keycloak_ca_certfile_path: 'os.path.join(BASE_DIR, "django_airavata", "resources", "incommon_rsa_server_ca.pem")'
 
 # Default email settings
diff --git a/dev-tools/ansible/roles/django/defaults/main.yml b/dev-tools/ansible/roles/django/defaults/main.yml
index df6b9bb..234647b 100644
--- a/dev-tools/ansible/roles/django/defaults/main.yml
+++ b/dev-tools/ansible/roles/django/defaults/main.yml
@@ -47,7 +47,6 @@ django_extra_settings: {}
 django_database_name: "django_{{ gateway_id }}"
 django_database_backend: "mysql"
 django_hidden_airavata_apps: "[]"
-django_tus_data_dir: "{{user_data_dir}}/tus-temp-dir"
 django_file_upload_max_file_size_mb: 64
 django_database_hosts: "{{ groups['database'] }}"
 django_db_username: "django"
diff --git a/dev-tools/ansible/roles/django/templates/settings_local.py.j2 b/dev-tools/ansible/roles/django/templates/settings_local.py.j2
index 90e5bda..7c41306 100644
--- a/dev-tools/ansible/roles/django/templates/settings_local.py.j2
+++ b/dev-tools/ansible/roles/django/templates/settings_local.py.j2
@@ -141,10 +141,10 @@ PORTAL_TITLE = '{{ portal_title }}'
 # Hidden Airavata apps (not all gateways need all functionality)
 HIDDEN_AIRAVATA_APPS = {{ django_hidden_airavata_apps }}
 
-{% if django_tus_endpoint is defined and django_tus_endpoint %}
+{% if tusd_vhost_servername is defined and tusd_vhost_servername %}
 # Tus uploads
-TUS_ENDPOINT = "{{ django_tus_endpoint }}"
-TUS_DATA_DIR = "{{ django_tus_data_dir }}"
+TUS_ENDPOINT = "https://{{ tusd_vhost_servername }}/files/"
+TUS_DATA_DIR = "{{ tusd_upload_dir }}"
 {% endif %}
 
 FILE_UPLOAD_MAX_FILE_SIZE = {{ django_file_upload_max_file_size_mb }} * 1024 * 1024
diff --git a/dev-tools/ansible/inventories/scigap/develop/group_vars/django/vars.yml b/dev-tools/ansible/roles/tusd/defaults/main.yml
similarity index 50%
copy from dev-tools/ansible/inventories/scigap/develop/group_vars/django/vars.yml
copy to dev-tools/ansible/roles/tusd/defaults/main.yml
index 194ace4..98b0095 100644
--- a/dev-tools/ansible/inventories/scigap/develop/group_vars/django/vars.yml
+++ b/dev-tools/ansible/roles/tusd/defaults/main.yml
@@ -19,16 +19,22 @@
 #
 
 ---
-user: "pga"
-group: "pga"
-gateway_data_store_hostname: "pgadev.scigap.org"
-gateway_data_store_resource_id: "pgadev.scigap.org_7ddf28fd-d503-4ff8-bbc5-3279a7c3b99e"
-django_wsgi_processes: 1
-doc_root_dir: "/var/www/portals/django-{{gateway_id}}"
-admin_emails: "[('SGRC Group', 'sgrc-iu-group@iu.edu')]"
-django_error_emails: "[('Marcus Christie', 'machrist@iu.edu'), ('Eroma Abeysinghe', 'eabeysin@iu.edu')]"
-django_database_name: "django_{{ gateway_id }}"
-django_hidden_airavata_apps: "['django_airavata_dataparsers']"
-django_tus_endpoint: "https://tus.dev.scigap.org/files/"
-airavata_django_git_branch: "develop"
-# django_keycloak_ca_certfile_path: 'os.path.join(BASE_DIR, "django_airavata", "resources", "incommon_rsa_server_ca.pem")'
+tusd_httpd_confd_file_location:
+  RedHat: "/etc/httpd/conf.d/tus.conf"
+  Debian: "/etc/apache2/sites-available/tus.conf"
+httpd_name:
+  Debian: apache2
+  RedHat: httpd
+
+tusd_install_dir: "/home/{{user}}"
+tusd_url: "https://github.com/tus/tusd/releases/download/0.13.3/tusd_linux_amd64.tar.gz"
+tusd_tarball_dest: "{{tusd_install_dir}}/{{tusd_url | basename}}"
+tusd_dir: "{{tusd_install_dir}}/tusd_linux_amd64"
+tusd_upload_dir: "{{real_user_data_dir}}/tus-temp-dir"
+tusd_port: 10080
+tusd_ssl_certificate_file:
+  "/etc/letsencrypt/live/{{ tusd_vhost_servername }}/cert.pem"
+tusd_ssl_certificate_chain_file:
+  "/etc/letsencrypt/live/{{ tusd_vhost_servername }}/fullchain.pem"
+tusd_ssl_certificate_key_file:
+  "/etc/letsencrypt/live/{{ tusd_vhost_servername }}/privkey.pem"
diff --git a/dev-tools/ansible/inventories/scigap/develop/group_vars/django/vars.yml b/dev-tools/ansible/roles/tusd/handlers/main.yml
similarity index 51%
copy from dev-tools/ansible/inventories/scigap/develop/group_vars/django/vars.yml
copy to dev-tools/ansible/roles/tusd/handlers/main.yml
index 194ace4..7919b1c 100644
--- a/dev-tools/ansible/inventories/scigap/develop/group_vars/django/vars.yml
+++ b/dev-tools/ansible/roles/tusd/handlers/main.yml
@@ -1,5 +1,4 @@
 #
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -16,19 +15,11 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-#
 
 ---
-user: "pga"
-group: "pga"
-gateway_data_store_hostname: "pgadev.scigap.org"
-gateway_data_store_resource_id: "pgadev.scigap.org_7ddf28fd-d503-4ff8-bbc5-3279a7c3b99e"
-django_wsgi_processes: 1
-doc_root_dir: "/var/www/portals/django-{{gateway_id}}"
-admin_emails: "[('SGRC Group', 'sgrc-iu-group@iu.edu')]"
-django_error_emails: "[('Marcus Christie', 'machrist@iu.edu'), ('Eroma Abeysinghe', 'eabeysin@iu.edu')]"
-django_database_name: "django_{{ gateway_id }}"
-django_hidden_airavata_apps: "['django_airavata_dataparsers']"
-django_tus_endpoint: "https://tus.dev.scigap.org/files/"
-airavata_django_git_branch: "develop"
-# django_keycloak_ca_certfile_path: 'os.path.join(BASE_DIR, "django_airavata", "resources", "incommon_rsa_server_ca.pem")'
+- name: restart httpd
+  service:
+    name: "{{ httpd_name[ansible_os_family] }}"
+    state: reloaded
+    enabled: yes
+  become: yes
diff --git a/dev-tools/ansible/roles/tusd/tasks/main.yml b/dev-tools/ansible/roles/tusd/tasks/main.yml
new file mode 100644
index 0000000..928a3ca
--- /dev/null
+++ b/dev-tools/ansible/roles/tusd/tasks/main.yml
@@ -0,0 +1,86 @@
+#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+---
+- name: Download tusd
+  get_url:
+    url: "{{ tusd_url }}"
+    dest: "{{ tusd_tarball_dest }}"
+    owner: "{{ user }}"
+    group: "{{ group }}"
+  become: yes
+
+- name: Untar tusd
+  unarchive:
+    src: "{{ tusd_tarball_dest }}"
+    remote_src: yes
+    dest: "{{ tusd_install_dir }}"
+    creates: "{{ tusd_dir }}"
+    owner: "{{ user }}"
+    group: "{{ group }}"
+  become: yes
+
+- name: create temporary directory for uploads
+  file:
+    path: "{{ tusd_upload_dir }}"
+    state: directory
+    owner: "{{ user }}"
+    group: "{{ group }}"
+  become: yes
+
+- name: open tusd port {{ tusd_port }}
+  firewalld:
+    port: "{{ tusd_port }}/tcp"
+    zone: public
+    permanent: true
+    state: enabled
+    immediate: yes
+  become: yes
+
+- name: copy SSL enabled tusd virtual host config file
+  template:
+    src: "tus-vhost.conf.j2"
+    dest: "{{ tusd_httpd_confd_file_location[ansible_os_family] }}"
+    backup: yes
+  become: yes
+  notify:
+    - restart httpd
+
+- name: Enable site in Apache (Debian)
+  command: a2ensite tus
+  become: yes
+  notify:
+    - restart httpd
+  when: ansible_os_family == "Debian"
+
+- name: copy tus.service systemd unit file
+  template:
+    src: "tus.service.j2"
+    dest: "/etc/systemd/system/tus.service"
+    backup: yes
+  become: yes
+
+- name: start tusd
+  service:
+    name: tus
+    state: started
+    enabled: yes
+    daemon_reload: yes
+  become: yes
diff --git a/dev-tools/ansible/inventories/scigap/develop/group_vars/django/vars.yml b/dev-tools/ansible/roles/tusd/templates/tus-vhost.conf.j2
similarity index 51%
copy from dev-tools/ansible/inventories/scigap/develop/group_vars/django/vars.yml
copy to dev-tools/ansible/roles/tusd/templates/tus-vhost.conf.j2
index 194ace4..a49b9ac 100644
--- a/dev-tools/ansible/inventories/scigap/develop/group_vars/django/vars.yml
+++ b/dev-tools/ansible/roles/tusd/templates/tus-vhost.conf.j2
@@ -1,5 +1,4 @@
-#
-#
+# 
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -7,9 +6,9 @@
 # to you under the Apache License, Version 2.0 (the
 # "License"); you may not use this file except in compliance
 # with the License.  You may obtain a copy of the License at
-#
+# 
 #   http://www.apache.org/licenses/LICENSE-2.0
-#
+# 
 # Unless required by applicable law or agreed to in writing,
 # software distributed under the License is distributed on an
 # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,17 +17,19 @@
 # under the License.
 #
 
----
-user: "pga"
-group: "pga"
-gateway_data_store_hostname: "pgadev.scigap.org"
-gateway_data_store_resource_id: "pgadev.scigap.org_7ddf28fd-d503-4ff8-bbc5-3279a7c3b99e"
-django_wsgi_processes: 1
-doc_root_dir: "/var/www/portals/django-{{gateway_id}}"
-admin_emails: "[('SGRC Group', 'sgrc-iu-group@iu.edu')]"
-django_error_emails: "[('Marcus Christie', 'machrist@iu.edu'), ('Eroma Abeysinghe', 'eabeysin@iu.edu')]"
-django_database_name: "django_{{ gateway_id }}"
-django_hidden_airavata_apps: "['django_airavata_dataparsers']"
-django_tus_endpoint: "https://tus.dev.scigap.org/files/"
-airavata_django_git_branch: "develop"
-# django_keycloak_ca_certfile_path: 'os.path.join(BASE_DIR, "django_airavata", "resources", "incommon_rsa_server_ca.pem")'
+# {{ ansible_managed }}
+
+<VirtualHost *:443>
+    ServerName {{ tusd_vhost_servername }}
+    SSLEngine on
+
+    SSLCertificateFile {{ tusd_ssl_certificate_file }}
+    SSLCertificateChainFile {{ tusd_ssl_certificate_chain_file }}
+    SSLCertificateKeyFile {{ tusd_ssl_certificate_key_file }}
+
+    RequestHeader set X-Forwarded-Proto "https"
+    ProxyPreserveHost on
+
+    ProxyPass /files http://localhost:{{ tusd_port }}/files
+    ProxyPassReverse /files http://localhost:{{ tusd_port }}/files
+</VirtualHost>
diff --git a/dev-tools/ansible/inventories/scigap/develop/group_vars/django/vars.yml b/dev-tools/ansible/roles/tusd/templates/tus.service.j2
similarity index 51%
copy from dev-tools/ansible/inventories/scigap/develop/group_vars/django/vars.yml
copy to dev-tools/ansible/roles/tusd/templates/tus.service.j2
index 194ace4..96626ee 100644
--- a/dev-tools/ansible/inventories/scigap/develop/group_vars/django/vars.yml
+++ b/dev-tools/ansible/roles/tusd/templates/tus.service.j2
@@ -18,17 +18,15 @@
 # under the License.
 #
 
----
-user: "pga"
-group: "pga"
-gateway_data_store_hostname: "pgadev.scigap.org"
-gateway_data_store_resource_id: "pgadev.scigap.org_7ddf28fd-d503-4ff8-bbc5-3279a7c3b99e"
-django_wsgi_processes: 1
-doc_root_dir: "/var/www/portals/django-{{gateway_id}}"
-admin_emails: "[('SGRC Group', 'sgrc-iu-group@iu.edu')]"
-django_error_emails: "[('Marcus Christie', 'machrist@iu.edu'), ('Eroma Abeysinghe', 'eabeysin@iu.edu')]"
-django_database_name: "django_{{ gateway_id }}"
-django_hidden_airavata_apps: "['django_airavata_dataparsers']"
-django_tus_endpoint: "https://tus.dev.scigap.org/files/"
-airavata_django_git_branch: "develop"
-# django_keycloak_ca_certfile_path: 'os.path.join(BASE_DIR, "django_airavata", "resources", "incommon_rsa_server_ca.pem")'
+# {{ansible_managed}}
+
+[Unit]
+Description=Tusd
+
+[Service]
+ExecStart={{ tusd_dir }}/tusd -dir {{ tusd_upload_dir }} -port {{ tusd_port }} -behind-proxy
+User={{user}}
+Group={{group}}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/modules/ide-integration/src/main/resources/database_scripts/init/03-appcatalog-migrations.sql b/modules/ide-integration/src/main/resources/database_scripts/init/03-appcatalog-migrations.sql
index 0119ceb..322d5af 100644
--- a/modules/ide-integration/src/main/resources/database_scripts/init/03-appcatalog-migrations.sql
+++ b/modules/ide-integration/src/main/resources/database_scripts/init/03-appcatalog-migrations.sql
@@ -11,6 +11,6 @@ CREATE INDEX IF NOT EXISTS I_CMPTN_Q_RESERVATION_ID ON COMPUTE_RESOURCE_RESERVAT
 ALTER TABLE COMPUTE_RESOURCE_RESERVATION ADD CONSTRAINT FK_COMPUTE_RESOURCE_RESERVATION FOREIGN KEY IF NOT EXISTS (RESOURCE_ID, GROUP_RESOURCE_PROFILE_ID) REFERENCES GROUP_COMPUTE_RESOURCE_PREFERENCE (RESOURCE_ID, GROUP_RESOURCE_PROFILE_ID) ON DELETE CASCADE;
 
 -- AIRAVATA-3327: Remove deprecated reservation fields
-alter table GROUP_COMPUTE_RESOURCE_PREFERENCE drop column IF EXISTS RESERVATION;
-alter table GROUP_COMPUTE_RESOURCE_PREFERENCE drop column IF EXISTS RESERVATION_START_TIME;
-alter table GROUP_COMPUTE_RESOURCE_PREFERENCE drop column IF EXISTS RESERVATION_END_TIME;
+--alter table GROUP_COMPUTE_RESOURCE_PREFERENCE drop column IF EXISTS RESERVATION;
+--alter table GROUP_COMPUTE_RESOURCE_PREFERENCE drop column IF EXISTS RESERVATION_START_TIME;
+--alter table GROUP_COMPUTE_RESOURCE_PREFERENCE drop column IF EXISTS RESERVATION_END_TIME;
diff --git a/modules/ide-integration/src/main/resources/docker-compose.yml b/modules/ide-integration/src/main/resources/docker-compose.yml
index 3798117..0635197 100644
--- a/modules/ide-integration/src/main/resources/docker-compose.yml
+++ b/modules/ide-integration/src/main/resources/docker-compose.yml
@@ -1,7 +1,7 @@
 version: '3'
 services:
   keycloak:
-    image: jboss/keycloak:2.5.4.Final
+    image: jboss/keycloak
     environment:
       - KEYCLOAK_USER=admin
       - KEYCLOAK_PASSWORD=admin
@@ -14,7 +14,7 @@ services:
       - ./keycloak/standalone.xml:/opt/jboss/keycloak/standalone/configuration/standalone.xml
     command: ["-b", "0.0.0.0", "-Dkeycloak.migration.action=import", "-Dkeycloak.migration.provider=singleFile", "-Dkeycloak.migration.file=/opt/keycloak/Default-export.json", "-Dkeycloak.migration.strategy=OVERWRITE_EXISTING"]
   db:
-    image: mariadb:10.4.13
+    image: mariadb:10.4
     environment:
       - MYSQL_ROOT_PASSWORD=123456
       - MYSQL_USER=airavata


[airavata] 02/02: Merge branch 'airavata-3411' into develop

Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata.git

commit 6d18965c858370ac0348096415d2beae3e1f8564
Merge: a252e9c 461da06
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Mon Feb 22 19:01:49 2021 -0500

    Merge branch 'airavata-3411' into develop

 dev-tools/ansible/django.yml                       |  2 +
 .../scigap/develop/group_vars/django/vars.yml      |  2 +-
 .../scigap/develop/host_vars/delta/vars.yml        |  4 +-
 .../scigap/production/group_vars/django/vars.yml   |  2 +-
 .../scigap/production/host_vars/delta/vars.yml     |  4 +-
 .../scigap/production/host_vars/dreg/vars.yml      |  2 +-
 .../production/host_vars/futurewater/vars.yml      |  2 +-
 .../production/host_vars/global-flood/vars.yml     | 53 +++++++++++++
 .../production/host_vars/global-flood/vault.yml    | 15 ++++
 .../scigap/production/host_vars/immune/vars.yml    | 53 +++++++++++++
 .../scigap/production/host_vars/immune/vault.yml   | 15 ++++
 .../host_vars/microbial-genomes/vars.yml           |  2 +-
 .../scigap/production/host_vars/mines/vars.yml     |  2 +-
 .../host_vars/{mines => regsnps}/vars.yml          | 30 ++++----
 .../scigap/production/host_vars/regsnps/vault.yml  | 15 ++++
 .../scigap/production/host_vars/simccs/vars.yml    |  2 +-
 .../production/host_vars/simvascular/vars.yml      |  2 +-
 .../ansible/inventories/scigap/production/hosts    |  3 +
 .../inventories/scigap/production/immune/vault.yml | 15 ++++
 .../scigap/staging/group_vars/django/vars.yml      |  2 +-
 dev-tools/ansible/roles/django/defaults/main.yml   |  1 -
 dev-tools/ansible/roles/django/tasks/main.yml      | 10 +++
 .../roles/django/templates/settings_local.py.j2    |  6 +-
 dev-tools/ansible/roles/env_setup/tasks/main.yml   |  1 +
 .../vars.yml => roles/tusd/defaults/main.yml}      | 32 ++++----
 .../vars.yml => roles/tusd/handlers/main.yml}      | 21 ++----
 dev-tools/ansible/roles/tusd/tasks/main.yml        | 86 ++++++++++++++++++++++
 .../tusd/templates/tus-vhost.conf.j2}              | 37 +++++-----
 .../tusd/templates/tus.service.j2}                 | 26 +++----
 .../init/03-appcatalog-migrations.sql              |  6 +-
 .../src/main/containers/docker-compose.yml         |  4 +-
 31 files changed, 362 insertions(+), 95 deletions(-)