Multi-Tenancy

Multi-Tenancy (MT) is a software architecture, where a single instance of the software runs on a software-as-a-service (SaaS) vendor's server, while serving multiple client organizations (tenants). MT is contrasted with a multi-instance architecture, where separate software instances (or hardware systems) are set up for different client organizations. With a multi-tenant architecture, a software application is designed to virtually partition its data and configuration, so that each client organization works with a customized virtual application instance.

Alfresco ECM can be configured as a true single-instance multi-tenant environment. This enables multiple independent tenants to be hosted on a single instance, which can be installed, either on a single server or across a cluster of servers. The Alfresco instance is logically partitioned in such a way that it will appear to each tenant as if they are accessing a completely separate instance of Alfresco.

Enabling Multi-Tenancy

By default, Alfresco supports a single-instance, Single-Tenant (ST) environment, where each tenant (for example customer) runs a single instance that is installed on one server or across a cluster of servers.

To enable a multi-tenant environment, you need to rename the following three sample MT extension files:

  • Rename alfresco/extension/mt/mt-context.xml.sample to alfresco/extension/mt/mt-context.xml
  • Rename alfresco/extension/mt/mt-admin-context.xml.sample to alfresco/extension/mt/mt-admin-context.xml
  • Rename alfresco/extension/mt/mt-contentstore-context.xml.sample to alfresco/extension/mt/mt-contentstore-context.xml

Then, restart Alfresco to enable multi-tenancy.

Creating tenants

The default Alfresco admin user can be considered as the super tenant. All tenants can be administered by this super tenant admin user from the Tenant Administration Console.

Log in to the Alfresco Explorer (http://<servername>:<port>/alfresco) using an admin username and password. The URL to the tenant administration console is http://<Alfresco Explorer URL>/faces/jsp/admin/tenantadmin-console.jsp, which in our case is, http://localhost:8080/alfresco/faces/jsp/admin/tenantadmin-console.jsp, as shown in the following screenshot:

Creating tenants

To test the multi-tenancy features, create a tenant account using the Tenant Admin Console.

create cignex.com pwcignex /usr/tenantstores/cignex

In this example, cignex.com is the domain, pwcignex is the tenant administrator's password, and cignex is the name of tenant store.

Now, will be the administrator for the tenant account cignex.com.

Tenant use case

Now, the Alfresco instance has multi-tenancy enabled, with two tenants. One is the default tenant, and the other is the cignex.com tenant.

Log in to Alfresco Explorer (http://<servername>:<port>/alfresco) with a user ID of [email protected] and a password of pwcignex, as set by the super tenant administrator.

You will notice a new instance has been created, as shown in the following screenshot. The user administration, spaces, security, scripts, business rules, and search, are specific to the tenant, cignex.com.

Tenant use case

The tenant administrator ([email protected]) can create other users, who will have local access to this tenant site, as needed. The users created for this tenant should log in to the cignex.com domain. For example, if the user id is user1, then that user must login with [email protected] as the user ID.

Similarly, the spaces and the content created can only be accessed and searched by the tenant users. Even the interfaces, such as CIFS, FTP, and WebDAV, are specific to a tenant. For example, if you map CIFS with [email protected] as the user ID, then you will access only the cignex.com tenant-specific space structure, as shown in the following screenshot:

Tenant use case

Managing tenants

As a super tenant administrator, you can enable or disable tenants, you can export or import tenant data, and you can perform other administrative tasks, such as, changing tenant admin passwords.

The following table lists some of the important commands that you can use in the Tenant Admin Console.

Command

Description

help

Lists all of the commands.

show tenants

Lists all of the tenants and shows their details.

create <tenant domain> <tenant admin password> [<root contentstore dir>]

Creates a tenant, with an admin user called admin@<tenant domain> with a supplied admin password. The root of the contentstore folder can be optionally specified.

For example: create cignex.com pwcignex /usr/tenantstores/cignex.

changeAdminPassword <tenant domain> <new pass word>

Useful if the tenant's admin (admin@<tenant domain>) has forgotten their password.

enable <tenant domain>

Enables the tenant so that it is active and available for new logins.

disable <tenant domain>

Disables the tenant so that it is inactive. Existing logins will fail on the next usage.

delete <tenant domain>

Deletes the tenant. This currently requires a server restart to clear the index threads. Also, the tenant search index folders should be deleted manually.

export <tenant domain> <destination directory>

Exports the tenant to the given destination folder. Export filenames will be suffixed with <tenant domain>_.

For example: export cignex.com /usr/exportdir

import <tenant domain> <source directory>

Creates a tenant by importing the tenant files from the given source folder. The import filenames must be suffixed with <tenant domain>_.

Exporting and importing tenant data

As part of the tenant maintenance activity, you could periodically export tenant specific data. For example, the following is the command (from the Tenant Admin Console) to export the entire cignex.com tenant data to the destination folder c:/temp:

export cignex.com c:/temp

You will notice that the following tenant files are created in the destination folder, with filenames suffixed with <tenant domain>_.

  • cignex.com_models.acp
  • cignex.com_spaces.acp
  • cignex.com_spaces_archive.acp
  • cignex.com_system.acp
  • cignex.com_users.acp
  • cignex.com_versions2.acp

Similarly, you can recreate the tenant by importing the tenant files from a given source folder. The syntax of the import command is specified in the table shown earlier.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset