The SCSB Middleware codebase and components are all licensed under the Apache 2.0 license, with the exception of a set of API design components (JSF, JQuery, and Angular JS), which are licensed under MIT X11.
Docker is an open-source software platform to create, deploy and manage virtualized application containers on a common operating system (OS). The SCSB(Shared Collections Service Bus) application runs with docker containers running up and dependent on each other. Each container provides a microservice project which are built as separate images. All the micro services which are used in SCSB applications are given under respective modules.
Ubuntu environment with Docker and JAVA 8 installed.
This project can be cloned using the command :
git clone https://github.com/ResearchCollectionsAndPreservation/docker.git
To build and run each Dockerfile,a docker build and docker run command must be used.
docker build -t {image-name} . (current directory)
docker run --name {container-name} -v /path-to-local-directory:/path-to-container-directory -p {localhost port}:{container port} -d {image-name}
The images available under this Docker repositories are :
1.scsb-base
2.scsb-mysql
3.scsb-solr-base
4.scsb-solr-server
5.scsb-cas
6.scsb-activemq-base
7.scsb-activemq
8.scsb-zookeeper-base
9.scsb-zookeeper
10.scsb
11.scsb-solr-client
12.scsb-circ
13.scsb-etl
14.scsb-shiro
15.scsb-ui
16.scsb-batch-scheduler
17.jenkins
18.scsb-javadocs
scsb-persistence -- This is no longer used.
SCSB-BASE is the base image for building SCSB application.This image builds on Ubuntu and installs GIT,JAVA and GRADLE. This image will be used as the base image for almost all the other images.
Goto scsb-base where the Dockerfile is available and run the below command to build the base image
docker build -t scsb-base .
SCSB-MYSQL is an docker image which will install MySQL and all the database schema/scripts needed for SCSB application will be created and maintained here
Goto to scsb-mysql and run the below command to build the scbs-mysql image
docker build -t scsb-mysql .
docker run --name scsb-mysql -v /data/mysql-data:/var/lib/mysql -p 3306:3306 -d scsb-mysql
SCSB-SOLR-BASE builds from the base image and installs Apache Solr Server.
Goto scsb-solr-base and run the below command
docker build -t scsb-solr-base .
Apache solr server configuration files are managed here.
Goto to scsb-solr-server and the below command
docker build -t scsb-solr-server .
docker run --name scsb-solr-server -v /data/solr-data:/var/data/solr -p 8983:8983 -d scsb-solr-server
SCSB-CAS image manages the configuration files for CAS Authentication
Goto scsb-cas and run the below command
docker build -t scsb-cas .
docker run --name scsb-cas -p ${port} -p ${sslport} -e "DB_HOST=${DB_HOST}" -e "DB_USERNAME=${DB_USERNAME}" -e "DB_PASSWORD=${DB_PASSWORD}" -d scsb-cas
SCSB-ACTIVEMQ-BASE image is build from scsb-base image.This image downloads and installs ActiveMQ.
Goto scsb-activemq-base and run the below command.
docker build -t scsb-activemq-base .
This image mananges all the configuration files for ActiveMQ.
Goto scbs-activemq and run the below command
docker build -t scsb-activemq .
docker run --name scsb-activemq -v /data/activemq-dev-data:/opt/activemq/data -p 8161:8161 -p 61616:61616 -p 1099:1099 -d scsb-activemq
This image downloads Apache Zookeeper.
docker build -t scsb-zookeeper-base .
The environment variable and configurations needed for Apache Zookeeper are managed here.
Goto scsb-zookeeper and run the below command
docker build -t scsb-zookeerper .
docker run --name scsb-zookeeper -e "ZOO_MY_ID=?" -e "ZOO_SERVERS=server.1=? server.2=? server.3=?" -v ${MOUNT_DIR}/conf:/opt/scsb-zookeeper/conf -v ${MOUNT_DIR}/data:/opt/scsb-zookeeper/data -v ${MOUNT_DIR}/log:/opt/scsb-zookeeper/datalog -p ${CLIENT_PORT} -p ${SYNC_PORT_1} -p ${SYNC_PORT_2} -d scsb-zookeeper
This image is build from the scsb-base image.This image clones the SCSB github project and starts the application when a container is created.
Goto scsb and run the below command :
docker build -t scsb .
docker run --name scsb -v ${mountVolume} -p ${port} -e "ENV=-XX:+HeapDumpOnOutOfMemoryError -Dspring.config.location=? -Dorg.apache.activemq.SERIALIZABLE_PACKAGES="*"" -d scsb
This image is build from the scsb-base image.This image clones the SCSB-CIRC-CLIENT github project and starts the application when a container is created.
Goto scsb-solr-client and run the below command :
docker build -t scsb-solr-client .
docker run --name scsb-solr-client --link scsb-activemq:activemq -v ${dataDir} -p ${port} -e "ENV=-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/heapdumps/scsb-solr-client -Dorg.apache.activemq.SERIALIZABLE_PACKAGES="*" -Dspring.config.location=?" -d scsb-solr-client
This image is build from the scsb-base image.This image clones the SCSB-CIRC github project and starts the application when a container is created.
Goto scsb-circ and run the below command :
docker build -t scsb-circ .
docker run --name scsb-circ --link scsb-mysql:mysql --link scsb-solr-client:scsb-solr-client --link scsb-activemq:activemq -v ${dataDir} -p ${port} -e "ENV= -XX:+HeapDumpOnOutOfMemoryError -Dorg.apache.activemq.SERIALIZABLE_PACKAGES="*" -Dspring.config.location=?" -d scsb-circ
This image is build from the scsb-base image.This image clones the SCSB-ETL github project and starts the application when a container is created.
Goto scsb-etl and run the below command :
docker build -t scsb-etl .
docker run --name scsb-etl --link scsb-mysql:mysql -v ${pendingDir} -p ${port} -e "ENV=-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/heapdumps/scsb-etl -Xmx4g -Xms256m -Dorg.apache.activemq.SERIALIZABLE_PACKAGES="*" -Dspring.config.location=?" -d scsb-etl
This image is build from the scsb-base image.This image clones the SCSB-SHIRO github project and starts the application when a container is created.
Goto scsb-shiro and run the below command :
docker build -t scsb-shiro .
docker run --name scsb-shiro --link scsb-mysql:mysql -v ${mountdir} -p ${port} -e "ENV=-XX:+HeapDumpOnOutOfMemoryError -Dspring.config.location=?" -d scsb-shiro
This image is build from the scsb-base image.This image clones the SCSB-UI github project and starts the application when a container is created.
Goto scsb-etl and run the below command :
docker build -t scsb-ui .
docker run --name scsb-ui --link scsb-mysql:mysql --link scsb-solr-client:scsb-solr-client --link scsb:scsb --link scsb-shiro:scsb-shiro --link -v ${mountdir} -p ${port} -e "ENV=-XX:+HeapDumpOnOutOfMemoryError -Dspring.config.location=?" -d scsb-ui
JENKINS is used as an automation tool for deployment and run other jenkins jobs as necessary.
Goto jenkins and run the below command :
docker build -t scsb-jenkins .
docker run --name scsb-jenkins -v /data/jenkins:/var/lib/jenkins -p 8080:8080 -d scsb-jenkins
To get the administrative password :
#Get inside the container
docker exec -it scsb-jenkins bin/bash
#Goto
cd /data
#Type the below command,tt displays the password
sudo tail jenkins/secrets/initialAdminPassword
This image is build from the scsb-base image.This image clones the SCSB-BATCH-SCHEDULER github project and starts the application when a container is created.
Goto scsb-batch-scheduler and run the below command :
docker build -t scsb-batch-scheduler .
docker run --name scsb-batch-scheduler --link scsb-mysql:mysql --link scsb-solr-client:scsb-solr-client --link scsb-circ:scsb-circ --link scsb-activemq:activemq -v ${mountVolume} -p ${port} -e "ENV= -XX:+HeapDumpOnOutOfMemoryError -Dspring.config.location=?" -d scsb-batch-scheduler
This image generates the javadocs for all the projects based on the war file built.
Goto scsb-javadocs and run the below command
docker build -t scsb-javadocs .
docker run --name scsb-javadocs -p ${port} -d scsb-javadocs
scsb-log4j folder contains the log file configurations for all the projects.