diff --git a/CHANGELOG.md b/CHANGELOG.md index e9ae4e12eaeb0519db85a77c4dac4bedcbfc5598..4f7af8717c71e5c2fd41fdd044c603bd5b4de291 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed ### Fixed +## [1.3.2] - 2019-06-27 + +### Added + +- added liveness probes for DSpace and nginx pods (#53) +- added DSpace cronjobs to generate statistics, solr index etc. (#48) + +### Changed + +- upgraded DSpace to 2019.01 (#56) + ## [1.3.1] - 2019-02-25 ### Fixed @@ -88,7 +99,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 This is the first release. It all starts here. -[Unreleased]:https://gitlab.inf.unibz.it/commul/docker/clarin-dspace/compare/v1.3.1...HEAD +[Unreleased]:https://gitlab.inf.unibz.it/commul/docker/clarin-dspace/compare/v1.3.2...HEAD +[1.3.2]: https://gitlab.inf.unibz.it/commul/docker/clarin-dspace/compare/v1.3.1...v1.3.2 [1.3.1]: https://gitlab.inf.unibz.it/commul/docker/clarin-dspace/compare/v1.3...v1.3.1 [1.3]: https://gitlab.inf.unibz.it/commul/docker/clarin-dspace/compare/v1.2.2...v1.3 [1.2.2]: https://gitlab.inf.unibz.it/commul/docker/clarin-dspace/compare/v1.2...v1.2.2 diff --git a/clarin-dev2clarin.sh b/clarin-dev2clarin.sh index f64bb0cc776625030891cc35ea21f08ae9d9017f..a1f264c816e51422799f47e49483bfd6f791a881 100755 --- a/clarin-dev2clarin.sh +++ b/clarin-dev2clarin.sh @@ -25,4 +25,4 @@ echo "Modified all files to point to clarin.eurac.edu instead of clarin-dev.eura # adapt namespace in kubernetes yaml files sed -i 's/dspace-dev/dspace/' kubernetes/*.yaml -perl -pi -e 's/clarin-dev/clarin/g' kubernetes/dspace-ingress.yaml +perl -pi -e 's/clarin-dev/clarin/g' kubernetes/{dspace-ingress,nginx-deployment}.yaml diff --git a/dockerfiles/Dockerfile.dspace b/dockerfiles/Dockerfile.dspace index 0167fcfe9f8f8aeb0fd5375094235f74f6da5543..a2c0fccca4ceb4224c5490ea1b22db8ab7810428 100644 --- a/dockerfiles/Dockerfile.dspace +++ b/dockerfiles/Dockerfile.dspace @@ -86,7 +86,9 @@ RUN make new_deploy # DEBUG: to be able to access tomcat manager through browser # COPY commul-customization/tomcat-users.xml /opt/tomcat8/conf/ +# adapt some config files RUN perl -pi -e 's/#useProxies = true/useProxies = true/' /opt/lindat-dspace/installation/config/dspace.cfg +RUN perl -pi -e 's# (?s).*org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe.*# (?s).*org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe.*,\\\n (?s).*user-agent=.kube-probe.*#' /opt/lindat-dspace/installation/config/modules/lr.cfg # set up handle server COPY commul-customization/hdl-setup.tmp /tmp/ diff --git a/dockerfiles/commul-customization/entrypoint.sh b/dockerfiles/commul-customization/entrypoint.sh index c7890a495c37630858d37d45fc766d2d9890e2f1..fe0ca4601cd017ac0f5e73d291b9a78ac53a44f2 100644 --- a/dockerfiles/commul-customization/entrypoint.sh +++ b/dockerfiles/commul-customization/entrypoint.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # replace environment variables in config files perl -pi -e 's/\$\{DSPACE_USER\}/$ENV{DSPACE_USER}/; s/\$\{DSPACE_PASSWORD\}/$ENV{DSPACE_PASSWORD}/; s/\$\{MAIL_USER\}/$ENV{MAIL_USER}/; s/\$\{MAIL_PASSWORD\}/$ENV{MAIL_PASSWORD}/; s/\$\{DSPACE_DBNAME\}/$ENV{DSPACE_DBNAME}/; s/\$\{DSPACE_UTILSDBNAME\}/$ENV{DSPACE_UTILSDBNAME}/;' /opt/repository/sources/dspace/local.properties @@ -16,9 +16,32 @@ perl -pi -e 's/\$\{HANDLE_USER\}/$ENV{HANDLE_USER}/; s/\$\{HANDLE_PASSWORD\}/$EN /opt/tomcat8/bin/startup.sh cd /opt/repository/workspace/scripts make init_statistics -make update_discovery -make update_oai -/opt/lindat-dspace/installation/bin/dspace generate-sitemaps + +# https://ubuntuforums.org/showthread.php?t=979694 +# Start process in the background and send its output to file descriptor 3 +exec 3< <(while (true); do + make update_oai + make update_statistics + make update_sitemap + make lift_embargos + make update_openaire_cache + make update_discovery + make send_info + echo "INIT DONE." + sleep 86400 +done) + +# Read the output of the process line by line until one line contains Ready +while read line; do + case "$line" in + "INIT DONE.") + break + ;; + esac +done <&3 + +# Close the file descriptor +exec <&3 3<&- /opt/tomcat8/bin/shutdown.sh -force # start tomcat diff --git a/kubernetes/dspace-deployment.yaml b/kubernetes/dspace-deployment.yaml index 80254a9db4dc1e3159924207f3988027c0222175..7811e75ee1dbd67f03892266926577e3ac24229a 100644 --- a/kubernetes/dspace-deployment.yaml +++ b/kubernetes/dspace-deployment.yaml @@ -50,7 +50,7 @@ spec: secretKeyRef: key: mail.pass name: dspace-secrets - image: gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/staging/dspace:1.3-RC6 + image: gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/staging/dspace:1.3.2-RC1 name: clarin-dspace imagePullPolicy: Always ports: @@ -62,6 +62,15 @@ spec: volumeMounts: - mountPath: /opt/lindat-dspace/installation/assetstore name: dspace-assetstore + livenessProbe: + httpGet: + host: clarin-dev.eurac.edu + path: /repository/xmlui/ + port: 443 + scheme: HTTPS + initialDelaySeconds: 600 + periodSeconds: 15 + timeoutSeconds: 3 restartPolicy: Always imagePullSecrets: - name: gitlab-scientificnet-org-registry diff --git a/kubernetes/nginx-deployment.yaml b/kubernetes/nginx-deployment.yaml index b0dbd4aeeb1ef0068c7692ed12089d4b5fb7a675..4a7fd7603011e0e4a643fe1d145291b16ab74ab9 100644 --- a/kubernetes/nginx-deployment.yaml +++ b/kubernetes/nginx-deployment.yaml @@ -20,7 +20,7 @@ spec: io.kompose.service: nginx spec: containers: - - image: gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/staging/nginx:1.3-RC6 + - image: gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/staging/nginx:1.3.2-RC1 imagePullPolicy: Always name: clarin-nginx ports: @@ -32,6 +32,14 @@ spec: name: nginx-shib-certs - mountPath: /etc/ssl/clarin name: nginx-ssl-certs + livenessProbe: + httpGet: + host: clarin-dev.eurac.edu + port: 443 + scheme: HTTPS + initialDelaySeconds: 30 + periodSeconds: 15 + timeoutSeconds: 3 restartPolicy: Always imagePullSecrets: - name: gitlab-scientificnet-org-registry diff --git a/kubernetes/postgres-deployment.yaml b/kubernetes/postgres-deployment.yaml index 91f5bed9a898733720b6495d0e770fe5bd9a8635..9f4d7fe1859ff98dd6515679be2d24332794275a 100644 --- a/kubernetes/postgres-deployment.yaml +++ b/kubernetes/postgres-deployment.yaml @@ -48,7 +48,7 @@ spec: secretKeyRef: key: dspace.utils.name name: dspace-secrets - image: gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/staging/postgres:1.3-RC6 + image: gitlab.inf.unibz.it:4567/commul/docker/clarin-dspace/staging/postgres:1.3.2-RC1 imagePullPolicy: Always name: clarin-postgres resources: {}