Running yoda-scan has three external dependencies, which must be configured after yoda-scan docker is installed via rpm.
They are:
* yoda connectivity
* mundi connectivity
* mail storage access
Yoda connectivity
By default, dockerized yoda-scan tries to find yoda at http://yoda:25793. When yoda is installed via rpm, it runs its container named yoda and thus, Yoda-scan connects to it out of the box.
When yoda runs on a different machine than Yoda-scan, <fulltext_api> element must be set in the configuration file /etc/yoda-scan/config/yoda-scan.xml, and then the Yoda-scan container must be restarted
docker restart yoda-scan
Mundi connectivity
Similar to yoda connectivity, Mundi's default address is set to http://mundi:25797. Thus when Mundi was installed via rpm on the same machine, it would again connect without further work. Otherwise, user must set <document_api> in /etc/yoda-scan/config/yoda-scan.xml to Mundi address and restart the container
docker restart yoda-scan
Please note that Mundi usage is optional. If you don't want to use it, set <document_api> to an empty string. Yoda-scan will wait for Mundi at the start, thus leaving <document_api> set to address, where Mundi doesn't run results to inoperable Yoda-scan.
Mail storage access
IceWarp server sends Yoda-scan absolute file paths to the mail (and archive) storage directory. Therefore, it needs access to IceWarp's mail and archive storage directory to extract text from emails. The storage directory must be mounted on the system, where yoda-scan is installed at /mnt/data mount point (i.e. /mnt/data/mail and /mnt/data/archive, respectively). Read-only access is sufficient enough.
The API between the IceWarp Server and Yoda-scan uses absolute paths to specify what files Yoda-scan should process. However, when Yoda-scan runs on a different machine and, moreover, inside a Docker container, the configuration is not so straightforward.
When the IceWarp Server itself also uses /mnt/data as a storage mount point, there's no need for extra manual configuration.
When the IceWarp Server uses a different path (for example, because it runs on Windows) or you don't want to use /mnt/data, manual configuration is required.
Be aware that there are three filesystems involved:
- IceWarp file system - this is how the IceWarp Server sees the mail storage. IceWarp Server sends paths from this filesystem via API to Yoda-scan. By default, it should be mounted to /mnt/data.
- VMWare image file system - this is the file system on the image. Mail storage must be mounted here via NFS or Samba. By default, it should be mounted to /mnt/data. Read-only access is sufficient enough on the VMWare file system.
- Docker file system - this is the container filesystem used by running the Yoda-scan service. Yoda-scan is configured to use /var/data/server_storage/mail for the mail directory and /var/data/server_storage/archive for the archive directory.
Here are the setup steps:
When the storage on the IceWarp file system is not at /mnt/data (for example, because it runs on Windows), follow these steps:
- mount the storage to /mnt/data on the VMWare file system
- install yoda-scan to have needed configuration files in place - yum install yoda-scan
- configure /etc/yoda-scan/config/yoda-scan.xml - map/rewrite. Set the source attribute to the storage path on the IceWarp file system. Leave dest as /var/data/server_storage.
- reinstall Yoda-scan and see the logs, and docker inspect if everything operates as expected - yum reinstall yoda-scan
When you don't want to mount mail storage at /mnt/data on the VMWare file system, for example, when you want the same paths on the IceWarp file system and VMWare files system, and you don't use /mnt/data (let's say you want to mount storage at /mnt/icewarp for example):
- install yoda-scan to have the needed configuration files in place
yum install yoda-scan
- copy /etc/yoda-scan/docker.args.default to /etc/yoda-scan/docker.args - it contains --volume arguments (bind mounts) for the docker container
- edit /etc/yoda-scan/docker.args to bind mount your mount point (/mnt/icewarp) to container's /var/data/server_storage
- If the storage path on the IceWarp file system does not match the path on the VMWare file system (in our example, IceWarp uses something other than /mnt/icewarp), configure /etc/yoda-scan/config/yoda-scan.xml - map/rewrite. Set the source attribute to the storage path on the IceWarp file system and leave dest as /var/data/server_storage.
- reinstall Yoda-scan and see the logs, and docker inspect if everything operates as expected
yum reinstall yoda-scan
Comments
0 comments
Article is closed for comments.