-
Notifications
You must be signed in to change notification settings - Fork 22
Installation notes
Installation of shanoir-ng on a server (linux) Creation of a shanoir-ng user on the server (to run shanoir-ng), which is not sudoers.
The installation requires a sudoers user.
-
lsb_release -d
Description: Ubuntu 18.04.1 LTS
sudo apt-get install git
check
-
git version
git version 2.17.1
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
check
-
java -version
java version "1.8.0_191" Java(TM) SE Runtime Environment (build 1.8.0_191-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
sudo apt-get install maven
check
-
mvn -version
Apache Maven 3.5.2 Maven home: /usr/share/maven Java version: 1.8.0_191, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-8-oracle/jre Default locale: en_US, platform encoding: ISO-8859-1 OS name: "linux", version: "4.15.0-39-generic", arch: "amd64", family: "unix"
please refer to https://docs.docker.com/install/linux/docker-ce/ubuntu/
-
sudo apt-get update
-
sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common
-
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
-
sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable"
-
sudo apt-get update
-
sudo apt-get install docker-ce
check
-
sudo docker run hello-world
Unable to find image 'hello-world:latest' locally latest: Pulling from library/hello-world d1725b59e92d: Pull complete Digest: sha256:0add3ace90ecb4adbf7777e9aacf18357296e799f81cabc9fde470971e499788 Status: Downloaded newer image for hello-world:latest
Hello from Docker! This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
- The Docker client contacted the Docker daemon.
- The Docker daemon pulled the "hello-world" image from the Docker Hub. (amd64)
- The Docker daemon created a new container from that image which runs the executable that produces the output you are currently reading.
- The Docker daemon streamed that output to the Docker client, which sent it to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID: https://hub.docker.com/
For more examples and ideas, visit: https://docs.docker.com/get-started/
sudo usermod -aG docker shanoir-ng
sudo systemctl enable docker
MAKE SURE DOCKER HAS ENOUGH MEMORY TO RUN SHANOIR: 6Gb should be enough
On mac: docker dashboard > preferences > resources > increase the memory and the number of CPU cores.
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
check
-
docker-compose --version
docker-compose version 1.23.1, build b02f1306
sudo apt-get update
sudo apt-get install nodejs npm
check
-
nodejs --version
v8.10.0 -
npm --version
3.5.2
-
sudo vi /etc/hosts
add 127.0.0.1
Change user
su - shanoir-ng
git clone https://github.com/fli-iam/shanoir-ng.git
git checkout appning
cd shanoir-ng-parent
mvn clean install -DskipTests
cd /home/shanoir-ng
docker load -i dicomifier.ws.img
check
-
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest 4ab4c602aa5e 2 months ago 1.84kB dicomifier.ws latest be2095d78858 5 months ago 499MB
See readme
- Keycloak: Open /docker-compose/keycloak/cfg/shanoir-ng-realm.json and change redirectUris and webOrigins
- Spring Boot: Open /.env and change the host and scheme of all three properties in the file
- Docker Compose: Open /docker-compose.yml and change the container_name of Nginx to e.g. shanoir-ng.irisa.fr This is necessary, that e.g. ms users and the Keycloak CLI client can access to Keycloak (resolve the host name)
- Angular: Open /shanoir-ng-front/config/webpack.config.js and change SHANOIR_NG_URL_SCHEME and SHANOIR_NG_URL_HOST
- /shanoir-ng/docker-compose/users/ssl.sh : replacing -subj "/CN=shanoir-ng-nginx" by -subj "/CN="
- /shanoir-ng/docker-compose/users/Dockerfile : replacing -alias shanoir-ng-nginx by ​-alias
- .env : spring.jpa.hibernate.ddl-auto=validate spring.datasource.initialize=false
- mail server : cf. readme : .env :replace SMTP_HOST by your mail server url
cd /home/shanoir-ng/shanoir-ng/shanoir-ng-parent
mvn clean install -DskipTests
##run docker-compose
cd /home/shanoir-ng/shanoir-ng/
docker-compose up -d --build
docker-compose down
https://
Keycloack :
=> ssh tunnel ssh -L18080:localhost:8080 @ http://localhost:18080/auth/admin
#default admin pwd Please choose a default admin pwd for your installation
Please see above. Shanoir-NG runs on Fedora, at least as development environment, but two issues have to be solved before:
-
Microservices can not connect to Keycloak: Connection refused on Keycloak URL can be found in the log files (the local /etc/hosts is wrongly copied into the containers, what leads to errors with URL name resolving) Solution: remove Podman entirely from your OS and only install docker+docker-compose following the docker installation guide here install docker on fedora
-
MySQL servers use 20Gb of RAM and slow down the entire machine Solution: add in docker-compose.yml to database and keycloak-database solves the issue
ulimits:
nofile:
soft: 262144
hard: 262144
(known issue: MySQL issues)