AppSuite:ImageConverter Install

From Open-Xchange
Revision as of 14:40, 9 July 2018 by Kai.ahrens (talk | contribs)

Download & Installation Imageconverter

General Information

OX App Suite displays images (photos and graphics) in many different ways as

  • Thumbnails
  • Icons
  • Images embedded in documents
  • in Emails
  • in an own pop-up window.

The image processing is done by the OX middleware and not by a dedicated service, so that the middleware might consume a lot of cpu time just to convert images to different target formats. Furthermore the OX middleware does not cache images for a longer time. Only thumbnails get cached, either by the database or file system based. These images get converted into the required formats (e.g. jpeg, png) when requested by an user action in the user Interface.

With OX App Suite 7.10 there is an alternative to process images by the OX middleware. The image conversion and delivery can be delegated to an extra service, the OX ImageConverter server. It's deployment model is exactly corresponding to the documentconverter server via a client/server service.

The separation of the ImageConverter service has the following advantages:

Configuration and usage of one or more separate storages Performance improvements via persistent cache Pre-rendering of pre-defined formats and sizes (defaults are auto:200x150, auto:480x320, auto:640x480, auto:800x600, auto:1280x720, auto:1920x1080") if resolution of the source image allows this. Best matching size will be delivered without new conversion, if an image is requested by the Middleware Browser is able to cache those images No limits for image sizes The default target format is specified by configured, predefined formats. By using the 'auto' (beside 'jpg' or 'png') target format, opaque source images are converted to JPEG target images and transparent images are converted to PNG target images. Reduce load of OX Middleware

Requirements

See the Open-Xchange software requirements page for details.

Mandatory Modules

Additional functional modules need to be installed separately on the user servicing OX App Suite middleware nodes:

Installation

The Image Converter deployment consists of the package open-xchange-imageconverter-server.

Redhat Enterprise Linux 6 or CentOS 6

Add the following repositories to your Open-Xchange yum configuration:

[open-xchange-imageconverter]
name=Open-Xchange-imageconverter
baseurl=https://software.open-xchange.com/products/appsuite/stable/imageconverter/RHEL6/
gpgkey=https://software.open-xchange.com/oxbuildkey.pub
enabled=1
gpgcheck=1
metadata_expire=0m

if you have a valid maintenance subscription, please add also following repositories by replacing the credentials.

[open-xchange-imageconverter-updates]
name=Open-Xchange-imageconverter-updates
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/imageconverter/updates/RHEL6/
gpgkey=https://software.open-xchange.com/oxbuildkey.pub
enabled=1
gpgcheck=1
metadata_expire=0m

$ yum install open-xchange-imageconverter-server

Redhat Enterprise Linux 7 or CentOS 7

Add the following repositories to your Open-Xchange yum configuration:

[open-xchange-imageconverter]
name=Open-Xchange-imageconverter
baseurl=https://software.open-xchange.com/products/appsuite/stable/imageconverter/RHEL7/
gpgkey=https://software.open-xchange.com/oxbuildkey.pub
enabled=1
gpgcheck=1
metadata_expire=0m

if you have a valid maintenance subscription, please add also following repositories by replacing the credentials.

[open-xchange-imageconverter-updates]
name=Open-Xchange-imageconverter-updates
baseurl=https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/imageconverter/updates/RHEL7/
gpgkey=https://software.open-xchange.com/oxbuildkey.pub
enabled=1
gpgcheck=1
metadata_expire=0m

$ yum install open-xchange-imageconverter-server

Debian GNU/Linux 8.0

Add the following repositories to your Open-Xchange apt configuration:

deb https://software.open-xchange.com/products/appsuite/stable/imageconverter/DebianJessie /

if you have a valid maintenance subscription, please add also following repositories by replacing the credentials.

deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/imageconverter/updates/DebianJessie /

$ apt-get update
$ apt-get install open-xchange-imageconverter-server

Debian GNU/Linux 9.0

Add the following repositories to your Open-Xchange apt configuration:

deb https://software.open-xchange.com/products/appsuite/stable/imageconverter/DebianStretch /

if you have a valid maintenance subscription, please add also following repositories by replacing the credentials.

deb https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/imageconverter/updates/DebianStretch /

$ apt-get update
$ apt-get install open-xchange-imageconverter-server

SUSE Linux Enterprise Server 12

$ zypper ar https://software.open-xchange.com/products/appsuite/stable/imageconverter/SLE_12 imageconverter

if you have a valid maintenance subscription, please add also following repositories by replacing the credentials.

$ zypper ar https://LDBUSER:LDBPASSWORD@software.open-xchange.com/products/appsuite/stable/imageconverter/updates/SLE_12 imageconverter-updates

$ zypper ref
$ zypper install open-xchange-imageconverter-server

Monitoring

Image Converter offers runtime information via JMX about the Image Converter. This article guides to the information how to access JMX data, configure and use Jolokia and integrate with munin.

Configuration

Permissions

Since the ImageConverter service uses the FileItemService, which itself needs a dedicated filestore and a dedicated database schema, the following steps need to be performed by the admin prior to starting the ImageConverter WebService

Create a directory for the FileItemService filestore(s) with OS commands, that is writable for the user, running the OX backends:

$ mkdir -p /var/opt/fileitemstore
$ chown open-xchange:open-xchange /var/opt/fileitemstore

Register the FileItemService filestore(s) via the OX admin command registerfilestore after installation. Since the the RMI port for administrative calls to the ImageConverter server is set to 1095 by default, this port has to be set within the environment, prior to making the registerfilestore call itself. If making the administration call on the system by using an already running middleware server, the port setting can be omitted.

Since the ImageConverter filestore is a dedicated filestore for this service only, the number of allowed contexts for the filestore must be set to 0 (by using switch '-x 0') in order to prevent the middleware from using this filestore as an additional filestorage.

$ env RMI_HOSTNAME=rmi://localhost:1095 /opt/open-xchange/sbin/registerfilestore -A oxadminmaster -P ${AS_ADMINMASTER_PASS} -x 0 -t file:///var/opt/fileitemstore

Enter the id(s) of the FileItemService filestore(s) (put into the configdb database by using the registerfilestore command) into the fileitem.properties configuration file

Create a new, empty database schema to be used by the FileItemService:

$ /opt/open-xchange/imageconverter/sbin/initfileitemdb -i --fileitemdb-pass="${AS_DB_PASS}" --fileitemdb-user=openexchange --fileitemdb-host=localhost --fileitemdb-port=3306 --fileitemdb-dbname=fileitemdb

Enter the database connection data, used to initialize the FileItemService database in the previous 'initfileitemdb' call into the appropriate fields of the fileitem.properties configuration file. Please take care to enter the 'read' properties as well as the 'write' properties within the configuration file.

The following properties of the fileitem.properties need to be adjusted, at least (example values are provided):

$ com.openexchange.fileItem.fileStoreIds=3
$
$ com.openexchange.fileItem.readUrl=jdbc:mysql://localhost/fileitemdb
$ com.openexchange.fileItem.readProperty.1=user=openexchange
$ com.openexchange.fileItem.readProperty.2=password=${AS_DB_PASS}
$
$ com.openexchange.fileItem.writeUrl=jdbc:mysql://localhost/fileitemdb
$ com.openexchange.fileItem.writeProperty.1=user=openexchange
$ com.openexchange.fileItem.writeProperty.2=password=${AS_DB_PASS}

The ImageConverter itself currently relies on the external ImageMagick framework, so that this package has to be installed on the node, the ImageConverter is running on

The following property files finally need to be adjusted on the ImageConverter node to ensure correct runtime behavior of the ImageConverter implementation

  • fileitem.properties
  • imageconverter.properties