derekmerck.orthanc_docker
Rôle Ansible pour Orthanc dans Docker
Derek Merck
derek_merck@brown.edu
Hôpital de Rhode Island et Université de Brown
Providence, RI
Configurer et exécuter un nœud DICOM Orthanc dans un conteneur Docker.
Dépendances
Rôles Galaxy
- geerlingguy.docker pour configurer l'environnement Docker
- geerlingguy.pip pour installer les dépendances Python
- derekmerck.postgres-docker pour configurer le backend Postgres, si nécessaire
Nœud Local
- Cryptographie Python, si les mots de passe secrets sont chiffrés
Nœud Distant
Variables du Rôle
Image et Tag Docker
orthanc_docker_image: "jodogne/orthanc"
orthanc_docker_image_tag: "latest"
Sélectionnez une image et un tag Orthanc.
jodogne/orthanc
est la version officielle d’Orthanc pour Docker maintenue par Sébastien Jodogne.jodogne/orthanc-plugins
est la version officielle qui prend en charge le backend PostgreSQL (le rôle utilise PostgreSQL 10).osimis/orthanc
est une version tierce d’Osimis pour Docker avec une excellente interface web pour revoir et annoter.derekmerck/orthanc
est une version tierce multi-architecture (amd64, arm32v7, aarch64) de pointe d'Orthanc provenant de DIANA. Elle inclut [GDCM][] pour la compression JPG à la volée. Les sources et Dockerfiles se trouvent sur GitHub dans le projet xarch-orthanc-docker.derekmerck/orthanc-plugins
est la version correspondante multi-architecture avec prise en charge du backend PostgreSQL.
Configuration du Conteneur Docker
orthanc_container_name: "orthanc"
orthanc_use_data_container: True
orthanc_data_dir: "/data/{{ orthanc_container_name }}"
orthanc_config_dir: "/config/{{ orthanc_container_name }}"
orthanc_api_port: 8042
orthanc_dicom_port: 4242
orthanc_container_timezone: "America/New_York"
Configuration du Service
Configurer le service. Ces variables sont utilisées dans le fichier de configuration au format template.
orthanc_title: "Orthanc"
orthanc_aet: "ORTHANC"
orthanc_user: "orthanc"
orthanc_password: "passw0rd!"
Éléments de configuration supplémentaires à insérer dans orthanc.conf
. Ils doivent suivre le format approprié (voir ci-dessous)
orthanc_users: {}
orthanc_peers: {}
orthanc_modalities: {}
Configuration du Routage
Orthanc peut être configuré en tant que routeur en intégrant un dictionnaire de destinations (pairs). En routant, Orthanc peut éventuellement anonymiser et/ou compresser les données. Voir le rôle derekmerck/queued-orthanc
pour des exemples de construction d'un routage plus flexible utilisant un service "DIANA-Watcher".
orthanc_anonymize: False
orthanc_compress: False
orthanc_destinations: [{dest: nom du pair ou de la modalité, type: pair ou dicom}, ..]
Configuration PostgreSQL
orthanc_pg_backend: False
orthanc_pg_user: "{{ orthanc_user }}"
orthanc_pg_password: "{{ orthanc_password }}"
orthanc_pg_database: "{{ orthanc_container_name }}"
orthanc_pg_host: "postgres"
orthanc_pg_port: 5432
Exemple de Playbook
Exécutez une instance orthanc unique.
- hosts: dicom_node
roles:
- derekmerck.orthanc_docker
Exécutez une instance orthanc unique avec quelques utilisateurs et pairs supplémentaires
- hosts: dicom_node
roles:
- name: derekmerck.orthanc_docker
orthanc_users:
user1: password
user2: passw0rd!
orthanc_peers:
my_peer: [ "http://127.0.0.1:8043/", "user1", "password" ]
my_other_peer: [ "http://127.0.0.1:8043/", "user2", "passwOrd!"]
orthanc_modalities:
my_pacs: ["MY_PACS", "192.168.1.1", 104 ]
my_workstation: ["MY_WORKSTATION", "192.168.1.2", 104 ]
Remarque : Cela fonctionne actuellement uniquement pour les mots de passe des utilisateurs. Exécutez une instance orthanc unique avec des utilisateurs et des pairs supplémentaires utilisant des mots de passe confidentiels (chiffrés avec fernet)
- hosts: dicom_node
vars:
fernet_key: 't8YHZXpNvk_OFPkvyWc2rDWUxp7qXY6tiHr10f_PG3Y='
roles:
- name: derekmerck.orthanc_docker
orthanc_users:
user1: "gAAAAABbcFt-3M4t288flnG2xY88xKPx4U1l1phZtv4hDpnjNx3Mq8s9MnY74dY6Ab35qp6voKAVGJ9BMT8wlthPY4COk16sIg=="
user2: "gAAAAABbcFrtnhBWtrEC8QXvqByYsyEEqNKC2mP2joN4rcK58RNZIdKqMLErq-Lki6NhPSvpv_Y7fkYJRuaM4Gbt0QFFYZtZmQ=="
orthanc_peers:
my_peer: [ "http://127.0.0.1:8043/", "user1", "gAAAAABbcFt-3M4t288flnG2xY88xKPx4U1l1phZtv4hDpnjNx3Mq8s9MnY74dY6Ab35qp6voKAVGJ9BMT8wlthPY4COk16sIg==" ]
my_other_peer: [ "http://127.0.0.1:8043/", "user2", "gAAAAABbcFrtnhBWtrEC8QXvqByYsyEEqNKC2mP2joN4rcK58RNZIdKqMLErq-Lki6NhPSvpv_Y7fkYJRuaM4Gbt0QFFYZtZmQ=="]
Exécutez plusieurs instances contre le même backend pour équilibrer la charge.
- hosts: dicom_node
tasks:
- include_role:
name: derekmerck.orthanc_docker
vars:
# Variables indépendantes
orthanc_api_port: "804{{ item }}"
orthanc_dicom_port: "424{{ item }}"
# Variables partagées
orthanc_data_dir: "/data/orthanc"
orthanc_docker_image: "jodogne/orthanc-plugins"
orthanc_pg_backend: True
orthanc_db_name: "orthanc"
with_sequence: count=5
Exécutez un multiplexeur avec compression
- hosts: dicom_node
roles:
- name: derekmerck.orthanc_docker
orthanc_peers:
my_peer: [ "http://127.0.0.1:8043/", "user1", "password" ]
orthanc_modalities:
my_workstation: ["MY_WORKSTATION", "192.168.1.2", 104 ]
orthanc_destinations:
- dest: my_peer
type: peer
- dest: my_workstation
type: dicom
orthanc_compression: True
Licence
MIT
Configure and run an [Orthanc](https://www.orthanc-server.com) DICOM node in a Docker container
ansible-galaxy install derekmerck.orthanc_docker