DIANA Docker Swarm Stacks ========================= | Derek Merck | derek.merck@ufl.edu | University of Florida and Shands Hospital | Gainesville, FL |Build Status| |Coverage Status| |Doc Status| | Source: https://www.github.com/derekmerck/diana2 | Documentation: https://diana.readthedocs.io | Image: https://cloud.docker.com/repository/docker/derekmerck/diana2 Admin Services -------------- A base stack and provides `Portainer `__ and `Traefik `__ services and networks. Setup ~~~~~ .. code:: bash $ source sample.env $ docker-stack deploy -f admin/admin-stack.yml admin Exposes ~~~~~~~ - Traefik: ``http://host:8080`` - Portainer: ``http://host/portainer`` Integration ~~~~~~~~~~~ Other stacks can attach to the Traefik network by declaring the network and adding appropriate service labels. .. code:: yaml networks: admin_proxy_network: external: true Backend Data Services --------------------- Provides `Postgres `__ database and `Redis `__ and `Splunk `__ indexing services and allocates persistent storage. .. _setup-1: Setup ~~~~~ .. code:: bash $ source sample.env $ docker-stack -f admin/admin-stack.yml $ docker-stack -f backend-data/postgres-service.yml data $ docker-stack -f backend-data/redis-service.yml data $ docker-stack -f backend-data/splunk-service.yml data .. _exposes-1: Exposes ~~~~~~~ - Postgres: ``tcp://postgres:2345`` - Redis: ``tcp://redis:6543`` - Splunk: ``http://host/splunk`` - Splunk: ``http://splunk:{8088,8089}`` DICOM Services -------------- Provides `Orthanc `__ DICOM nodes and ingress gateways. .. _setup-2: Setup ~~~~~ .. code:: bash $ source sample.env $ docker-stack -f dicom-node/archive-stack.yml .. _exposes-2: Exposes ~~~~~~~ - Orthanc: ``http://host/archive`` - Orthanc: ``http://host/incoming`` DIANA Worker Services --------------------- Mock PACS Stack ~~~~~~~~~~~~~~~ Provides an Orthanc DICOM node and fills it continuously with simulated DICOM headers generated by DIANA’s MockSite daemon. By default, the orthanc node is exposed at: - Orthanc: ``http://host/mock-pacs`` - Orthanc: ``dcm:MOCKPACS@orthanc-mock:4242`` .. _setup-3: Setup ~~~~~ .. code:: bash $ source sample.env $ docker stack deploy -c admin/admin-stack.yml admin $ docker-stack deploy -c diana-workers/mock-stack.yml mock Diana Watcher ~~~~~~~~~~~~~ Additionally, see `Remote Embedded Diana Watcher `__ for Raspberry Pi and Balena. Provisioning ------------ Installing Docker-CE on RHEL ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Follow the CentOS guide and `update ``container-selinux`` `__. | Sometimes RHEL behind firewalls can benefit from access to the CentOS yum repos. | https://unix.stackexchange.com/questions/433046/how-do-i-enable-centos-repositories-on-rhel-red-hat Setup a Swarm ~~~~~~~~~~~~~ .. code:: bash $ docker swarm init --advertise-addr $ ssh host2 > docker swarm join ... etc Tag unique nodes for the scheduler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | The ``storage`` node will be assigned the database backend. | Any ``bridge`` nodes will be assigned DICOM ingress, routing, and bridging services (b/c typically modalities authorize endpoint access by specific IP address.) .. code:: bash $ docker node update --label-add storage=true host1 # mounts mass storage $ docker node update --label-add bridge=true host2 # registered IP address for DICOM receipt Open the Firewall ~~~~~~~~~~~~~~~~~ If the firewall stops workers from joining see https://www.digitalocean.com/community/tutorials/how-to-configure-the-linux-firewall-for-docker-swarm-on-centos-7 TODO ~~~~ Grant orthanc user superuser privileges so it can create trigrams License ------- MIT .. |Build Status| image:: https://travis-ci.org/derekmerck/diana2.svg?branch=master :target: https://travis-ci.org/derekmerck/diana2 .. |Coverage Status| image:: https://codecov.io/gh/derekmerck/diana2/branch/master/graph/badge.svg :target: https://codecov.io/gh/derekmerck/diana2 .. |Doc Status| image:: https://readthedocs.org/projects/diana/badge/?version=master :target: https://diana.readthedocs.io/en/master/?badge=master