meets

Installation instructions

Install docker on

Docker-engine and docker-compose

  1. create j4care user
    sudo useradd -G sudo -m j4care
    sudo passwd j4care
    su - j4care
    
  2. install needed packages
    sudo apt-get update
    sudo apt-get install mc curl zip unzip vim
    
  3. download the latest installation package from Installation Packages and copy it to /tmp on the target machine
  4. create /opt/j4care and extract the content of the file there
    sudo mkdir /opt/j4care
    sudo chown j4care:j4care /opt/j4care
    cd /opt
    unzip /tmp/opt-j4care-install-template-<VERSION>.zip
    
  5. in case the servers use http/https proxy to access the internet, you have to set it now using the http_proxy and https_proxy env variables
  6. install docker-engine and docker-compose. replace in the command below the first <docker-bind-address> parameter with the maintenance address of the machine you're installing and use 'ubuntu-xenial' for 16.04 or 'ubuntu-trusty' for 14.04 as the second parameter. in the end you will be prompted to login to the company docker repository - use j4care/care4j credentials
    cd /opt/j4care/install/docker
    ./setup-docker-env-compose.sh <docker-bind-address> <ubuntu-xenial|ubuntu-trusty>
    
  7. test the docker daemon and docker-compose
    docker-compose version
    
    docker-compose version 1.8.0, build f3628c7
    docker-py version: 1.9.0
    CPython version: 2.7.9
    OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013
    
    docker version
    
    Client:
     Version:      1.12.2
     API version:  1.24
     Go version:   go1.6.3
     Git commit:   bb80604
     Built:        Tue Oct 11 18:29:41 2016
     OS/Arch:      linux/amd64
    
    Server:
     Version:      1.12.2
     API version:  1.24
     Go version:   go1.6.3
     Git commit:   bb80604
     Built:        Tue Oct 11 18:29:41 2016
     OS/Arch:      linux/amd64
    
    docker ps
    
    CONTAINER ID        IMAGE     COMMAND   CREATED      STATUS    PORTS      NAMES
    
  8. test access to docker hub repo and to company repo
    docker pull busybox
    docker pull docker.j4care.com/testdata:5.2.1
    
  9. if this fails, it may be because the http proxy is not set in docker. Follow Setting HTTP proxy for docker to set it correctly
  10. in case you want to secure the docker daemon with TLS, follow further: Protect the Docker daemon socket (note that on 16.04 the docker no longer uses /etc/docker/defaults to set the parameters but uses the systemctl)

Prepare the compose yaml files

  1. 4 examples are provided as part of the install package that you can extend. the wado cache component is included only for multi-host examples
    /opt/j4care/conf/compose/single-host
    /opt/j4care/conf/compose/single-host-import-ldif
    /opt/j4care/conf/compose/multi-host
    /opt/j4care/conf/compose/multi-host-import-ldif               
    

    the *-import-ldif configurations expect you already have an existing ldap configuration in form of an ldif file (i.e. when replicating a production setup on a test site).
  2. copy the configuration you will extend to a new folder in /opt/j4care/conf/compose
    cp -r /opt/j4care/conf/compose/single-host /opt/j4care/conf/compose/my-pacs
    
  3. optional (for non *-import-ldif configurations): update the AET, ports and ldap device name in archive.env or docker-compose.env
  4. update the extra-host mappings accross the yaml files
  5. when applicable, update the TS_MAP_TARGET env mapping for the ATS cache component
  6. update the volume mappings
  7. update the -H parameters within the shell scripts located in the bin/ folder of the configuration you extended
  8. in case you secured the docker with tls, update the script to use the tls related parameters (they are provided within the comments)
  9. update the components' versions to the latest versions (note that when using existing ldif, you should either update it or use corresponding archive version). See Updating LDAP for more

Set-up /opt/j4care/compose directory

  1. link all yaml and env files you intend use to /opt/j4care/compose directory as well as the bin folder
    cd /opt/j4care/compose
    ln -s /opt/j4care/conf/compose/my-pacs/archive.yaml
    ln -s /opt/j4care/conf/compose/my-pacs/archive.env
    ln -s /opt/j4care/conf/compose/my-pacs/bin
    

Start the services

for each host there shuold be a shell script provided that executes docker-compose with -H parameter pointing to this host

cd /opt/j4care/compose/bin
./elk.sh up -d
./db.sh up -d
./archive.sh up -d
./viewer.sh up -d

Stop the services

cd /opt/j4care/compose/bin
./viewer.sh down
./archive.sh down
./elk.sh down
./db.sh down

Post Install configuration

  1. change the ownership or archive storage to wildfly
    sudo chown -R wildfly:wildfly <mapped storage volume>
    
  2. configure viewer and cache (if the cache is set up). ATS Configuration
  3. configure postgres memory. In the postgres data dir, edit the postgresql.conf file and increase the value of "shared_buffers". also, in /opt/j4care/conf/postgres a sample file with 8G setting is provided.
  4. configure max_connections = setting in the same file - it is set to 1000 in the provided example file.
  5. configure wildfly runtime parameters. on the archive host, copy the content of /opt/j4care/conf/wildfly to /data/wildfly-cli (should be created upon archive startup). then (while the archive is running) run
    docker exec -it <archive-container-name> jboss-cli.sh --connect --file=/wildfly-cli/configure.cli
    

    the provided cli scripts set the thread pool size for the executor service for 1000 and the number of connections in the DB pool to 500.

Set-up Nagios Monitoring

Coming soon!

Setting up Slave Database

Coming soon!

Two Archives Sharing a Single Database

Coming soon!

Under construction