Skip to content
Snippets Groups Projects
Commit b787a099 authored by Alexander König's avatar Alexander König
Browse files

Merge branch 'master' of gitlab.scientificnet.org:commul/dspace

This is meant to re-integrate the sfn repository and the github
repository into being the same
parents a4663036 d24d7d32
No related branches found
No related tags found
No related merge requests found
Showing
with 3928 additions and 0 deletions
......@@ -66,3 +66,192 @@ su -s /bin/sh tomcat8
cd /opt/repository/sources/dspace/utilities/project_helpers/scripts
/etc/init.d/tomcat8 start
```
# DSpace directory structure
This is the directory structure
```
├── clarin-dspace-docker
│ └── commul-customization
└── kubernetes
├── helm
│ └── dspace
│ ├── charts
│ │ └── postgresql
│ │ └── templates
│ └── templates
└── yaml
```
* `/clarin-dspace-docker` - Docker files, copied from https://github.com/commul/clarin-dspace-docker @ 74d06d3 . **With this directory, you can build images**
* `/kubernetes/helm` - Chart Directory. Refer to https://github.com/kubernetes/helm/blob/master/docs/charts.md#the-chart-file-structure :exclamation: **not working yet** :exclamation:
* `/kubernetes/yaml` - Useful for tests, but helm is a more flexible approach **With this directory, you can deploy images in kubernetes cluster**
# Introduction
# Prerequisites
* Kubernetes cluster
## To interact with cluster
* Kubernetes credentials
* a working [kubectl] (https://kubernetes.io/docs/tasks/tools/install-kubectl/)
## To interact with Helm server (tiller) -- Coming soon
* Kubernetes credentials
* a working [kubectl] (https://kubernetes.io/docs/tasks/tools/install-kubectl/)
* a working [helm client] (https://docs.helm.sh/using_helm/#quickstart-guide)
# How to use it
## Workflow
First of all, check if a docker image already exists.
If it exist, pull, otherwise, you need to build one.
If necessary create a [personal token](https://gitlab.scientificnet.org/profile/personal_access_tokens) and login into GitLab Registry.
```console
docker login gitlab.scientificnet.org:4567
```
### Use existing Docker image
```console
docker image ls -a gitlab.scientificnet.org:4567/commul/dspace/*
docker pull gitlab.scientificnet.org:4567/commul/dspace/<my_image>:<my tag>
```
### Build images
* build your docker image from `/clarin-dspace-docker` directory
* push to `https://gitlab.scientificnet.org/commul/dspace/container_registry`
```console
docker build -t gitlab.scientificnet.org:4567/commul/dspace/<my_image>:<my tag> -f Dockerfile.XX .
docker push gitlab.scientificnet.org:4567/commul/dspace/<my_image>:<my tag>
```
# Installation
This step in a "workspace preparation" and is not directly related with dspace.
Provide gitlab & RBD credentials
```console
$ kubectl -n dspace-dev create -f gitlab-scientificnet-org-registry.yaml
```
```console
$ kubectl -n dspace-dev create -f rbd-secret.yaml
```
## PostgreSQL
To install PostgreSQL, we need some passwords, so we need Kubernetes secrets
```console
$ kubectl -n dspace-dev create -f postgresql-secret.yaml
secret "dspace-postgresql" created
```
```console
$ kubectl -n dspace-dev create -f dspace-secrets.yaml
secret "dspace-secrets" created
```
```console
$ kubectl -n dspace-dev get secrets
NAME TYPE DATA AGE
ceph-rbd-secret kubernetes.io/rbd 1 14m
default-token-c1pd4 kubernetes.io/service-account-token 3 4d
dspace-postgresql Opaque 1 1h
dspace-secrets Opaque 1 1m
gitlab-scientificnet-org-registry kubernetes.io/dockerconfigjson 1 46m
```
Next, create a RBD Claim
```console
$ kubectl -n dspace-dev create -f postgresql-pvc.yaml
persistentvolumeclaim "dspace-postgresql" created
$ kubectl -n dspace-dev get pvc
NAME STATUS VOLUME CAPACITY ACCESSMODES STORAGECLASS AGE
dspace-postgresql Bound pvc-610c358d-a518-11e7-b21c-b60483de6a40 8Gi RWO auto 2s
```
Ok, now we are ready to deploy our PostgreSQL!
```console
$ kubectl -n dspace-dev create -f postgresql.yaml
$ kubectl -n dspace-dev get po
NAME READY STATUS RESTARTS AGE
dspace-postgresql-1806947503-cj077 0/1 ContainerCreating 0 2s
$ kubectl -n dspace-dev get po
NAME READY STATUS RESTARTS AGE
dspace-postgresql-1806947503-qw8q4 0/1 Running 0 9s
$ kubectl -n dspace-dev get po
NAME READY STATUS RESTARTS AGE
dspace-postgresql-1806947503-qw8q4 1/1 Running 0 46s
```
We have now launched the pod but we have to wait until the pod is up before accessing it
```console
$ kubectl -n dspace-dev exec -it dspace-postgresql-1806947503-qw8q4 bash
root@dspace-postgresql-1806947503-qw8q4:/#
```
Also, we can also test our PostgreSQL installation with a port forward
```console
$ kubectl -n dspace-dev port-forward dspace-postgresql-1806947503-qw8q4 5432:5432
```
now we are able to connect to localhost:5432
![pgAdmin_connect](pgadmin_1.png)
![pgAdmin_showTables](pgadmin_2.png)
```console
$ kubectl -n dspace-dev create -f postgresql-service.yaml
service "dspace-postgresql" created
```
```console
$ kubectl -n dspace-dev exec -it servlet env | grep POSTGRESQL
DSPACE_POSTGRESQL_SERVICE_PORT_POSTGRESQL=5432
DSPACE_POSTGRESQL_PORT_5432_TCP_ADDR=10.13.0.173
DSPACE_POSTGRESQL_SERVICE_HOST=10.13.0.173
DSPACE_POSTGRESQL_PORT_5432_TCP_PROTO=tcp
DSPACE_POSTGRESQL_PORT_5432_TCP_PORT=5432
DSPACE_POSTGRESQL_SERVICE_PORT=5432
DSPACE_POSTGRESQL_PORT=tcp://10.13.0.173:5432
DSPACE_POSTGRESQL_PORT_5432_TCP=tcp://10.13.0.173:5432
```
## DSpace
```console
$ kubectl -n dspace-dev create -f servlet.yaml
pod "servlet" created
```
```console
$ kubectl -n dspace-dev get po
NAME READY STATUS RESTARTS AGE
dspace-postgresql-1806947503-qw8q4 1/1 Running 0 4d
servlet 1/1 Running 0 34s
```
```console
$ kubectl -n dspace-dev logs servlet
[Wed Oct 4 12:24:25 UTC 2017] Starting
[Wed Oct 4 12:24:25 UTC 2017] Cloning lindat-dspace repository...skip! /opt/repository/sources/dspace already exists
[Wed Oct 4 12:24:25 UTC 2017] Creating workspace...skip! /opt/repository/workspace already exists
[Wed Oct 4 12:24:25 UTC 2017] Copy makefile...skip! /opt/repository/workspace/config/variable.makefile already exists
[Wed Oct 4 12:24:25 UTC 2017] Copy local.properties...skip! /opt/repository/workspace/sources/local.properties already exists
[Wed Oct 4 12:24:25 UTC 2017] Compilation and Deployment of DSpace...already done
already done
already done
[Wed Oct 4 12:24:25 UTC 2017] Copy aai_config.js...skip! /opt/lindat-dspace/installation/webapps/xmlui/themes/UFAL/lib/js/aai_config.js already exists
[Wed Oct 4 12:24:25 UTC 2017] Create dspace admin...already done
[Wed Oct 4 12:24:25 UTC 2017] Starting Tomcat...Starting Tomcat 8...
Tomcat started.
```
```console
$ kubectl -n dspace-dev port-forward servlet 8080:8080
Forwarding from 127.0.0.1:8080 -> 8080
Forwarding from [::1]:8080 -> 8080
```
connect to http://localhost:8080/repository/xmlui/#
commul-customization/certs/*
password_mod.sh
############################################################
# Dockerfile to build LINDAT Dspace container images
# Based on Ubuntu
############################################################
FROM ubuntu
LABEL maintainer="Alexander König <Alexander.Koenig@eurac.edu>"
# install cpanm and dependencies
RUN apt-get update &&\
apt-get -y upgrade &&\
apt-get -y install make gcc wget cpanminus
RUN cpanm File::Spec::Functions
RUN cpanm Term::ReadLine
# install jdk, ant, psql, mvn, make, libxml, xsltproc, zip, wget
RUN apt-get -y install openjdk-8-jdk ant maven libxml2-utils xsltproc unzip curl git
# install convenience apps for debug purposes (vim and jsbeautifier)
RUN apt-get -y install vim less python-pip
RUN pip install --upgrade pip
RUN pip install jsbeautifier
COPY commul-customization/__init__.py /usr/local/lib/python2.7/dist-packages/jsbeautifier/
# set up a proper locale
RUN apt-get -y install locales
RUN locale-gen en_US.UTF-8
COPY commul-customization/default_locale /etc/default/locale
RUN chmod 0755 /etc/default/locale
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8
# build tomcat 8.0.35, version recommended by LINDAT
RUN wget -O /tmp/apache-tomcat-8.0.35.tar.gz https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.35/bin/apache-tomcat-8.0.35.tar.gz
RUN mkdir /opt/tomcat8
RUN tar xvzf /tmp/apache-tomcat-8.0.35.tar.gz -C /opt/tomcat8/ --strip-components=1
RUN groupadd tomcat8
RUN useradd -s /bin/false -g tomcat8 -d /opt/tomcat8/ tomcat8
# change permissions
RUN chown -R tomcat8:tomcat8 /opt/tomcat8
# copy config files etc. (init script,catalina.sh,setenv.sh,server.xml
COPY commul-customization/tomcat8 /etc/init.d/
RUN chmod a+x /etc/init.d/tomcat8
COPY commul-customization/catalina.sh /opt/tomcat8/bin/
COPY commul-customization/setenv.sh /opt/tomcat8/bin/
COPY commul-customization/tomcat-server.xml /opt/tomcat8/conf/server.xml
# install Dspace
RUN mkdir /tmp/commul-customization
COPY commul-customization/variable.makefile /tmp/commul-customization/
# copy over configs and startup scripts
COPY commul-customization/start_stack.sh /tmp/commul-customization/
COPY commul-customization/stop_stack.sh /tmp/commul-customization/
COPY commul-customization/local.properties /tmp/commul-customization/
# copy over config files
COPY commul-customization/aai_config.js /tmp/commul-customization/
#CMD tail -f /opt/repository/sources/dspace/dspace-api/src/test/data/dspaceFolder/log/dspace.log
COPY dspace-entrypoint.sh /
RUN chmod +x dspace-entrypoint.sh
ENTRYPOINT ["/dspace-entrypoint.sh"]
############################################################
# Dockerfile to build a handle server
# Based on Ubuntu
############################################################
FROM ubuntu
LABEL maintainer="Alexander König <Alexander.Koenig@eurac.edu>"
ENV TERM linux
RUN apt-get update &&\
apt-get -y upgrade &&\
apt-get -y install openjdk-8-jdk unzip wget make cpanminus gcc
# convenience packages
RUN apt-get -y install less vim
RUN cpanm Term::ReadLine
RUN cpanm File::Spec::Functions
RUN mkdir -p /hs/svr_1
WORKDIR /hs
RUN wget http://www.handle.net/hnr-source/hsj-8.1.1.tar.gz
RUN tar -xzf /hs/hsj-8.1.1.tar.gz
RUN mv hsj-8.1.1 hsj-8
COPY commul-customization/hdl-setup.tmp /tmp/
WORKDIR /hs/hsj-8
RUN cat /tmp/hdl-setup.tmp | bin/hdl-setup-server /hs/svr_1/
RUN perl -pi -e 's/YOUR_PREFIX/20.500.12084/' /hs/svr_1/config.dct
RUN perl -pi -e 's/case_sensitive" = "no/case_sensitive" = "yes/' /hs/svr_1/config.dct
RUN perl -i -plne 'print " \"storage_type\" = \"CUSTOM\"\n\ \"storage_class\" = \"org.dspace.handle.HandlePlugin\"" if(/max_session/);' /hs/svr_1/config.dct
# ENTRYPOINT ["/bin/bash"]
#######################################################################
# Dockerfile to build nginx and shibboleth for LINDAT Dspace container
# Based on Ubuntu
#######################################################################
FROM ubuntu
LABEL maintainer="Alexander König <Alexander.Koenig@eurac.edu>"
# install cpanm and dependencies
RUN apt-get update &&\
apt-get -y upgrade &&\
apt-get -y install make gcc wget cpanminus
RUN cpanm File::Spec::Functions
RUN cpanm Term::ReadLine
# install jdk, ant, psql, mvn, make, libxml, xsltproc, zip, wget
RUN apt-get -y install openjdk-8-jdk ant maven libxml2-utils xsltproc unzip curl
# install convenience apps for debug purposes (vim and jsbeautifier)
RUN apt-get -y install vim less python-pip
RUN pip install --upgrade pip
RUN pip install jsbeautifier
COPY commul-customization/__init__.py /usr/local/lib/python2.7/dist-packages/jsbeautifier/
# set up a proper locale
RUN apt-get -y install locales
RUN locale-gen en_US.UTF-8
COPY commul-customization/default_locale /etc/default/locale
RUN chmod 0755 /etc/default/locale
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8
# build nginx
RUN apt-get install -y zlib1g zlib1g-dev libpcre3 libpcre3-dev curl
RUN cpanm File::Spec::Functions
RUN cpanm Term::ReadLine
COPY commul-customization/nginx_build.sh /tmp/nginx_build.sh
RUN chmod a+x /tmp/nginx_build.sh
WORKDIR /tmp/
RUN ./nginx_build.sh
# copy the init script
COPY commul-customization/nginx /etc/init.d/
RUN chmod a+x /etc/init.d/nginx
# add a symlink
RUN ln -s /opt/nginx/sbin/nginx /usr/sbin/nginx
# copy over static html
RUN mkdir /opt/nginx/html/img
COPY commul-customization/index.html /opt/nginx/html/
COPY commul-customization/eurac.png /opt/nginx/html/img/
# create the test secure folder
RUN mkdir /opt/nginx/html/secure
COPY commul-customization/shib_test.pl /opt/nginx/html/secure/
# get aai project
RUN apt-get install -y git
RUN git clone https://github.com/ufal/lindat-aai-discovery.git /opt/repository/sources/lindat-aai-discovery
# install shibboleth
COPY commul-customization/shibboleth_sp_with_fastcgi.sh /tmp/
WORKDIR /tmp
RUN chmod u+x /tmp/shibboleth_sp_with_fastcgi.sh
RUN /tmp/shibboleth_sp_with_fastcgi.sh
# copy the init script
RUN cp /opt/shibboleth-sp-fastcgi/etc/shibboleth/shibd-debian /etc/init.d/shibd
RUN chmod a+x /etc/init.d/shibd
# install supervisor
RUN apt-get install -y python-setuptools
RUN easy_install supervisor
COPY commul-customization/supervisord.conf /etc/
RUN mkdir -p /var/log/supervisor
# copy over config files
COPY commul-customization/default-ssl /opt/nginx/conf/
COPY commul-customization/nginx.conf /opt/nginx/conf/
COPY commul-customization/repository_auth /opt/nginx/conf/
COPY commul-customization/shibboleth2.xml /opt/shibboleth-sp-fastcgi/etc/shibboleth/
COPY commul-customization/clarin.eurac.edu.template.metadata.xml /opt/shibboleth-sp-fastcgi/etc/shibboleth/
COPY commul-customization/shib_clear_headers /opt/nginx/conf/
# copy over config files
COPY commul-customization/aai.js /opt/repository/sources/lindat-aai-discovery/
WORKDIR /opt/repository/sources/lindat-aai-discovery/
RUN touch /opt/repository/sources/lindat-aai-discovery/aai.js
RUN make aai.min.js
# copy certificate for clarin-dev
COPY commul-customization/certs/lindat-dev.key /etc/ssl/private/
COPY commul-customization/certs/lindat-dev_eurac_edu.pem /etc/ssl/certs/
# if deployed on clarin instead of clarin-dev comment the two lines above and uncomment the following lines
## copy certificate for clarin
# COPY commul-customization/certs/lindat_eurac_edu.key /etc/ssl/private/
# COPY commul-customization/certs/lindat_eurac_edu.crt /etc/ssl/certs/
ENTRYPOINT ["/usr/local/bin/supervisord", "-c", "/etc/supervisord.conf"]
FROM postgres:9.6.3
LABEL maintainer="Alexander König <Alexander.Koenig@eurac.edu>"
# install git
RUN apt-get update &&\
apt-get -y install git
# copy int db script
RUN mkdir -p /docker-entrypoint-initdb.d
COPY commul-customization/init-dspace-dbs.sh /docker-entrypoint-initdb.d/
# copy utilities generating script
RUN mkdir /tmp/sql/
COPY adapt_utilities_sql.sh /tmp/sql/
RUN /tmp/sql/adapt_utilities_sql.sh
# dockerized CLARIN DSpace
This is meant to provide an easy way to install [CLARIN DSpace](https://github.com/ufal/clarin-dspace) by providing a Docker Compose setup that automatizes the installation as far as possible. Additionally all files that need to be customized or added are also part of this repository.
# How to use it
You need a Linux server (we tested on Ubuntu 16.04 and CentOS 7.3) with a recent install of Docker (we tested with 17.05.0-ce). Clone this git repository onto the server. Then you need to look through all the files in commul-customization and adapt the configuration to your server (domain name, user names, etc).
None of the files contain passwords, but all files which need passwords in them are in the repository as .dist files. To insert the passwords you need to remove the dist ending and then run password_mod.sh (after you've modified it with your passwords).
# Exemplary workflow
## get Dockerfiles
```
git clone https://github.com/commul/clarin-dspace-docker
cd clarin-dspace-docker
```
## get my versions of dist files
```
cp password_mod.sh.dist password_mod.sh
cp commul-customization/init-dspace-dbs.sh.dist commul-customization/init-dspace-dbs.sh
cp commul-customization/local.properties.dist commul-customization/local.properties
```
## change passwords
```
vi password_mod.sh
chmod +x password_mod.sh
./password_mod.sh
```
## make sure the certificate and key are there
```
cp -r /tmp/certs ./commul-customization/
```
## build the images
```
docker-compose up -d --build
```
## enter the DSpace container
```
docker exec -ti clarindspacedocker_dspace_1 bash
```
## deploy DSpace
```
make new_deploy
```
## copy over modified aai_config.js
```
cp /tmp/aai_config.js /opt/lindat-dspace/installation/webapps/xmlui/themes/UFAL/lib/js/
```
## create dspace admin as tomcat8, so that the log files have the right owner
```
su -s /bin/sh tomcat8
/opt/lindat-dspace/installation/bin/dspace create-administrator
```
## start the dspace webapp
```
cd /opt/repository/sources/dspace/utilities/project_helpers/scripts
/etc/init.d/tomcat8 start
```
#!/bin/bash
git clone https://github.com/commul/clarin-dspace.git -b clarin /tmp/dspace
cp /tmp/dspace/utilities/utilities.sql /tmp/sql/
cp /tmp/dspace/utilities/license_definition.txt /tmp/sql/
perl -pi -e "s#afile :utildir '/license_definition.txt'#afile '/tmp/sql/license_definition.txt'#;" /tmp/sql/utilities.sql
rm -rf /tmp/dspace
Releases
========
gitlab.scientificnet.org:4567/commul/dspace/dspace
0.3
added dspace-entrypoint.sh v0.2
0.2
Removed DSpace's installation from the Dockerfile.
Moved commul-customization into /tmp , so is possible to mount external volumes into /opt/repository/ and then copying files again from /tmp
0.1
Original build from https://github.com/commul/clarin-dspace-docker @ e5ad160
gitlab.scientificnet.org:4567/commul/dspace/postgres
0.3
added env variables
0.2
0.1
Original build from https://github.com/commul/clarin-dspace-docker @ e5ad160
#!/bin/bash
# outside the docker
perl -pi -e 's/clarin-dev/clarin/g' commul-customization/shibboleth2.xml
perl -pi -e 's/clarin-dev/clarin/g' commul-customization/local.properties
perl -pi -e 's/lindat-dev_eurac_edu.pem/lindat_eurac_edu.crt/;' commul-customization/default-ssl
perl -pi -e 's/lindat-dev.key/lindat_eurac_edu.key/;' commul-customization/default-ssl
perl -pi -e 's/clarin-dev/clarin/g' commul-customization/default-ssl
perl -pi -e 's/clarin-dev/clarin/g' commul-customization/aai.js
perl -pi -e 's/clarin-dev/clarin/g' commul-customization/aai_config.js
perl -pi -e 's/clarin-dev/clarin/g' commul-customization/lindat.eurac.edu.template.metadata.xml
echo "Modified all files to point to clarin.eurac.edu instead of clarin-dev.eurac.edu. Do not forget to also edit docker-compose.yml and Dockerfile.nginx."
This diff is collapsed.
'use strict';
(function(window){
function AAI() {
var host = 'https://' + window.location.hostname,
ourEntityID = host.match("clarin-dev.eurac.edu") ? "https://clarin-dev.eurac.edu" : host;
this.defaults = {
//host : 'https://ufal-point.mff.cuni.cz',
host : host, //better default (useful when testing on ufal-point-dev)
// do not add protocol because an error will appear in the DJ dialog
// if you see the error, your SP is not listed among djc trusted (edugain is enough to be trusted)
responseUrl: window.location.protocol + '//clarin-dev.eurac.edu/aai/discojuiceDiscoveryResponse.html',
ourEntityID: ourEntityID + '/Shibboleth.sso/Metadata',
serviceName: '',
metadataFeed: host + '/xmlui/discojuice/feeds',
selector: 'a.signon', // selector for login button
autoInitialize: true, // auto attach DiscoJuice to DOM
textHelpMore: "First check you are searching under the right country.\nIf your provider is not listed, please read <a href='https://clarin-dev.eurac.edu/how-do-i-sign-up' style='text-decoration: underline; font-weight: bold;'>these instructions</a> to obtain an account."
};
this.setup = function(options) {
var opts = jQuery.extend({}, this.defaults, options),
defaultCallback = function(e) {
window.location = opts.host + '/Shibboleth.sso/Login?SAMLDS=1&target=' + opts.target + '&entityID=' + window.encodeURIComponent(e.entityID);
};
//console.log(opts);
if(!opts.target){
throw 'You need to set the \'target\' parameter.';
}
// call disco juice setup
if (!opts.autoInitialize || $(opts.selector).length > 0) {
if(! window.DiscoJuice ){
throw 'Failed to find DiscoJuice. Did you include all that is necessary?';
}
var djc = DiscoJuice.Hosted.getConfig(
opts.serviceName,
opts.ourEntityID,
opts.responseUrl,
[ ],
opts.host + '/Shibboleth.sso/Login?SAMLDS=1&target='+opts.target+'&entityID=');
djc.metadata = [opts.metadataFeed];
djc.subtitle = "Login via Your home institution (e.g. university)";
djc.textHelp = opts.textHelp;
djc.textHelpMore = opts.textHelpMore;
djc.inlinemetadata = typeof opts.inlinemetadata === 'object' ? opts.inlinemetadata : [];
djc.inlinemetadata.push({
'country': '_all_',
'entityID': 'https://idm.clarin.eu',
'geo': {'lat': '51.833298', 'lon': '5.866699'},
'title': 'Clarin.eu website account',
'weight': -801
});
djc.inlinemetadata.push({
'country': 'IT',
'entityID': 'https://idp.eurac.edu/idp/shibboleth',
'geo': {'lat': '46.494281', 'lon': '11.346842'},
'title': 'Eurac Research',
'weight': -1000
});
if(opts.localauth) {
djc.inlinemetadata.push(
{
'entityID': 'local://',
'auth': 'local',
'title': 'Local authentication',
'country': '_all_',
'geo': null,
'weight': 1000
});
djc.callback = function(e){
var auth = e.auth || null;
switch(auth) {
case 'local':
DiscoJuice.UI.setScreen(opts.localauth);
jQuery('input#login').focus();
break;
//case 'saml':
default:
defaultCallback(e);
break;
}
};
}
if (opts.callback && typeof opts.callback === 'function') {
djc.callback = function(e) {
opts.callback(e, opts, defaultCallback);
};
}
if (opts.autoInitialize) {
jQuery(opts.selector).DiscoJuice( djc );
}
return djc;
} //if jQuery(selector)
};
}
if (!window.aai) {
window.aai = new AAI();
}
})(window);
"use strict";jQuery(document).ready(function(){var a=(function(){var b={};b.port=(window.location.port===""?"":":"+window.location.port);b.host=window.location.protocol+"//"+window.location.hostname;b.repoPath=jQuery("a#repository_path").attr("href");if(b.repoPath.charAt(b.repoPath.length-1)!=="/"){b.repoPath=b.repoPath+"/"}b.target=b.host+b.port+b.repoPath;b.responseUrl=(window.location.hostname.search("clarin-dev.eurac.edu")>=0)?"":b.host+b.port+b.repoPath+"themes/UFAL/lib/html/disco-juice.html?";b.metadataFeed=b.target+"discojuice/feeds";b.serviceName="Eurac Research CLARIN Centre";b.localauth='<form method="post" action="'+b.target+'password-login"> <p>Sign in using your local account obtained from the Eurac Research CLARIN Centre administrator.</p><p style="margin: 5px; color: #888" ><input type="text" name="login_email" style="font-size: 160%; width: 100%" id="login" /> <label for="login">E-Mail Address</label></p><p style="margin: 5px; color: #888" ><input type="password" name="login_password" style="font-size: 160%; width: 100%" id="pass" /> <label for="pass">Password</label></p><p style="margin: 5px; color: #607890; text-decoration: underline;"><a href="'+b.target+'forgot">Forgot your password?</a></p><p style="" ><input type="submit" style="margin: 20px 2px" name="submit" value="Sign in" /></p></form>';b.target=b.target+"shibboleth-login";return b})();if(!("aai" in window)){throw"Failed to find UFAL AAI object. See https://redmine.ms.mff.cuni.cz/projects/lindat-aai for more details!"}window.aai.setup(a)});
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" ID="_5d15d5a81bc952da1d34986ebc7713c0d5c9ea60" entityID="https://dspace-clarin-it.ilc.cnr.it/Shibboleth.sso/Metadata">
<md:Extensions>
<mdattr:EntityAttributes xmlns:mdattr="urn:oasis:names:tc:SAML:metadata:attribute">
<saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" Name="http://macedir.org/entity-category" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
<saml:AttributeValue>http://www.geant.net/uri/dataprotection-code-of-conduct/v1</saml:AttributeValue>
</saml:Attribute>
<saml:Attribute
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
Name="http://macedir.org/entity-category"
NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
<saml:AttributeValue>http://refeds.org/category/research-and-scholarship</saml:AttributeValue>
</saml:Attribute>
</mdattr:EntityAttributes>
</md:Extensions>
<md:SPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol urn:oasis:names:tc:SAML:1.1:protocol urn:oasis:names:tc:SAML:1.0:protocol">
<md:Extensions xmlns="urn:oasis:names:tc:SAML:2.0:metadata">
<mdui:UIInfo xmlns:mdui="urn:oasis:names:tc:SAML:metadata:ui">
<mdui:DisplayName xml:lang="en">Eurac Research CLARIN Centre</mdui:DisplayName>
<mdui:DisplayName xml:lang="de">Eurac Research CLARIN Centre</mdui:DisplayName>
<mdui:DisplayName xml:lang="it">Eurac Research CLARIN Centre</mdui:DisplayName>
<mdui:Description xml:lang="en">Eurac Research CLARIN Centre: Digital repository for language data</mdui:Description>
<mdui:Description xml:lang="de">Eurac Research CLARIN Centre: Digitales Repository für Sprachdaten</mdui:Description>
<mdui:Description xml:lang="it">Eurac Research CLARIN Centre: repository digitale di risorse linguistiche</mdui:Description>
<mdui:InformationURL xml:lang="en">https://clarin-dev.eurac.edu/repository/xmlui/page/about</mdui:InformationURL>
<mdui:InformationURL xml:lang="de">https://clarin-dev.eurac.edu/repository/xmlui/page/about</mdui:InformationURL>
<mdui:InformationURL xml:lang="it">https://clarin-dev.eurac.edu/repository/xmlui/page/about</mdui:InformationURL>
<mdui:Logo height="85" width="180">https://clarin-dev.eurac.edu/img/eurac.png</mdui:Logo>
<mdui:PrivacyStatementURL xml:lang="en">https://clarin-dev.eurac.edu/repository/xmlui/page/privacypolicy</mdui:PrivacyStatementURL>
<mdui:PrivacyStatementURL xml:lang="de">https://clarin-dev.eurac.edu/repository/xmlui/page/privacypolicy</mdui:PrivacyStatementURL>
<mdui:PrivacyStatementURL xml:lang="it">https://clarin-dev.eurac.edu/repository/xmlui/page/privacypolicy</mdui:PrivacyStatementURL>
</mdui:UIInfo>
</md:Extensions>
<md:AttributeConsumingService index="1">
<md:ServiceName xml:lang="en">Digital Repository for the CLARIN Research Infrastructure provided by Eurac Research</md:ServiceName>
<md:ServiceName xml:lang="de">Digitales Repository für die CLARIN-Forschungs-Infrastruktur bereitgestellt durch Eurac Research</md:ServiceName>
<md:ServiceName xml:lang="it">Repository Digitale per la Infrastruttura di Ricerca CLARIN erogato da Eurac Research</md:ServiceName>
<md:ServiceDescription xml:lang="en">Digital Repository and services related to the CLARIN-IT consortium under the CLARIN Research Infrastructure; focused in the fields of terminology and multilingualism. The repository is based at Eurac Research in South Tyrol and managed by the Institute for Applied Linguistics.</md:ServiceDescription>
<md:ServiceDescription xml:lang="it">Digitales Repository und Services mit Bezug zum CLARIN-IT-Consortium im Rahmen der CLARIN Forschungsinfrastruktur; mit Fokus auf den Gebieten der Terminologie und Mehrsprachigkeit. Das Repository wird von Eurac Research gehostet und dort vom Institut für Angewandte Sprachforschung betreut.</md:ServiceDescription>
<md:ServiceDescription xml:lang="it">Repository Digitale e servizi relativi al consorzio CLARIN-IT sotto l'Infrastruttura di Ricerca CLARIN; focalizzato nel campo della teminologia e multilinguismo. Il repository è basato a Eurac Research in Alto Adige e gestito del Istituto di Linguistica Applicata.</md:ServiceDescription>
<md:RequestedAttribute FriendlyName="eduPersonPrincipalName" Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.6" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" isRequired="true"/>
<md:RequestedAttribute FriendlyName="email" Name="urn:oid:0.9.2342.19200300.100.1.3" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" isRequired="true"/>
<md:RequestedAttribute FriendlyName="cn" Name="urn:oid:2.5.4.3" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" isRequired="false"/>
<md:RequestedAttribute FriendlyName="schacHomeOrganization" Name="urn:oid:1.3.6.1.4.1.25178.1.2.9" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" isRequired="false"/>
<md:RequestedAttribute FriendlyName="organizationName" Name="urn:oid:2.5.4.10" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" isRequired="false"/>
<md:RequestedAttribute FriendlyName="displayName" Name="urn:oid:2.16.840.1.113730.3.1.241" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" isRequired="true"/>
<md:RequestedAttribute FriendlyName="eduPersonEntitlement" Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.7" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" isRequired="false"/>
<md:RequestedAttribute FriendlyName="eduPersonTargetedID" Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.10" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" isRequired="true"/>
<md:RequestedAttribute FriendlyName="eduPersonScopedAffiliation" Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.9" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" isRequired="true"/>
</md:AttributeConsumingService>
</md:SPSSODescriptor>
<md:Organization>
<md:OrganizationName xml:lang="en">Eurac Research</md:OrganizationName>
<md:OrganizationName xml:lang="de">Eurac Research</md:OrganizationName>
<md:OrganizationName xml:lang="it">Eurac Research</md:OrganizationName>
<md:OrganizationDisplayName xml:lang="en">Eurac Research</md:OrganizationDisplayName>
<md:OrganizationDisplayName xml:lang="de">Eurac Research</md:OrganizationDisplayName>
<md:OrganizationDisplayName xml:lang="it">Eurac Research</md:OrganizationDisplayName>
<md:OrganizationURL xml:lang="en">http://www.eurac.edu/en</md:OrganizationURL>
<md:OrganizationURL xml:lang="de">http://www.eurac.edu/de</md:OrganizationURL>
<md:OrganizationURL xml:lang="it">http://www.eurac.edu/it</md:OrganizationURL>
</md:Organization>
<md:ContactPerson contactType="technical">
<md:GivenName>Alexander</md:GivenName>
<md:SurName>König</md:SurName>
<md:EmailAddress>mailto:Alexander.Koenig@eurac.edu</md:EmailAddress>
</md:ContactPerson>
<md:ContactPerson contactType="support">
<md:GivenName>Alexander</md:GivenName>
<md:SurName>König</md:SurName>
<md:EmailAddress>mailto:Alexander.Koenig@eurac.edu</md:EmailAddress>
</md:ContactPerson>
<md:ContactPerson contactType="administrative">
<md:GivenName>Andrea</md:GivenName>
<md:SurName>Abel</md:SurName>
<md:EmailAddress>mailto:Andrea.Abel@eurac.edu</md:EmailAddress>
</md:ContactPerson>
</md:EntityDescriptor>
upstream tomcats {
server dspace:8009;
keepalive 10;
}
server {
listen 80;
listen [::]:80;
server_name clarin-dev.eurac.edu;
return 301 https://$server_name$request_uri;
}
server {
listen 443;
server_name clarin-dev.eurac.edu localhost;
root /opt/nginx/html;
index index.html index.htm;
ssl on;
ssl_certificate /etc/ssl/certs/lindat-dev_eurac_edu.pem;
ssl_certificate_key /etc/ssl/private/lindat-dev.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers RC4:HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
keepalive_timeout 70;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
add_header 'Access-Control-Allow-Origin' "*";
add_header 'Access-Control-Allow-Credentials' 'true';
# redirect different legacy forms to repository/xmlui
rewrite ^/xmlui(.*)$ /repository/xmlui$1 redirect;
rewrite ^/repository.?$ /repository/xmlui/ redirect;
rewrite ^/solr(.*)$ /repository/solr$1 redirect;
rewrite ^/handle/(.*)$ /repository/xmlui/handle/$1 redirect;
set $oai_index /repository/oai/request?verb=Identify;
rewrite ^/oai$ $oai_index redirect;
location /oai {
return 301 https://$http_host/repository$request_uri;
}
rewrite ^/repository/oai$ $oai_index redirect;
if ($http_accept ~ "(.*xml.cmdi.*)"){
rewrite ^/(.*)/xmlui/handle/(.*)$ https://$http_host/repository/oai/cite?metadataPrefix=cmdi&handle=$2? redirect;
}
if ($query_string ~* "format=cmdi"){
rewrite ^/(.*)/xmlui/handle/(.*)$ https://$http_host/repository/oai/cite?metadataPrefix=cmdi&handle=$2? redirect;
}
if ($query_string ~* "format=cite_(cmdi|bibtex|html)"){
rewrite ^/(.*)/xmlui/handle/(.*)$ https://$http_host/repository/oai/cite?metadataPrefix=%1&handle=$2? redirect;
}
# location = / {
# return 301 /repository;
# }
location / {
index index.php index.html index.htm;
# try_files $uri $uri/ /index.php?$args;
# location ~ \.php$ {
# include process_php;
# }
}
location /repository {
client_body_buffer_size 32K;
client_max_body_size 4G;
sendfile on;
send_timeout 300s;
ajp_keep_conn on;
ajp_pass tomcats;
location /repository/solr {
satisfy any;
auth_basic "Restricted App";
auth_basic_user_file /etc/apache2/passwd/passwords;
allow 127.0.0.1;
deny all;
ajp_keep_conn on;
ajp_pass tomcats;
}
location /repository/JSON/solr/ {
rewrite /repository/JSON/solr/(.*) /repository/solr/search/select/?q=*:*&rows=0&facet=on&wt=json&indent=true&facet.field=$1 break;
proxy_pass http://localhost:8080;
}
}
# define aai location
location /aai {
alias /opt/repository/sources/lindat-aai-discovery; }
# add path your repository path that will be protected by shibboleth
location /repository/xmlui/shibboleth-login {
include repository_auth;
ajp_keep_conn on;
ajp_pass tomcats;
}
location /xmlui/shibboleth-login {
include repository_auth;
ajp_keep_conn on;
ajp_pass tomcats;
}
# remove the robots and favicon from the logs
location ~ /robots.txt$ { access_log off; log_not_found off; }
location ~ ^/favicon.ico$ { access_log off; log_not_found off; }
# this prevents hidden files (beginning with a period) from being served
location ~ /\. { access_log off; log_not_found off; deny all; }
# FastCGI authorizer for Auth Request module
location = /shibauthorizer {
internal;
include fastcgi_params;
fastcgi_pass unix:/opt/shibboleth-sp-fastcgi/shibauthorizer.sock;
}
# FastCGI responder
location /Shibboleth.sso {
include fastcgi_params;
fastcgi_pass unix:/opt/shibboleth-sp-fastcgi/shibresponder.sock;
}
# Resources for the Shibboleth error pages
location /shibboleth-sp {
alias /opt/shibboleth-sp-fastcgi/share/shibboleth/;
}
location /secure {
alias /opt/repository/sources/secure;
include shib_clear_headers;
#Add your attributes here. They get introduced as headers
#by the FastCGI authorizer so we must prevent spoofing.
more_clear_input_headers 'displayName' 'mail' 'persistent-id';
shib_request /shibauthorizer;
shib_request_use_headers on;
proxy_pass http://localhost:8080;
}
include /opt/nginx/conf/proxies-enabled/*;
}
# File generated by update-locale
LANG="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Pragma" content="no-cache">
<title>IdP Discovery Response Receiver</title>
<script type="text/javascript">
function parseURL(url) {
var a = document.createElement('a');
a.href = url;
return a.hostname;
}
function receive() {
var urlParams = {},
cid = null,
idpentityid,
subid,
rsearch
;
(function () {
var e,
a = /\+/g, // Regex for replacing addition symbol with a space
r = /([^&;=]+)=?([^&;]*)/g,
d = function (s) { return decodeURIComponent(s.replace(a, " ")); },
q = window.location.search.substring(1);
while (e = r.exec(q))
urlParams[d(e[1])] = d(e[2]);
})();
if (urlParams.cid) cid = urlParams.cid;
var sender = parseURL(document.referrer);
// Received a specific entity ID from the storage.
if (urlParams.entityID) {
window.parent.DiscoJuice.Utils.log("Entity id parameter was " + urlParams.entityID);
rsearch = urlParams.entityID.match(/^(.*)#(.*)$/);
if (rsearch) {
idpentityid = rsearch[1];
subid = rsearch[2];
} else {
idpentityid = urlParams.entityID;
subid = null;
}
window.parent.DiscoJuice.Utils.log('ResponseLocation: Response from discovery service [' + sender + ']: ' + idpentityid + ' subID: ' + subid);
window.parent.DiscoJuice.Control.discoResponse(sender, idpentityid, subid, cid);
// Received a textual error from the storage, to show in the debug log.
} else if (urlParams['error']) {
window.parent.DiscoJuice.Control.discoResponseError(cid,
"Error from IdP Discovery Service [" + sender + "]: " + urlParams.error);
// Did not receive a response parameter. This probably means that the Disco storage did not have a stored preference
// for the user. Consequently: no error.
} else {
window.parent.DiscoJuice.Utils.log('No valid response parameters. cid[' + cid + ']');
window.parent.DiscoJuice.Control.discoResponseError(cid);
}
}
</script>
</head>
<body onload="receive();">
</body>
</html>
clarin-dspace-docker/commul-customization/eurac.png

10.6 KiB

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment