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.
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:
alfresco/extension/mt/mt-context.xml.sample
to alfresco/extension/mt/mt-context.xml
alfresco/extension/mt/mt-admin-context.xml.sample
to alfresco/extension/mt/mt-admin-context.xml
alfresco/extension/mt/mt-contentstore-context.xml.sample
to alfresco/extension/mt/mt-contentstore-context.xml
Then, restart Alfresco to enable multi-tenancy.
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:
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, <[email protected]>
will be the administrator for the tenant account cignex.com
.
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
.
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:
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.
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.