Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Provide OCR engine in VM ("OCR appliance")
  2. OCR appliance must be set up to allow remote administration using ssh from the DMS appliance's console by public key authentication for a user with administrative rights (<<adminuser>>)
  3. DMS appliance needs /<storagepath>/nuxeo/data/ and /<storagepath>/nuxeo/tmp/ NFS-exports
  4. OCR appliance must mount these NFS-shares to /var/lib/nuxeo/data/ and /opt/nuxeo/server/tmp/ respectively and make suer these mounts will be auto mounted (kept alive)
  5. In DMS appliance, place a script "piocr" in /<storagepath>/nuxeo/scripts/ and make executable (chmod +x). This script contains the commands to drive the OCR process for each file.
  6. Create ssh key in DMS appliance using "ssh-keygen" command, copy public key (id_rsa.pub) and paste into /Users<<adminuserhome>>/<<adminuser>>/.ssh/authorized_keys file of OCR appliance
  7. Login from DSM appliance to OCR appliance using ssh. After successful login, move the DMS appliance's key files "id_rsa", "id_rsa.pub" and "known_hosts" from ~/.ssh/ to /<storagepath>/nuxeo/ssh/ 
  8. Set key "ocr.engine.name" in PAT_DMS_SETTINGS table of Patricia db to "piocr"
  9. Add below change commands to the "commands.conf" file of auto-deploy client specific repository (also found in ~/deploy/config/)
  10. Start re-deploy of DMS using ~/deploy/deploy_script/deploy.sh command as outlined here: Auto-deploy script

Scripts:

...

:

...


Code Block
languagebash
titlepiocr
#!/bin/bash
ssh <<adminuser>>@<<ocr.appliance.name>> "nice -n 10 /path/to/ocr-command <<parameters>> $1 $2""

$1 is the path and filename of the output file, $2 is the path and filename of the input file that are handed over when the DMS calls the piocr bash.

 

Make sure you replace <<adminuser>> with the correct user name of an administrative user in the OCR appliance, and <<ocr.appliance.name>> with the proper FQND or IP address.


Deploy script changes:

Make sure that in the

Make sure in

"commands.conf" file of the auto-deploy client specific repository, the following commands are added to the nuxeo container definition (under section "elif [${1} = "NUXEO"] then") so as to be added the container run command

.

:

 


Code Block
  add_volume "/<storage_path>/nuxeo/ssh" "/home/nuxeo/.ssh"
  add_volume "/<storage_path>/nuxeo/scripts/piocr" "/usr/local/bin/piocr"