Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • commul/docker/clarin-dspace
1 result
Show changes
Commits on Source (31)
Showing
with 249 additions and 2430 deletions
...@@ -6,11 +6,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ...@@ -6,11 +6,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased] ## [Unreleased]
### Added
### Changed
### Removed
### Fixed
## [1.3.5] - 2020-01-22
### Added ### Added
- org.label-schema LABELs for version, build-date, vcs-url in docker images
- explicit CATALINA_PID path
- build and install Apache Tomcat Native Library
### Changed ### Changed
- bump tomcat to latest 8.0 (=8.0.53) version
- increase java memory settings for tomcat (just-in-case)
- use regular catalina.sh start/stop/run commands (which in turn considers setenv.sh)
- ContacPerson(s) in SP definition
### Removed ### Removed
- own catalina.sh (use dist versions)
- tomcat8 init.d script (wasn't used)
### Fixed ### Fixed
- (automatic redirects to) https://clarin.eurac.edu:8443/... not working
## [1.3.4] - 2019-10-14 ## [1.3.4] - 2019-10-14
...@@ -29,12 +50,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -29,12 +50,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- #62 - #62
## [1.3.3] - 2019-07-23 ## [1.3.3] - 2019-07-23
### Changed ### Changed
- adapted healthcheck "cronjob" to force exit in case it hangs for some reason (#60) - adapted healthcheck "cronjob" to force exit in case it hangs for some reason (#60)
## [1.3.2] - 2019-06-27 ## [1.3.2] - 2019-06-27
### Added ### Added
...@@ -55,6 +78,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -55,6 +78,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- fixed get URL for xerces - fixed get URL for xerces
- IdP metadata from CLARIN are now downloaded during Docker build and not only once the container is running - IdP metadata from CLARIN are now downloaded during Docker build and not only once the container is running
## [1.3] - 2018-09-05 ## [1.3] - 2018-09-05
### Added ### Added
...@@ -71,12 +95,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -71,12 +95,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Made sure that tomcat is stopped with `-force` in entrypoint script to ensure that only one instance is running - Made sure that tomcat is stopped with `-force` in entrypoint script to ensure that only one instance is running
## [1.2.2] - 2018-08-31 ## [1.2.2] - 2018-08-31
### Fixed ### Fixed
- Changed the DSpace config to use the production handle prefix and not the staging one - Changed the DSpace config to use the production handle prefix and not the staging one
## [1.2] - 2018-08-27 ## [1.2] - 2018-08-27
### Added ### Added
...@@ -101,6 +127,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -101,6 +127,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Shibboleth build script now uses fixed version numbers instead of latest - Shibboleth build script now uses fixed version numbers instead of latest
- Super short session timeout will no longer happen (#44) - Super short session timeout will no longer happen (#44)
## [1.1] - 2018-06-15 ## [1.1] - 2018-06-15
### Added ### Added
...@@ -122,7 +149,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -122,7 +149,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
This is the first release. It all starts here. This is the first release. It all starts here.
[Unreleased]:https://gitlab.inf.unibz.it/commul/docker/clarin-dspace/compare/v1.3.4...HEAD [Unreleased]:https://gitlab.inf.unibz.it/commul/docker/clarin-dspace/compare/v1.3.5...HEAD
[1.3.5]: https://gitlab.inf.unibz.it/commul/docker/clarin-dspace/compare/v1.3.4...v1.3.5
[1.3.4]: https://gitlab.inf.unibz.it/commul/docker/clarin-dspace/compare/v1.3.3...v1.3.4 [1.3.4]: https://gitlab.inf.unibz.it/commul/docker/clarin-dspace/compare/v1.3.3...v1.3.4
[1.3.3]: https://gitlab.inf.unibz.it/commul/docker/clarin-dspace/compare/v1.3.2...v1.3.3 [1.3.3]: https://gitlab.inf.unibz.it/commul/docker/clarin-dspace/compare/v1.3.2...v1.3.3
[1.3.2]: https://gitlab.inf.unibz.it/commul/docker/clarin-dspace/compare/v1.3.1...v1.3.2 [1.3.2]: https://gitlab.inf.unibz.it/commul/docker/clarin-dspace/compare/v1.3.1...v1.3.2
......
Dockerfile.*
release.sh
############################################################ ##############################################################################
# Dockerfile to build LINDAT Dspace container images # Dockerfile to build LINDAT Dspace container images
# Based on Ubuntu # Based on Ubuntu
############################################################ ##############################################################################
FROM ubuntu:16.04 ARG UBUNTU_VERSION=16.04
LABEL maintainer="Alexander König <Alexander.Koenig@eurac.edu>" FROM ubuntu:$UBUNTU_VERSION
ARG UBUNTU_VERSION
ARG LABEL_VCS_URL="https://gitlab.inf.unibz.it/commul/docker/clarin-dspace"
LABEL maintainer="Alexander König <Alexander.Koenig@eurac.edu>" \
maintainer="Egon W. Stemle <egon.stemle@eurac.edu>"
ENV TOMCAT_VERSION="8.0.53"
ENV TOMCAT_SHA512="cd8a4e48a629a2f2bb4ce6b101ebcce41da52b506064396ec1b2915c0b0d8d82123091242f2929a649bcd8b65ecf6cd1ab9c7d90ac0e261821097ab6fbe22df9 *apache-tomcat-8.0.53.tar.gz"
# https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.53/bin/apache-tomcat-8.0.53.tar.gz.sha512
ENV TERM linux
# APT(-GET) tweaks
# Set some sane defaults for apt inside docker
ENV DEBIAN_FRONTEND=noninteractive
COPY apt.local.conf /etc/apt/apt.conf.d/99local.conf
# use fast(er) local mirrors
COPY ubuntu-$UBUNTU_VERSION.sources.list /etc/apt/sources.list
RUN apt-get update && \
apt-get upgrade
# install cpanm and dependencies # install cpanm and dependencies
RUN apt-get update \
&& apt-get -y upgrade \
&& apt-get -y install make gcc wget cpanminus
RUN cpanm -n File::Spec::Functions
RUN cpanm Term::ReadLine
# install jdk, ant, psql, mvn, make, libxml, xsltproc, zip, wget # install jdk, ant, psql, mvn, make, libxml, xsltproc, zip, wget
RUN apt-get update && apt-get -y install openjdk-8-jdk ant maven libxml2-utils xsltproc unzip curl git RUN apt-get update && apt-get install \
unzip curl wget git \
make gcc \
cpanminus \
openjdk-8-jdk ant maven libxml2-utils xsltproc \
libapr1-dev
RUN cpanm -n File::Spec::Functions && \
cpanm Term::ReadLine
# install convenience apps for debug purposes (vim and jsbeautifier) # install convenience apps for debug purposes (vim and jsbeautifier)
RUN apt-get update && apt-get -y install vim less python-pip RUN apt-get update && apt-get install vim less python-pip
RUN pip install --upgrade pip
RUN pip install jsbeautifier RUN pip install jsbeautifier
COPY commul-customization/__init__.py /usr/local/lib/python2.7/dist-packages/jsbeautifier/ COPY commul-customization/__init__.py /usr/local/lib/python2.7/dist-packages/jsbeautifier/
# set up a proper locale # set up a proper locale
RUN apt-get -y install locales RUN apt-get update && apt-get install locales
RUN locale-gen en_US.UTF-8 RUN locale-gen en_US.UTF-8
COPY commul-customization/default_locale /etc/default/locale COPY commul-customization/default_locale /etc/default/locale
RUN chmod 0755 /etc/default/locale RUN chmod 0755 /etc/default/locale
...@@ -33,43 +52,64 @@ ENV LC_ALL=en_US.UTF-8 ...@@ -33,43 +52,64 @@ ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8 ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8 ENV LANGUAGE=en_US.UTF-8
# build tomcat 8.0.35, version recommended by LINDAT ### Install Tomcat
RUN wget -O /tmp/apache-tomcat-8.0.52.tar.gz https://archive.apache.org/dist/tomcat/tomcat-8/v8.0.52/bin/apache-tomcat-8.0.52.tar.gz #
RUN mkdir /opt/tomcat8 # build tomcat $TOMCAT_VERSION (> 8.0.35), version recommended by LINDAT
RUN tar xvzf /tmp/apache-tomcat-8.0.52.tar.gz -C /opt/tomcat8/ --strip-components=1 RUN wget -O /tmp/apache-tomcat-$TOMCAT_VERSION.tar.gz \
RUN groupadd tomcat8 https://archive.apache.org/dist/tomcat/tomcat-8/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz
RUN useradd -s /bin/false -g tomcat8 -d /opt/tomcat8/ tomcat8 WORKDIR /tmp
# change permissions # checksum check the download
RUN chown -R tomcat8:tomcat8 /opt/tomcat8 RUN echo "$TOMCAT_SHA512" > /tmp/apache-tomcat.sha512 && \
# copy config files etc. (init script,catalina.sh,setenv.sh,server.xml sha512sum --check apache-tomcat.sha512
COPY commul-customization/tomcat8 /etc/init.d/
RUN chmod a+x /etc/init.d/tomcat8 RUN mkdir /opt/tomcat8 && \
COPY commul-customization/catalina.sh /opt/tomcat8/bin/ tar xzf /tmp/apache-tomcat-$TOMCAT_VERSION.tar.gz \
COPY commul-customization/setenv.sh /opt/tomcat8/bin/ -C /opt/tomcat8/ \
--strip-components=1 && \
groupadd tomcat8 && \
useradd -s /bin/false -g tomcat8 -d /opt/tomcat8/ tomcat8 && \
chown -R tomcat8:tomcat8 /opt/tomcat8
# Install Apache Tomcat Native
# prerequisites: libopenssl, libapr1, jdk
RUN mkdir /opt/tomcat8/bin/tomcat-native && \
tar xzf /opt/tomcat8/bin/tomcat-native.tar.gz \
-C /opt/tomcat8/bin/tomcat-native \
--strip-components=1 && \
cd /opt/tomcat8/bin/tomcat-native/native && \
./configure \
--with-java-home=/usr/lib/jvm/java-8-openjdk-amd64/ \
--prefix=/usr/local/ && \
make && make install
# copy config files etc. (setenv.sh,server.xml)
COPY commul-customization/tomcat-setenv.sh /opt/tomcat8/bin/setenv.sh
COPY commul-customization/tomcat-server.xml /opt/tomcat8/conf/server.xml COPY commul-customization/tomcat-server.xml /opt/tomcat8/conf/server.xml
# install Dspace ### Install Dspace
#
# pre-fetch maven dependencies # pre-fetch maven dependencies
RUN git clone https://github.com/commul/clarin-dspace.git -b commul-custom /opt/repository/sources/dspace RUN git clone --depth 1 --branch commul-custom https://github.com/commul/clarin-dspace.git /opt/repository/sources/dspace
WORKDIR /opt/repository/sources/dspace WORKDIR /opt/repository/sources/dspace
RUN mvn compile RUN mvn -B -T 1C \
#COPY commul-customization/dspace-pom.xml /tmp/pom.xml --quiet \
#WORKDIR /tmp/ --fail-never \
## RUN mvn dependency:resolve dependency:copy-dependencies dependency:resolve-plugins dependency:go-offline
#RUN mvn -B -T 4 dependency:copy-dependencies dependency:resolve-plugins dependency:go-offline clean #
# all files could be copied into a /tmp folder within the container first (maybe that could be mounted?); see also dspace-entrypoint.sh
# this checks if there was a new commit since the last build # this checks if there was a new commit since the last build
ADD https://api.github.com/repos/commul/clarin-dspace/git/refs/heads/commul-custom /tmp/version.json ADD https://api.github.com/repos/commul/clarin-dspace/git/refs/heads/commul-custom /tmp/version.json
RUN git pull RUN git pull
RUN mvn -B -T 1C clean compile
WORKDIR /opt/repository/sources/dspace/utilities/project_helpers WORKDIR /opt/repository/sources/dspace/utilities/project_helpers
RUN ./setup.sh /opt/repository/workspace RUN ./setup.sh /opt/repository/workspace
COPY commul-customization/variable.makefile /opt/repository/workspace/config/variable.makefile COPY commul-customization/variable.makefile /opt/repository/workspace/config/variable.makefile
# COPY commul-customization/dspace.cfg /opt/repository/sources/dspace/dspace/config/dspace.cfg # COPY commul-customization/dspace.cfg /opt/repository/sources/dspace/dspace/config/dspace.cfg
# install python modules: magic dateutil, lxml # install python modules: magic dateutil, lxml
RUN apt-get update && apt-get install -y python-magic python-dateutil python-lxml RUN apt-get update && apt-get install python-magic python-dateutil python-lxml
# copy over configs and startup scripts # copy over configs and startup scripts
COPY commul-customization/start_stack.sh /opt/repository/workspace/scripts/ COPY commul-customization/start_stack.sh /opt/repository/workspace/scripts/
...@@ -99,6 +139,12 @@ RUN cp /opt/repository/workspace/config/etc/init.d/handle-server /etc/init.d/ ...@@ -99,6 +139,12 @@ RUN cp /opt/repository/workspace/config/etc/init.d/handle-server /etc/init.d/
RUN chmod +x /etc/init.d/handle-server RUN chmod +x /etc/init.d/handle-server
RUN perl -pi -e 's#DSPACE_INSTALLATION_DIRECTORY=#DSPACE_INSTALLATION_DIRECTORY=/opt/lindat-dspace/installation#' /etc/default/handle-server RUN perl -pi -e 's#DSPACE_INSTALLATION_DIRECTORY=#DSPACE_INSTALLATION_DIRECTORY=/opt/lindat-dspace/installation#' /etc/default/handle-server
ARG LABEL_VERSION
ARG LABEL_BUILD_DATE
LABEL org.label-schema.version=$LABEL_VERSION \
org.label-schema.build-date=$LABEL_BUILD_DATE \
org.label-schema.vcs-url=$LABEL_VCS_URL
# copy entrypoint script and start # copy entrypoint script and start
COPY commul-customization/entrypoint.sh /usr/bin/entrypoint.sh COPY commul-customization/entrypoint.sh /usr/bin/entrypoint.sh
RUN chmod u+x /usr/bin/entrypoint.sh RUN chmod u+x /usr/bin/entrypoint.sh
......
...@@ -3,17 +3,29 @@ ...@@ -3,17 +3,29 @@
# Based on Ubuntu # Based on Ubuntu
############################################################ ############################################################
FROM ubuntu ARG UBUNTU_VERSION=16.04
LABEL maintainer="Alexander König <Alexander.Koenig@eurac.edu>" FROM ubuntu:$UBUNTU_VERSION
ARG UBUNTU_VERSION
ARG LABEL_VCS_URL="https://gitlab.inf.unibz.it/commul/docker/clarin-dspace"
LABEL maintainer="Alexander König <Alexander.Koenig@eurac.edu>" \
maintainer="Egon W. Stemle <egon.stemle@eurac.edu>"
ENV TERM linux ENV TERM linux
# APT(-GET) tweaks
# Set some sane defaults for apt inside docker
ENV DEBIAN_FRONTEND=noninteractive
COPY apt.local.conf /etc/apt/apt.conf.d/99local.conf
# use fast(er) local mirrors
COPY ubuntu-$UBUNTU_VERSION.sources.list /etc/apt/sources.list
RUN apt-get update && \
apt-get upgrade
RUN apt-get update &&\ RUN apt-get update &&\
apt-get -y upgrade &&\ apt-get install openjdk-8-jdk unzip wget make cpanminus gcc
apt-get -y install openjdk-8-jdk unzip wget make cpanminus gcc
# convenience packages # convenience packages
RUN apt-get -y install less vim RUN apt-get update && apt-get install less vim
RUN cpanm Term::ReadLine RUN cpanm Term::ReadLine
RUN cpanm File::Spec::Functions RUN cpanm File::Spec::Functions
...@@ -29,5 +41,12 @@ RUN cat /tmp/hdl-setup.tmp | bin/hdl-setup-server /hs/svr_1/ ...@@ -29,5 +41,12 @@ 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/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 -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 RUN perl -i -plne 'print " \"storage_type\" = \"CUSTOM\"\n\ \"storage_class\" = \"org.dspace.handle.HandlePlugin\"" if(/max_session/);' /hs/svr_1/config.dct
ARG LABEL_VERSION
ARG LABEL_BUILD_DATE
LABEL org.label-schema.version=$LABEL_VERSION \
org.label-schema.build-date=$LABEL_BUILD_DATE \
org.label-schema.vcs-url=$LABEL_VCS_URL
# ENTRYPOINT ["/bin/bash"] # ENTRYPOINT ["/bin/bash"]
CMD tail -f /hs/svr_1/config.dct CMD tail -f /hs/svr_1/config.dct
####################################################################### ##############################################################################
# Dockerfile to build nginx and shibboleth for LINDAT Dspace container # Dockerfile to build nginx and shibboleth for LINDAT Dspace container
# Based on Ubuntu # Based on Ubuntu
####################################################################### ##############################################################################
FROM ubuntu:16.04 ARG UBUNTU_VERSION=16.04
LABEL maintainer="Alexander König <Alexander.Koenig@eurac.edu>" FROM ubuntu:$UBUNTU_VERSION
ARG UBUNTU_VERSION
ARG LABEL_VCS_URL="https://gitlab.inf.unibz.it/commul/docker/clarin-dspace"
LABEL maintainer="Alexander König <Alexander.Koenig@eurac.edu>" \
maintainer="Egon W. Stemle <egon.stemle@eurac.edu>"
ENV TERM linux
# APT(-GET) tweaks
# Set some sane defaults for apt inside docker
ENV DEBIAN_FRONTEND=noninteractive
COPY apt.local.conf /etc/apt/apt.conf.d/99local.conf
# use fast(er) local mirrors
COPY ubuntu-$UBUNTU_VERSION.sources.list /etc/apt/sources.list
RUN apt-get update && \
apt-get upgrade
# install cpanm and dependencies # install cpanm and dependencies
RUN apt-get update \ RUN apt-get update \
&& apt-get -y upgrade \ && apt-get install make gcc wget cpanminus
&& apt-get -y install make gcc wget cpanminus
RUN cpanm -n File::Spec::Functions RUN cpanm -n File::Spec::Functions
RUN cpanm Term::ReadLine RUN cpanm Term::ReadLine
# install jdk, ant, psql, mvn, make, libxml, xsltproc, zip, wget # install jdk, ant, psql, mvn, make, libxml, xsltproc, zip, wget
RUN apt-get update \ RUN apt-get update \
&& apt-get -y install ant curl libxml2-utils maven openjdk-8-jdk unzip xsltproc yui-compressor && apt-get install ant curl libxml2-utils maven openjdk-8-jdk unzip xsltproc yui-compressor
# install convenience apps for debug purposes (vim and jsbeautifier) # install convenience apps for debug purposes (vim and jsbeautifier)
RUN apt-get -y install vim less python-pip RUN apt-get update && apt-get install vim less python-pip
RUN pip install --upgrade pip RUN pip install --upgrade pip
RUN pip install jsbeautifier RUN pip install jsbeautifier
COPY commul-customization/__init__.py /usr/local/lib/python2.7/dist-packages/jsbeautifier/ COPY commul-customization/__init__.py /usr/local/lib/python2.7/dist-packages/jsbeautifier/
# set up a proper locale # set up a proper locale
RUN apt-get -y install locales RUN apt-get update && apt-get install locales
RUN locale-gen en_US.UTF-8 RUN locale-gen en_US.UTF-8
COPY commul-customization/default_locale /etc/default/locale COPY commul-customization/default_locale /etc/default/locale
RUN chmod 0755 /etc/default/locale RUN chmod 0755 /etc/default/locale
...@@ -35,7 +49,7 @@ ENV LANG=en_US.UTF-8 ...@@ -35,7 +49,7 @@ ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8 ENV LANGUAGE=en_US.UTF-8
# build nginx # build nginx
RUN apt-get install -y zlib1g zlib1g-dev libpcre3 libpcre3-dev curl RUN apt-get update && apt-get install zlib1g zlib1g-dev libpcre3 libpcre3-dev curl
RUN cpanm File::Spec::Functions RUN cpanm File::Spec::Functions
RUN cpanm Term::ReadLine RUN cpanm Term::ReadLine
COPY commul-customization/nginx_build.sh /tmp/nginx_build.sh COPY commul-customization/nginx_build.sh /tmp/nginx_build.sh
...@@ -59,13 +73,13 @@ RUN chown -R www-data:www-data /opt/nginx/html/ ...@@ -59,13 +73,13 @@ RUN chown -R www-data:www-data /opt/nginx/html/
#COPY commul-customization/eurac.png /opt/nginx/html/img/ #COPY commul-customization/eurac.png /opt/nginx/html/img/
# install php # install php
RUN apt-get update && apt-get install -y php-fpm php-xml RUN apt-get update && apt-get install php-fpm php-xml
# copy over aa-statistics script # copy over aa-statistics script
RUN mkdir /opt/nginx/html/php RUN mkdir /opt/nginx/html/php
COPY commul-customization/aa-statistics.php /opt/nginx/html/php/ COPY commul-customization/aa-statistics.php /opt/nginx/html/php/
# get aai project # get aai project
RUN apt-get install -y git RUN apt-get update && apt-get install git
RUN git clone https://github.com/ufal/lindat-aai-discovery.git /opt/repository/sources/lindat-aai-discovery RUN git clone https://github.com/ufal/lindat-aai-discovery.git /opt/repository/sources/lindat-aai-discovery
# install shibboleth # install shibboleth
...@@ -79,7 +93,7 @@ RUN chmod a+x /etc/init.d/shibd ...@@ -79,7 +93,7 @@ RUN chmod a+x /etc/init.d/shibd
# create the test secure folder and set up perl fastcgi # create the test secure folder and set up perl fastcgi
RUN mkdir /opt/nginx/html/secure RUN mkdir /opt/nginx/html/secure
RUN apt-get update && apt-get install -y fcgiwrap RUN apt-get update && apt-get install fcgiwrap
RUN cpanm CGI URI XML::Twig LWP::Protocol::https RUN cpanm CGI URI XML::Twig LWP::Protocol::https
COPY commul-customization/shib_test.pl /opt/nginx/html/secure/ COPY commul-customization/shib_test.pl /opt/nginx/html/secure/
COPY commul-customization/shib_fastcgi_params /opt/nginx/conf/ COPY commul-customization/shib_fastcgi_params /opt/nginx/conf/
...@@ -88,7 +102,7 @@ RUN chown -R www-data:www-data /opt/nginx/html/secure ...@@ -88,7 +102,7 @@ RUN chown -R www-data:www-data /opt/nginx/html/secure
RUN chmod a+x /opt/nginx/html/secure/shib_test.pl RUN chmod a+x /opt/nginx/html/secure/shib_test.pl
# install supervisor # install supervisor
RUN apt-get install -y python-setuptools RUN apt-get update && apt-get install python-setuptools
RUN easy_install supervisor RUN easy_install supervisor
COPY commul-customization/supervisord.conf /etc/ COPY commul-customization/supervisord.conf /etc/
RUN mkdir -p /var/log/supervisor RUN mkdir -p /var/log/supervisor
...@@ -127,4 +141,10 @@ RUN yui-compressor -o aai.min.js aai.js ...@@ -127,4 +141,10 @@ RUN yui-compressor -o aai.min.js aai.js
# add IdP metadata from CLARIN server # add IdP metadata from CLARIN server
ADD https://infra.clarin.eu/aai/prod_md_about_spf_idps.xml /opt/shibboleth-sp-fastcgi/var/cache/shibboleth/ ADD https://infra.clarin.eu/aai/prod_md_about_spf_idps.xml /opt/shibboleth-sp-fastcgi/var/cache/shibboleth/
ARG LABEL_VERSION
ARG LABEL_BUILD_DATE
LABEL org.label-schema.version=$LABEL_VERSION \
org.label-schema.build-date=$LABEL_BUILD_DATE \
org.label-schema.vcs-url=$LABEL_VCS_URL
ENTRYPOINT ["/usr/local/bin/supervisord", "-c", "/etc/supervisord.conf"] ENTRYPOINT ["/usr/local/bin/supervisord", "-c", "/etc/supervisord.conf"]
FROM postgres:9.6 ##############################################################################
LABEL maintainer="Alexander König <Alexander.Koenig@eurac.edu>" # Dockerfile to build postgres for LINDAT Dspace container
# Based on Postgres
##############################################################################
# install git ARG POSTGRES_VERSION=9.6
RUN apt-get update && apt-get -y install git FROM postgres:$POSTGRES_VERSION
ARG POSTGRES_VERSION
ARG LABEL_VCS_URL="https://gitlab.inf.unibz.it/commul/docker/clarin-dspace"
LABEL maintainer="Alexander König <Alexander.Koenig@eurac.edu>" \
maintainer="Egon W. Stemle <egon.stemle@eurac.edu>"
ENV TERM linux
# APT(-GET) tweaks
# Set some sane defaults for apt inside docker
ENV DEBIAN_FRONTEND=noninteractive
COPY apt.local.conf /etc/apt/apt.conf.d/99local.conf
#
#
RUN apt-get update && \
apt-get upgrade
# Install git
RUN apt-get update && apt-get install git
# copy int db script # copy int db script
RUN mkdir -p /docker-entrypoint-initdb.d RUN mkdir -p /docker-entrypoint-initdb.d
...@@ -18,4 +38,8 @@ RUN mkdir /tmp/sql/ ...@@ -18,4 +38,8 @@ RUN mkdir /tmp/sql/
COPY adapt_utilities_sql.sh /tmp/sql/ COPY adapt_utilities_sql.sh /tmp/sql/
RUN /tmp/sql/adapt_utilities_sql.sh RUN /tmp/sql/adapt_utilities_sql.sh
ARG LABEL_VERSION
ARG LABEL_BUILD_DATE
LABEL org.label-schema.version=$LABEL_VERSION \
org.label-schema.build-date=$LABEL_BUILD_DATE \
org.label-schema.vcs-url=$LABEL_VCS_URL
#!/bin/bash #!/bin/bash
git clone https://github.com/commul/clarin-dspace.git -b commul-custom /tmp/dspace git clone --depth 1 --branch commul-custom https://github.com/commul/clarin-dspace.git /tmp/dspace
cp /tmp/dspace/utilities/utilities.sql /tmp/sql/ cp /tmp/dspace/utilities/utilities.sql /tmp/sql/
cp /tmp/dspace/utilities/license_definition.txt /tmp/sql/ cp /tmp/dspace/utilities/license_definition.txt /tmp/sql/
chmod -R a+w /tmp/sql/ chmod -R a+w /tmp/sql/
......
# Set some sane defaults for docker
APT { GET { Assume-Yes "true"; }; };
APT { GET { Fix-Broken "true"; }; };
This diff is collapsed.
...@@ -65,18 +65,18 @@ ...@@ -65,18 +65,18 @@
<md:OrganizationURL xml:lang="it">http://www.eurac.edu/it</md:OrganizationURL> <md:OrganizationURL xml:lang="it">http://www.eurac.edu/it</md:OrganizationURL>
</md:Organization> </md:Organization>
<md:ContactPerson contactType="technical"> <md:ContactPerson contactType="technical">
<md:GivenName>Alexander</md:GivenName> <md:GivenName>Egon</md:GivenName>
<md:SurName>König</md:SurName> <md:SurName>Stemle</md:SurName>
<md:EmailAddress>mailto:Alexander.Koenig@eurac.edu</md:EmailAddress> <md:EmailAddress>mailto:clarin@eurac.edu</md:EmailAddress>
</md:ContactPerson> </md:ContactPerson>
<md:ContactPerson contactType="support"> <md:ContactPerson contactType="support">
<md:GivenName>Alexander</md:GivenName> <md:GivenName>Egon</md:GivenName>
<md:SurName>König</md:SurName> <md:SurName>Stemle</md:SurName>
<md:EmailAddress>mailto:Alexander.Koenig@eurac.edu</md:EmailAddress> <md:EmailAddress>mailto:clarin@eurac.edu</md:EmailAddress>
</md:ContactPerson> </md:ContactPerson>
<md:ContactPerson contactType="administrative"> <md:ContactPerson contactType="administrative">
<md:GivenName>Andrea</md:GivenName> <md:GivenName>Andrea</md:GivenName>
<md:SurName>Abel</md:SurName> <md:SurName>Abel</md:SurName>
<md:EmailAddress>mailto:Andrea.Abel@eurac.edu</md:EmailAddress> <md:EmailAddress>mailto:linguistics@eurac.edu</md:EmailAddress>
</md:ContactPerson> </md:ContactPerson>
</md:EntityDescriptor> </md:EntityDescriptor>
This diff is collapsed.
...@@ -13,9 +13,9 @@ perl -pi -e 's/\$\{HANDLE_USER\}/$ENV{HANDLE_USER}/; s/\$\{HANDLE_PASSWORD\}/$EN ...@@ -13,9 +13,9 @@ perl -pi -e 's/\$\{HANDLE_USER\}/$ENV{HANDLE_USER}/; s/\$\{HANDLE_PASSWORD\}/$EN
/etc/init.d/handle-server start /etc/init.d/handle-server start
# initialize statistics & co # initialize statistics & co
/opt/tomcat8/bin/startup.sh
cd /opt/repository/workspace/scripts cd /opt/repository/workspace/scripts
make init_statistics make init_statistics
/opt/tomcat8/bin/catalina.sh start
# https://ubuntuforums.org/showthread.php?t=979694 # https://ubuntuforums.org/showthread.php?t=979694
# Start process in the background and send its output to file descriptor 3 # Start process in the background and send its output to file descriptor 3
...@@ -42,7 +42,7 @@ done <&3 ...@@ -42,7 +42,7 @@ done <&3
# Close the file descriptor # Close the file descriptor
exec <&3 3<&- exec <&3 3<&-
/opt/tomcat8/bin/shutdown.sh -force /opt/tomcat8/bin/catalina.sh stop -force
# start tomcat # start tomcat
/opt/tomcat8/bin/catalina.sh run /opt/tomcat8/bin/catalina.sh run
export CATALINA_OPTS="$CATALINA_OPTS -Xms2048m"
export CATALINA_OPTS="$CATALINA_OPTS -Xmx4096m"
export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxPermSize=256m"
...@@ -68,8 +68,8 @@ ...@@ -68,8 +68,8 @@
--> -->
<Connector port="8080" protocol="HTTP/1.1" <Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000" connectionTimeout="20000"
URIEncoding="UTF-8" URIEncoding="UTF-8"
redirectPort="8443" /> redirectPort="443" />
<!-- A "Connector" using the shared thread pool--> <!-- A "Connector" using the shared thread pool-->
<!-- <!--
<Connector executor="tomcatThreadPool" <Connector executor="tomcatThreadPool"
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
--> -->
<!-- Define an AJP 1.3 Connector on port 8009 --> <!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> <Connector port="8009" protocol="AJP/1.3" redirectPort="443" />
<!-- An Engine represents the entry point (within Catalina) that processes <!-- An Engine represents the entry point (within Catalina) that processes
......
export CATALINA_OPTS="$CATALINA_OPTS -Xms4096m"
export CATALINA_OPTS="$CATALINA_OPTS -Xmx8192m"
export CATALINA_PID="$CATALINA_BASE/tomcat.pid"
#!/bin/bash
#
#https://wiki.debian.org/LSBInitScripts
### BEGIN INIT INFO
# Provides: tomcat8
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Should-Start: $named
# Should-Stop: $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start Tomcat.
# Description: Start the Tomcat servlet engine.
### END INIT INFO
# Run Tomcat 8 as this user ID and group ID
TOMCAT8_USER=tomcat8
TOMCAT8_GROUP=tomcat8
# this is a work-around until there is a suitable runtime replacement
# for dpkg-architecture for arch:all packages
# this function sets the variable JDK_DIRS
find_jdks()
{
for java_version in 9 8 7
do
for jvmdir in /usr/lib/jvm/java-${java_version}-openjdk-* \
/usr/lib/jvm/jdk-${java_version}-oracle-* \
/usr/lib/jvm/jre-${java_version}-oracle-*
do
if [ -d "${jvmdir}" ]
then
JDK_DIRS="${JDK_DIRS} ${jvmdir}"
fi
done
done
# Add older non multi arch installations
JDK_DIRS="${JDK_DIRS} /usr/lib/jvm/java-7-oracle"
}
# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not
# defined in $DEFAULT)
JDK_DIRS="/usr/lib/jvm/default-java"
find_jdks
# Look for the right JVM to use
for jdir in $JDK_DIRS; do
if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
JAVA_HOME="$jdir"
fi
done
export JAVA_HOME
export CATALINA_HOME=/opt/tomcat8
export PATH=$JAVA_HOME/bin:$PATH
start() {
echo "Starting Tomcat 8..."
/bin/su -s /bin/bash $TOMCAT8_USER -c $CATALINA_HOME/bin/startup.sh
}
stop() {
echo "Stopping Tomcat 8..."
/bin/su -s /bin/bash $TOMCAT8_USER -c '$CATALINA_HOME/bin/shutdown.sh -force'
}
case $1 in
start|stop) $1;;
restart) stop; start;;
*) echo "Usage : $0 <start|stop|restart>"; exit 1;;
esac
exit 0
...@@ -4,11 +4,22 @@ set -e ...@@ -4,11 +4,22 @@ set -e
VERSION=${1:-latest} VERSION=${1:-latest}
TYPE=${2:-staging} TYPE=${2:-staging}
docker build -t gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/dspace:$VERSION . -f Dockerfile.dspace # export DOCKER_BUILDKIT=1
docker build -t gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/nginx:$VERSION . -f Dockerfile.nginx docker build \
docker build -t gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/postgres:$VERSION . -f Dockerfile.postgres --build-arg LABEL_VERSION="$VERSION" \
--build-arg LABEL_BUILD_DATE="$(date -R)" \
-t "gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/dspace:$VERSION" . -f Dockerfile.dspace
docker build \
--build-arg LABEL_VERSION="$VERSION" \
--build-arg LABEL_BUILD_DATE="$(date -R)" \
-t "gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/nginx:$VERSION" . -f Dockerfile.nginx
docker build \
--build-arg LABEL_VERSION="$VERSION" \
--build-arg LABEL_BUILD_DATE="$(date -R)" \
-t "gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/postgres:$VERSION" . -f Dockerfile.postgres
docker push gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/dspace:$VERSION docker push "gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/dspace:$VERSION"
docker push gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/nginx:$VERSION docker push "gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/nginx:$VERSION"
docker push gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/postgres:$VERSION docker push "gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/$TYPE/postgres:$VERSION"
echo sed ../kubernetes/*-deployment.yaml -e \"'s#\(.*image: gitlab.inf.unibz.it:4567/.*:\).*#\1'"${VERSION}#"\"
# http://layer0.authentise.com/docker-4-useful-tips-you-may-not-know-about.html
deb mirror://mirrors.ubuntu.com/mirrors.txt xenial main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt xenial-security main restricted universe multiverse
...@@ -56,7 +56,7 @@ spec: ...@@ -56,7 +56,7 @@ spec:
secretKeyRef: secretKeyRef:
key: mail.pass key: mail.pass
name: dspace-secrets name: dspace-secrets
image: gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/production/dspace:1.3.4 image: gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/production/dspace:1.3.5
name: clarin-dspace name: clarin-dspace
imagePullPolicy: Always imagePullPolicy: Always
ports: ports:
......
...@@ -32,6 +32,10 @@ spec: ...@@ -32,6 +32,10 @@ spec:
# later on (without the need to change http:// to https://) # later on (without the need to change http:// to https://)
# see https://github.com/nginx-shib/nginx-http-shibboleth/issues/22 # see https://github.com/nginx-shib/nginx-http-shibboleth/issues/22
# #
# However, make sure to disable all enforce-SSL settings, for example
# for the [dspace REST
# API](https://wiki.duraspace.org/display/DSDOC5x/REST+API).
#
# For a general overview for SP reverse proxy-ing # For a general overview for SP reverse proxy-ing
# see https://wiki.shibboleth.net/confluence/display/SHIB2/SPReverseProxy # see https://wiki.shibboleth.net/confluence/display/SHIB2/SPReverseProxy
# #
......