Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#60 enable data explorer #85

Merged
merged 2 commits into from Jul 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions defaults/main.yml
Expand Up @@ -45,6 +45,8 @@ dataverse:
upload_to_hub: False
user: counter
year_month: "2018-05"
dataexplorer:
enabled: true
db:
name: dvndb
host: localhost
Expand Down
20 changes: 20 additions & 0 deletions files/dataExplorer.json
@@ -0,0 +1,20 @@
{
"displayName": "Data Explorer",
"description": "The Data Explorer provides a GUI which lists the variables in a tabular data file allowing searching, charting and cross tabulation analysis.",
"type": "explore",
"toolUrl": "https://scholarsportal.github.io/Dataverse-Data-Explorer/",
"toolParameters": {
"queryParameters": [
{
"fileId": "{fileId}"
},
{
"siteUrl": "{siteUrl}"
},
{
"key": "{apiToken}"
}
]
}
}

17 changes: 11 additions & 6 deletions tasks/dataverse-apache.yml
Expand Up @@ -8,6 +8,17 @@
when: ansible_os_family == "RedHat" and
ansible_distribution_major_version == "7"

- name: install http proxy when SSL disabled
template:
src: http.proxy.conf.j2
dest: /etc/httpd/conf.d/http.proxy.conf
owner: root
group: root
mode: '0644'
when: ansible_os_family == "RedHat" and
ansible_distribution_major_version == "7"
and apache.ssl.enabled == false

- include: dataverse-apache-ssl.yml
when: ansible_os_family == "RedHat" and
ansible_distribution_major_version == "7"
Expand All @@ -20,12 +31,6 @@
and apache.ssl.enabled == true
and letsencrypt.enabled == true

- name: install http proxy
template: src=dataverse.conf.j2 dest=/etc/httpd/conf.d/ssl.conf
when: ansible_os_family == "RedHat" and
ansible_distribution_major_version == "7"
and apache.ssl.enabled == false

- name: install proxy error boilerplate
copy: src=503.html dest=/etc/httpd/conf.d owner=root group=root mode=0644
when: ansible_os_family == "RedHat" and
Expand Down
21 changes: 21 additions & 0 deletions tasks/dataverse-externaltools.yml
@@ -0,0 +1,21 @@
---

- name: enable wholetale externaltool
uri:
url: http://localhost:8080/api/admin/externalTools
method: POST
headers:
Content-type: "application/json"
body_format: json
body: "{{ lookup('file', 'wholetale.json') }}"
when: dataverse.wholetale.enabled == true

- name: enable data explorer on demand
uri:
url: http://localhost:8080/api/admin/externalTools
method: POST
headers:
Content-type: "application/json"
body_format: json
body: "{{ lookup('file', 'dataExplorer.json') }}"
when: dataverse.dataexplorer.enabled == true
10 changes: 0 additions & 10 deletions tasks/dataverse-wholetale.yml

This file was deleted.

5 changes: 2 additions & 3 deletions tasks/main.yml
Expand Up @@ -55,9 +55,8 @@
when: dataverse.previewers.enabled == true
tags: previewers

- include: dataverse-wholetale.yml
when: dataverse.wholetale.enabled == true
tags: wholetale
- include: dataverse-externaltools.yml
tags: externaltools

- include: dataverse-api-testsuite.yml
when: dataverse.api.test_suite == true
Expand Down
21 changes: 21 additions & 0 deletions templates/http.proxy.conf.j2
@@ -0,0 +1,21 @@
<VirtualHost *:80>

ServerName {{ servername }}

# custom error document when Glassfish isn't responding
ErrorDocument 503 /503.html
ProxyPassMatch ^/503.html$ !

# don't pass paths used by rApache and TwoRavens to Glassfish
ProxyPassMatch ^/RApacheInfo$ !
ProxyPassMatch ^/custom !
ProxyPassMatch ^/dataexplore !

# don't pass paths used by Shibboleth to Glassfish
ProxyPassMatch ^/Shibboleth.sso !
ProxyPassMatch ^/shibboleth-ds !

# pass everything else to Glassfish
ProxyPass / ajp://localhost:8009/

</VirtualHost>
2 changes: 2 additions & 0 deletions tests/group_vars/vagrant.yml
Expand Up @@ -45,6 +45,8 @@ dataverse:
upload_to_hub: False
user: counter
year_month: "2018-05"
dataexplorer:
enabled: true
db:
name: dvndb
host: localhost
Expand Down