Overview

Besides ordinary local- or NFS-filesystem-based filestores, OX may also be used with a cloud storage solution offering a Swift interface. The required functionality is added with the package open-xchange-filestore-swift. The filestore integration was tested against a Rackspace Cloud Files account, however, other object storage implementation offering an Swift-compatible API should work, too.

NOTE The Swift connector is currently in beta status and not yet officially supported.

Installation & Configuration

This chapter shows which components need to be installed and where configuration is done.

Installation on OX App Suite

Debian GNU/Linux 7.0

Add the following entry to /etc/apt/sources.list.d/open-xchange.list if not already present:

deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianWheezy/ /
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# deb https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/products/appsuite/stable/backend/updates/DebianWheezy/ /

and run

$ apt-get update
$ apt-get install open-xchange-filestore-swift

Debian GNU/Linux 8.0

Add the following entry to /etc/apt/sources.list.d/open-xchange.list if not already present:

deb https://software.open-xchange.com/products/appsuite/stable/backend/DebianJessie/ /
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# deb https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/products/appsuite/stable/backend/updates/DebianJessie/ /

and run

$ apt-get update
$ apt-get install open-xchange-filestore-swift

SUSE Linux Enterprise Server 11

Add the package repository using zypper if not already present:

$ zypper ar https://software.open-xchange.com/products/appsuite/stable/backend/SLES11 ox

If you have a valid maintenance subscription, please run the following command and add the ldb account data to the url so that the most recent packages get installed:

$ zypper ar https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/products/appsuite/stable/backend/updates/SLES11 ox-updates

and run

$ zypper ref
$ zypper in open-xchange-filestore-swift

SUSE Linux Enterprise Server 12

Add the package repository using zypper if not already present:

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

If you have a valid maintenance subscription, please run the following command and add the ldb account data to the url so that the most recent packages get installed:

$ zypper ar https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/products/appsuite/stable/backend/updates/SLES11 ox-updates

and run

$ zypper ref
$ zypper in open-xchange-filestore-swift

RedHat Enterprise Linux 6

Start a console and create a software repository file if not already present:

$ vim /etc/yum.repos.d/ox.repo

[ox]
name=Open-Xchange
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/
gpgkey=https://software.open-xchange.com/oxbuildkey.pub
enabled=1
gpgcheck=1
metadata_expire=0m
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# [ox-updates]
# name=Open-Xchange Updates
# baseurl=https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/
# gpgkey=https://software.open-xchange.com/oxbuildkey.pub
# enabled=1
# gpgcheck=1
# metadata_expire=0m

and run

$ yum update
$ yum install open-xchange-filestore-swift

RedHat Enterprise Linux 7

Start a console and create a software repository file if not already present:

$ vim /etc/yum.repos.d/ox.repo

[ox]
name=Open-Xchange
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/
gpgkey=https://software.open-xchange.com/oxbuildkey.pub
enabled=1
gpgcheck=1
metadata_expire=0m
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# [ox-updates]
# name=Open-Xchange Updates
# baseurl=https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/
# gpgkey=https://software.open-xchange.com/oxbuildkey.pub
# enabled=1
# gpgcheck=1
# metadata_expire=0m

and run

$ yum update
$ yum install open-xchange-filestore-swift

CentOS 6

Start a console and create a software repository file if not already present:

$ vim /etc/yum.repos.d/ox.repo

[ox]
name=Open-Xchange
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL6/
gpgkey=https://software.open-xchange.com/oxbuildkey.pub
enabled=1
gpgcheck=1
metadata_expire=0m
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# [ox-updates]
# name=Open-Xchange Updates
# baseurl=https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL6/
# gpgkey=https://software.open-xchange.com/oxbuildkey.pub
# enabled=1
# gpgcheck=1
# metadata_expire=0m

and run

$ yum update
$ yum install open-xchange-filestore-swift

CentOS 7

Start a console and create a software repository file if not already present:

$ vim /etc/yum.repos.d/ox.repo

[ox]
name=Open-Xchange
baseurl=https://software.open-xchange.com/products/appsuite/stable/backend/RHEL7/
gpgkey=https://software.open-xchange.com/oxbuildkey.pub
enabled=1
gpgcheck=1
metadata_expire=0m
# if you have a valid maintenance subscription, please uncomment the 
# following and add the ldb account data to the url so that the most recent
# packages get installed
# [ox-updates]
# name=Open-Xchange Updates
# baseurl=https://[CUSTOMERID:PASSWORD]@software.open-xchange.com/products/appsuite/stable/backend/updates/RHEL7/
# gpgkey=https://software.open-xchange.com/oxbuildkey.pub
# enabled=1
# gpgcheck=1
# metadata_expire=0m

and run

$ yum update
$ yum install open-xchange-filestore-swift


Configuration

Swift filestores can be configured in the configuration file filestore-swift.properties once they have been registered on the server with the registerfilestore command.


Register an Swift filestore

Similarly to local- or NFS-filesystem-based filestores, Swift filestore need to be registered using the commandline tool registerfilestore before they can be used. The scheme-part of the filestore URI must be set to swift in this case. Besides the common swift:// prefix of such filestore URIs, the remaining authority component of the URI specifies an identifier of the filestore that will be used to refer to this filestore registration in the configuration file. It's recommended to use the tenant name here, for example:

 /opt/open-xchange/sbin# ./registerfilestore -A oxadminmaster -P secret -t swift://myswiftstore -s 1048576000 -x 5000
 filestore 7469 registered

Configure the filestore

Additional configuration for each registered filestore is done in the configuration file filestore-swift.properties. To map configuration properties to specific filestore registrations, the filestore identifier corresponding to the defined authority part of the filestore URI is used in the property names. Please refer to the inline documentation or the examples below for details.

Note: In most cases, you want to use the same configuration throughout the whole ox cluster, so you should make sure to use the same filestore-swift.properties configuration file on all nodes.


Step-by-step guide to setup a Rackspace-hosted Swift storage

The following walk-through outlines all steps necessary to complete the setup of a Swift filestore linked against a Rackspace Cloud Files account.


Prerequisites

  • Installed open-xchange-filestore-swift package
  • A valid account for either Rackspace Cloud Files or a Swift object store
  • A user name to use for authentication
  • Either an API key, e.g. c26dabf0000b4f59aec9409fd1d41111, or a password

Containers

Containers are automatically managed by the Swift connector; e.g. Container001. However, possible orphaned containers can also be manually deleted. To drop containers, please log-in to your Rackspace account via https://mycloud.rackspace.com and switch to the "Storage" tab. A listing of available containers is shown and you can drop those, which are no more in use.

Register the filestore

  • Open a terminal on a running backend server of your OX cluster
  • Navigate to the directory where the commandline utilities are installed, usually at /opt/open-xchange/sbin
  • Run the registerfilestore tool using a storepath URL starting with the swift scheme (use "swift://" as prefix literally) followed by the filestore ID, e.g.:
 ./registerfilestore -A oxadminmaster -P secret -t swift://myswiftstore -s 1048576000 -x 5000''
  • The internal ID of the new filestore is printed to console

Configure the filestore

  • Open the configuration file filestore-swift.properties in your favorite editor
  • Insert a new set of properties using the filestore ID assigned during registration of the filestore in the previous step, e.g. myswiftstore:
 com.openexchange.filestore.swift.myswiftstore.protocol=
 com.openexchange.filestore.swift.myswiftstore.hosts=
 com.openexchange.filestore.swift.myswiftstore.path=
 com.openexchange.filestore.swift.myswiftstore.userName=
 com.openexchange.filestore.swift.myswiftstore.tenantName=
 com.openexchange.filestore.swift.myswiftstore.authType=
 com.openexchange.filestore.swift.myswiftstore.authValue=
 com.openexchange.filestore.swift.myswiftstore.domain=
 com.openexchange.filestore.swift.myswiftstore.identityUrl=
 com.openexchange.filestore.swift.myswiftstore.maxConnections=
 com.openexchange.filestore.swift.myswiftstore.maxConnectionsPerHost=
 com.openexchange.filestore.swift.myswiftstore.connectionTimeout=
 com.openexchange.filestore.swift.myswiftstore.socketReadTimeout=
 com.openexchange.filestore.swift.myswiftstore.heartbeatInterval=


  • Specify the protocol to use; either http or https:
 com.openexchange.filestore.swift.myswiftstore.protocol=https


  • Specify the hosts to use; a comma-separated list of host names and/or IP addresses. Those hosts are supposed to point to the same Swift storage. Typically only one may be specified for a hosted Swift storage:
 com.openexchange.filestore.swift.myswiftstore.hosts=storage69.leet101.clouddrive.com


  • Specify the path portion consisting of the API version identifier, the tenant-specific namespace and the container name; e.g. "/v1/MossoCloudFS_992174/Container001"
 com.openexchange.filestore.swift.myswiftstore.path=/v1/MossoCloudFS_992174/Container001


  • Specify the user name to use for authentication
 com.openexchange.filestore.swift.myswiftstore.userName=firstname.lastname


  • Specify the tenant name to use for authentication
 com.openexchange.filestore.swift.myswiftstore.tenantName=992174


  • Specify authentication type to use. Supported values are password, token, and raxkey. password.v2 signals to use password-based authentication according to OpenStack Identity API v2. password.v3 signals to use password-based authentication according to OpenStack Identity API v3. raxkey signals to use the Rackspace-specific way for authenticating using the API key.
 com.openexchange.filestore.swift.myswiftstore.authType=raxkey
 com.openexchange.filestore.swift.myswiftstore.authValue=000da000084b4f59aec9409f1111c2cc


 com.openexchange.filestore.swift.myswiftstore.identityUrl=https://identity.api.rackspacecloud.com/v2.0/tokens


  • Specify the domain identifier to use in case password.v3 authentication type is selected
 com.openexchange.filestore.swift.myswiftstore.domain=default


  • Configure the HTTP connection pool settings:
 com.openexchange.filestore.swift.myswiftstore.maxConnections=100
 com.openexchange.filestore.swift.myswiftstore.maxConnectionsPerHost=100
 com.openexchange.filestore.swift.myswiftstore.connectionTimeout=5000
 com.openexchange.filestore.swift.myswiftstore.socketReadTimeout=15000
 com.openexchange.filestore.swift.myswiftstore.heartbeatInterval=360000


Create contexts using the filestore

  • New contexts that should use the configured filestore can be created by suppliying the ID of the registered filestore in the createcontext commandline tool. Use the internal ID returned by the previously used registerfilestore command executed above, e.g., assuming the ID returned from the registerfilestore command was 6:
 ./createcontext -A oxadminmaster -P secret -u oxadmin -d "Context Admin" -g Admin -s User -p secret -e oxadmin@example.com -q 1000 -L example.com --access-combination-name=all -F 6


Check the configuration

  • Login to the App Suite webinterface with a user from a context using the S3 filestore
  • Upload a new file in the Drive module and download it again to verify basic functionality
  • Check the Rackspace management console to verify the creation of the new file; here, the file should show up under a virtual prefix based on the parent context