Skip to content
vrinda edited this page Aug 25, 2017 · 118 revisions

Upgrade DCM4CHEE Archive light

Content

Update Database Schema

SQL scripts for updating the database schema from previous versions can be found in directory $DCM4CHEE_ARC/sql. A change in the DB schema is reflected by an incremented second component of the version number (e.g. from 5.9.0 to 5.10.0). So one does not need to update the database schema for upgrading from a version which only differs in the third component of the version number (e.g. from 5.10.4 to 5.10.5). For upgrading from an older version which second component of the version number in not the previous number, one has to first update the data base schema to the previous version - by applying update scripts for previous versions in the right order - before applying the update script for the current version.

H2

One has to start Wildfly before updating the tables using the H2 console. Access the console at http://localhost:8080/h2console, login and update the database scheme by:

    RUNSCRIPT  FROM '$DCM4CHEE_ARC/sql/update-5.10-h2.sql'

PostgreSQL

    > psql -h localhost <database-name> <user-name> < $DCM4CHEE_ARC/sql/update-5.10-psql.sql

MySQL and MariaDB

    > mysql -u <user-name> -p<user-password> <database-name> < $DCM4CHEE_ARC/sql/update-5.10-mysql.sql

Firebird

    > isql-fb
    Use CONNECT or CREATE DATABASE to specify a database
    SQL> connect 'localhost:<database-name>'
    CON> user '<user-name>' password '<user-password>';
    SQL> in DCM4CHEE_ARC/sql/update-5.10-firebird.sql;
    SQL> exit;

DB2

    > su <user-name>
    Password: <user-password>
    > db2 connect to <database-name>
    > db2 -t < $DCM4CHEE_ARC/sql/update-5.10-db2.sql
    > db2 terminate

Oracle

    $ sqlplus <user-name>/<user-password>
    SQL> @$DCM4CHEE_ARC/sql/update-5.10-oracle.sql

MS SQL Server

Not yet tested

Update LDAP Schema

OpenLDAP

OpenLDAP with slapd.conf configuration file

  1. Replace previous schema files in OpenLDAP schema configuration directory by new versions from DCM4CHEE Archive distribution:

    > cp $DCM4CHEE_ARC/ldap/schema/* /etc/openldap/schema/ [UNIX]
    > copy %DCM4CHEE_ARC%\ldap\schema\* \Program Files\OpenLDAP\schema\ [Windows]
    
  2. Restart slapd:

    > sudo service slapd restart [UNIX]
    

OpenLDAP with dynamic runtime configuration

  1. Delete previous schema files from the OpenLDAP runtime configuration:

    > sudo rm "/etc/ldap/slapd.d/cn=config/cn=schema/cn={4}dicom.ldif"
    > sudo rm "/etc/ldap/slapd.d/cn=config/cn=schema/cn={5}dcm4che.ldif"
    > sudo rm "/etc/ldap/slapd.d/cn=config/cn=schema/cn={6}dcm4chee-archive.ldif"
    
  2. Restart slapd:

    > sudo service slapd restart
    
  3. Import new LDAP schema files for OpenLDAP runtime configuration, using OpenLDAP CL utility ldapadd, e.g.:

    > sudo ldapadd -Y EXTERNAL -H ldapi:/// -f $DCM4CHEE_ARC/ldap/slapd/dicom.ldif
    > sudo ldapadd -Y EXTERNAL -H ldapi:/// -f $DCM4CHEE_ARC/ldap/slapd/dcm4che.ldif
    > sudo ldapadd -Y EXTERNAL -H ldapi:/// -f $DCM4CHEE_ARC/ldap/slapd/dcm4chee-archive.ldif
    

OpenDJ

  1. Replace previous schema files in OpenDJ schema configuration directory by new versions from DCM4CHEE Archive distribution:

    > cp $DCM4CHEE_ARC/ldap/opendj/* $OPENDJ_HOME/config/schema/ [UNIX]
    > copy %DCM4CHEE_ARC%\ldap\opendj\* %OPENDJ_HOME%\config\schema\ [Windows]
    
  2. Restart OpenDJ by

    > $OPENDJ_HOME/bin/stop-ds
    > $OPENDJ_HOME/bin/start-ds
    

Apache DS 2.0.0

  1. Delete the ou=objectclasses child entry from the schema entries

    ou=schema
    + cn=dcm4chee-arc
      + ou=objectclasses
    + cn=dcm4che
      + ou=objectclasses
    

    before deleting the schema entries itself, using the Delete Entry function of Apache Directory Studio LDAP Browser.

  2. Import new LDAP schema files for Apache DS:

    $DCM4CHEE_ARC/ldap/apacheds/dcm4che.ldif
    $DCM4CHEE_ARC/ldap/apacheds/dcm4chee-archive.ldif
    

    using the LDIF import function of Apache Directory Studio LDAP Browser.

Update LDAP Data

If one made structural changes - e.g. by adding/removing Network Application Entities or by configuring multiple Archive devices - to the provided default configuraton, one has to adjust the provided update-data-VERSION.ldif files in $DCM4CHEE_ARC/ldap according to one's changes, before applying them, using the LDIF import function of Apache Directory Studio LDAP Browser or using LDAP CLI utility ldapmodify of OpenLDAP. To update from an older version than the most-recent previous version, e.g. from 5.9.2 to 5.10.5, one has to apply the update scripts for the previous versions, e.g.:

> $ cd $DCM4CHEE_ARC/ldap
> $ ldapmodify -xW -Dcn=admin,dc=dcm4che,dc=org -f update-config-5.9.2.ldif
> $ ldapmodify -xW -Dcn=admin,dc=dcm4che,dc=org -f update-config-5.9.3.ldif
> $ ldapmodify -xW -Dcn=admin,dc=dcm4che,dc=org -f update-config-5.10.0.ldif
> $ ldapmodify -xW -Dcn=admin,dc=dcm4che,dc=org -f update-config-5.10.1.ldif
> $ ldapmodify -xW -Dcn=admin,dc=dcm4che,dc=org -f update-config-5.10.2.ldif
> $ ldapmodify -xW -Dcn=admin,dc=dcm4che,dc=org -f update-config-5.10.3.ldif
> $ ldapmodify -xW -Dcn=admin,dc=dcm4che,dc=org -f update-config-5.10.4.ldif

before one can update the LDAP configuration for the current version by:

> $ ldapmodify -xW -Dcn=admin,dc=dcm4che,dc=org -f update-data-5.10.5.ldif
Enter LDAP Password:
modifying entry "dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org"
:

In v5.10.2, the configuration which Storage System is used by a particular Archive AE changed: The LDAP attribute which reference the Storage ID for object storage used by the AE changed from dcmStorageID to dcmObjectStorageID, and it's no longer possible to configure a default Storage ID used for object storage on Device level. The corresponding lines in update-config-5.10.2.ldif are

dn: dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
changetype: modify
delete: dcmStorageID
-

dn: dicomAETitle=DCM4CHEE,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
changetype: modify
add: dcmObjectStorageID
dcmObjectStorageID: fs1
-

If one changed the default Storage ID fs1, one may either adjust update-config-5.10.2.ldif before applying it oneself, or apply one's change afterwards again - either directly in LDAP or using the UI.

Since v5.6.0, user names and passwords for the secured version are stored in LDAP. For upgrading from previous versions than v5.6.0 one may import default user/passwords user/user and admin/admin by

> $ ldapadd -xW -Dcn=admin,dc=dcm4che,dc=org -f $DCM4CHEE_ARC/ldap/default-users.ldif
Enter LDAP Password:
adding new entry "ou=users,dc=dcm4che,dc=org"
adding new entry "uid=admin,ou=users,dc=dcm4che,dc=org"
adding new entry "uid=user,ou=users,dc=dcm4che,dc=org"
adding new entry "cn=admin,ou=users,dc=dcm4che,dc=org"
adding new entry "cn=user,ou=users,dc=dcm4che,dc=org"

Since v5.8.0, realm management permissions are granted to the admin user. For upgrading from previous versions than v5.8.0 one may grant these permissions by

> $ ldapadd -xW -Dcn=admin,dc=dcm4che,dc=org -f $DCM4CHEE_ARC/ldap/realm-management.ldif
Enter LDAP Password:
adding new entry "ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=create-client,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=impersonation,ou=realm-management,dc=dcm4che,dc=org"
adding new entry "cn=manage-authorization,ou=realm-management,dc=dcm4che,dc=org"
:

Since v5.9.0, role auditlog is assigned to the admin user. For upgrading from previous versions than v5.9.0 one may assign this role by

> $ ldapadd -xW -Dcn=admin,dc=dcm4che,dc=org -f $DCM4CHEE_ARC/ldap/auditlog-group-ldif
adding new entry "cn=auditlog,ou=users,dc=dcm4che,dc=org"

Before v5.10.4, any configuration change of the archive using the UI prevents further emission of Audit messages caused by the insert of an universal Audit Suppress Criteria to existing Audit Loggers of the Archive Device. You may either remove that Audit Suppress Criteria from the Audit Logger(s)

  • using the UI in v5.10.4+, or
  • remove the Audit Logger child node directly in LDAP by applying
    dn: cn=cn,cn=Audit Logger,dicomDeviceName=dcm4chee-arc,cn=Devices,cn=DICOM Configuration,dc=dcm4che,dc=org
    changetype: delete
    

Update WildFly Deployment

Latest version of DCM4CHEE Archive available is 5.10.5

  1. Update DCM4CHE dcm4chee-arc-light libraries as JBoss modules:

     > cd  $WILDFLY_HOME
     > rm -r modules/modules/org/dcm4che
     > unzip $DCM4CHEE_ARC/jboss-modules/dcm4che-jboss-modules-dcm4chee-arc-light-5.x.x.zip
    
  2. If upgrading from version 5.6.x or older, update QueryDSL libraries to 4.1.4 as JBoss module:

     > cd  $WILDFLY_HOME
     > rm -r modules/modules/com/querydsl
     > unzip $DCM4CHEE_ARC/jboss-modules/querydsl-jboss-modules-4.1.4-noguava.zip
    
  3. If upgrading from version 5.6.x or older, update jclouds ibraries to 1.9.2 as JBoss modules:

     > cd  $WILDFLY_HOME
     > rm -r modules/modules/com/apache/jclouds
     > unzip $DCM4CHEE_ARC/jboss-modules/jclouds-jboss-modules-1.9.2-noguava.zip
    
  4. (Re-)Start WildFly in standalone mode with the correct configuration file:

     > $WILDFLY_HOME/bin/standalone.sh -c dcm4chee-arc.xml [UNIX]
     > %WILDFLY_HOME%\bin\standalone.bat -c dcm4chee-arc.xml [Windows]
    
  5. If upgrading from version 5.5.x or older, create JMS Queue HL7Send using JBoss CLI:

     > $WILDFLY_HOME/bin/jboss-cli.sh -c [UNIX]
     > %WILDFLY_HOME%\bin\jboss-cli.bat -c [Windows]
     [standalone@localhost:9990 /] jms-queue add --queue-address=HL7Send --entries=java:/jms/queue/HL7Send
    
  6. If upgrading from version 5.6.x or older, create JMS Queue StgCmtSCU using JBoss CLI:

     > $WILDFLY_HOME/bin/jboss-cli.sh -c [UNIX]
     > %WILDFLY_HOME%\bin\jboss-cli.bat -c [Windows]
     [standalone@localhost:9990 /] jms-queue add --queue-address=StgCmtSCU --entries=java:/jms/queue/StgCmtSCU
    
  7. If upgrading from version 5.7.0 or older, install ecs-object-client 3.0.0 libraries as JBoss modules:

    > cd  $WILDFLY_HOME
    > unzip $DCM4CHEE_ARC/jboss-modules/ecs-object-client-jboss-modules-3.0.0.zip
    
  8. If upgrading from version 5.7.2 or older, create JMS Queue RSClient using JBoss CLI:

     > $WILDFLY_HOME/bin/jboss-cli.sh -c [UNIX]
     > %WILDFLY_HOME%\bin\jboss-cli.bat -c [Windows]
     [standalone@localhost:9990 /] jms-queue add --queue-address=RSClient--entries=java:/jms/queue/RSClient
    
  9. If upgrading to version 5.10.5 or newer, create JMS queue CMoveSCU using JBoss CLI:

     > $WILDFLY_HOME/bin/jboss-cli.sh -c [UNIX]
     > %WILDFLY_HOME%\bin\jboss-cli.bat -c [Windows]
     [standalone@localhost:9990 /] jms-queue add --queue-address=CMoveSCU --entries=java:/jms/queue/CMoveSCU
    
  10. Undeploy old DCM4CHEE Archive 5.x using JBoss CLI, e.g.:

    > $WILDFLY_HOME/bin/jboss-cli.sh -c [UNIX]
    > %WILDFLY_HOME%\bin\jboss-cli.bat -c [Windows]
    [standalone@localhost:9990 /] undeploy dcm4chee-arc-ear-5.x.old-psql.ear
    
  11. Deploy new DCM4CHEE Archive 5.x using JBoss CLI, e.g.:

    [standalone@localhost:9990 /] deploy $DCM4CHEE_ARC/deploy/dcm4chee-arc-ear-5.x.new-psql.ear
    
  12. If upgrading secured version of archive, then also refer Upgrade Secured

Clone this wiki locally