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

added a readme and something to ensure the shell is unicode aware

parent 3d592e9b
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,16 @@ ENV CI=true
# install jdk, ant, psql, mvn, make, libxml, xsltproc, zip, wget
RUN apt-get update &&\
apt-get -y upgrade &&\
apt-get -y install openjdk-8-jdk ant postgresql maven make libxml2-utils xsltproc unzip wget
apt-get -y install openjdk-8-jdk ant postgresql maven make libxml2-utils xsltproc unzip wget locales
# set up a proper locale
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_CA.UTF-8
ENV LANG=en_CA.UTF-8
ENV LANGUAGE=en_CA.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
......@@ -29,32 +38,32 @@ RUN chmod -R g+r /opt/tomcat8/conf/
RUN chmod g+x /opt/tomcat8/conf/
RUN chown -R tomcat8 /opt/tomcat8/webapps/ /opt/tomcat8/work/ /opt/tomcat8/temp/ /opt/tomcat8/logs/
# copy the init script
ADD commul-customization/tomcat8 /etc/init.d/
COPY commul-customization/tomcat8 /etc/init.d/
RUN chmod a+x /etc/init.d/tomcat8
# build nginx
RUN apt-get install -y gcc zlib1g zlib1g-dev libpcre3 libpcre3-dev curl cpanminus
RUN cpanm File::Spec::Functions
RUN cpanm Term::ReadLine
ADD commul-customization/nginx_build.sh /tmp/nginx_build.sh
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
ADD commul-customization/nginx /etc/init.d/
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
# get aai project
RUN apt-get install -y git
RUN git clone https://github.com/ufal/lindat-aai-discovery.git /opt/repository/lindat-aai-discovery
RUN git clone https://github.com/ufal/lindat-aai-discovery.git /opt/repository/sources/lindat-aai-discovery
# install Dspace
RUN git clone https://github.com/commul/clarin-dspace.git -b clarin /opt/repository/sources/dspace
WORKDIR /opt/repository/sources/dspace/utilities/project_helpers
RUN ./setup.sh /opt/repository/workspace
ADD commul-customization/variable.makefile /opt/repository/workspace/config/variable.makefile
COPY commul-customization/variable.makefile /opt/repository/workspace/config/variable.makefile
# installing backup2l, this might be unnecessary
RUN apt-get install -y devscripts
......@@ -64,11 +73,11 @@ RUN ./install-sh -fc
RUN mkdir -p /home/backup
# copy over configs and startup scripts
ADD commul-customization/start_stack.sh /opt/repository/workspace/scripts/
ADD commul-customization/stop_stack.sh /opt/repository/workspace/scripts/
ADD commul-customization/local.properties /opt/repository/workspace/sources/
ADD commul-customization/tomcat-server.xml /opt/tomcat8/conf/server.xml
RUN chmod u+x /opt/repository/workspace/scripts/*_stack.sh
COPY commul-customization/start_stack.sh /opt/repository/workspace/scripts/
COPY commul-customization/stop_stack.sh /opt/repository/workspace/scripts/
COPY commul-customization/local.properties /opt/repository/workspace/sources/
COPY commul-customization/tomcat-server.xml /opt/tomcat8/conf/server.xml
COPY chmod u+x /opt/repository/workspace/scripts/*_stack.sh
# create dspace psql user
USER postgres
......@@ -85,7 +94,7 @@ RUN /etc/init.d/postgresql start && make new_deploy
RUN apt-get -y install vim
# install shibboleth
ADD commul-customization/shibboleth_sp_with_fastcgi.sh /tmp/
COPY commul-customization/shibboleth_sp_with_fastcgi.sh /tmp/
RUN chmod u+x /tmp/shibboleth_sp_with_fastcgi.sh
RUN /tmp/shibboleth_sp_with_fastcgi.sh
# copy the init script
......@@ -96,38 +105,24 @@ RUN chmod a+x /etc/init.d/shibd
# install supervisor
RUN apt-get install -y python-setuptools
RUN easy_install supervisor
ADD commul-customization/supervisord.conf /etc/
COPY commul-customization/supervisord.conf /etc/
RUN mkdir -p /var/log/supervisor
# copy over config files
ADD commul-customization/default-ssl /opt/nginx/conf/
ADD commul-customization/nginx.conf /opt/nginx/conf/
ADD commul-customization/repository_auth /opt/nginx/conf/
ADD commul-customization/shibboleth2.xml /opt/shibboleth-sp-fastcgi/etc/shibboleth/
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 certificate for lindat-dev
ADD commul-customization/certs/lindat-dev.key /etc/ssl/private/
ADD commul-customization/certs/lindat-dev_eurac_edu.pem /etc/ssl/certs/
COPY commul-customization/certs/lindat-dev.key /etc/ssl/private/
COPY commul-customization/certs/lindat-dev_eurac_edu.pem /etc/ssl/certs/
# afterwards log into the container and do these things by hand
# generate a self-signed certificate for nginx
# mkdir /tmp/cert
# cd /tmp/cert
# openssl req -new > cert.csr
# openssl rsa -in privkey.pem -out key.pem
# openssl x509 -in cert.csr -out cert.pem -req -signkey key.pem -days 1001
# cat key.pem>>cert.pem
# cp privkey.pem /etc/ssl/private/
# cp cert.pem /etc/ssl/certs/
#
# official lindat-dev keys
# sdcsft01:/etc/pki/CA/certs/lindat-dev.key -> /etc/ssl/private/
# sdcsft01:/etc/pki/CA/certs/lindat-dev_eurac_edu.zip [lindat-dev_eurac_edu.pem] -> /etc/ssl/certs/
#
# start background programs
# supervisord -c /etc/supervisord.conf
# /etc/init.d/shibd start
# /etc/init.d/postgresql start
#
# create dspace admin
......
......@@ -4,6 +4,6 @@ This is meant to provide an easy way to install [CLARIN DSpace](https://github.c
# 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). Then you need to look through all the files in commul-customization and adapt the configuration to your server (domain name, user names, etc).
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).
# 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"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment