dockerized CLARIN DSpace
This is meant to provide an easy way to install CLARIN DSpace by providing a Dockerfile that automatizes the installation. 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 Dockerfile.dist Dockerfile
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 SQL image
docker build -t=eurac_psql --rm=true -f Dockerfile.sql .
# run the SQL container
docker run --name my-postgres -e POSTGRES_PASSWORD=mysecretpassword -d eurac_psql
check psql IP and edit it into local.properties
docker inspect my-postgres | grep IPAddress
perl -pi -e 's#jdbc:postgresql://localhost#jdbc:postgresql://172.17.0.2#' commul-customization/local.properties
build the DSpace image
docker build -t=eurac_dspace --rm=true -f Dockerfile.dspace .
run the DSpace container
docker run -h lindat-dev.eurac.edu -p 8080:8080 -p 80:80 -p 443:443 --name my-dspace --link my-postgres:postgres -d eurac_dspace
enter the DSpace container
docker exec -it my-dspace bash
deploy DSpace
make new_deploy
copy over modified aai_config.js
cp /tmp/aai_config.js /opt/lindat-dspace/installation/webapps/xmlui/themes/COMMUL/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 server
cd /opt/repository/sources/dspace/utilities/project_helpers/scripts
./start_stack.sh