June 25, 2017

Alfresco tips & tricks – #7 Multi Tenancy

The multi-tenancy (MT) feature enables a single Alfresco instance to host multiple independent tenants. The single instance is logically partitioned such that it will appears to each tenant as a completely separate instance of Alfresco.

 

giuseppe-urso-alfresco-multy-tenancy

Each tenant shown in the figure will have an administrator user called admin@<tenant domain>. Let’s see how to enable MT functionality in the Community version.

Alfresco 5.0.c

In this version the web Tenant Console was removed. To create a new tenant you can use the webscript /alfresco/s/api/tenants with a json POST. Here is an example using curl.

Alfresco 4.2

– The multi-tenancy feature is not enabled by default but it is automatically enabled when the first tenant is created.
– Login as admin and open the tenant-admin console http://mycompany/alfresco/faces/jsp/admin/tenantadmin-console.jsp
– Run create tenant command:

Alfresco 4.0 and older versions

– Go to the directory alfresco_home/tomcat/shared/classes/alfresco/extension/mt
– Remove the .sample suffix from all mt* files
– Restart alfresco
– Login as admin and open the tenant-admin console http://mycompany/alfresco/faces/jsp/admin/tenantadmin-console.jsp
– Run create tenant command:

Other useful commands

7 Comments

    1. Giuseppe Urso

      The “mt” directory is only for the Alfresco versions older than 4.0.
      In Alfresco 4.2.f you can enable automatically the multi-tenancy when the first tenant is created. You must use the tenant admin console.
      Follow the section “Alfresco 4.1 and later” in the article.
      😉

    1. Giuseppe Urso

      Hi Sandro,

      thanks for your comment.
      You can’t open this url “on the fly” because it is filtred by the Alfresco authentication chain…
      You must first login into Alfresco as admin (http://localhost:8080/alfresco), then past the tenant url in your browser.
      This works for me.

      Also remember that multi-tenancy feature is not enabled by default. When you install Alfresco, multi-tenancy is disabled. The multi-tenancy feature is automatically enabled when the first tenant is created.
      Use the tenant web console to make it:

      create tenant_domain tenant_admin_password (root_contentstore_dir)

      Giuseppe

    1. Giuseppe Urso

      When you say “bootstrap environment”, do you refer to the JS framework for developing responsive?
      Sorry, but this argument is out from this topic.

      What I can say is that when you install Alfresco (4.1 and later), multi-tenancy is disabled. The multi-tenancy feature is automatically enabled when the first tenant is created. Only the administrator can manage tenants using the Tenant Administration Console.
      Log in to Alfresco as the admin user and access: http://localhost:8080/alfresco/faces/jsp/admin/tenantadmin-console.jsp
      To create a new tenant, see the commands posted in this article.

      Giuseppe

Leave a Reply

Your email address will not be published.