I need to implement Multi-Schema Multi-Tenancy in alfresco
Any guidance will be helpful !
I guess you mean Alfresco Process Services? If so have you looked at Multi-schema multi-tenancy (MS-MT) | Alfresco Documentation and the links at the bottom of that page?
The official documentation is not detailed I would like to have an example of installation multi-tenant license and also I want to know how to launch a requette Rest to create a tenant
Have you looked at the getting started link at the bottom (it is a bit hidden) - Getting started with MS-MT | Alfresco Documentation ?
I take it you are an enterprise customer? I don't have more detailed documentation to hand but as an enterprise customer you can raise an official support request.
No, I am a student engineer as part of my end of studies project I want to know how to implement the MS-MT in alfresco. Well I looked at the example of Getting started but for example the property tenancy.model = isolated one put it in which file and how to configure the primary database?
Ok I can share some more detailed steps that I've been able to obtain.
The tenancy.model=isolated is in activiti-app.properties
You're going to want to connect directly to the database to do this so you're going to need a database tool and the right level of access. For mysql you can create a user using e.g.
CREATE USER 'alfresco'@'localhost' IDENTIFIED BY 'password';
To create a primary database:
CREATE DATABASE primary_db
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
GRANT ALL ON primary_db.* TO 'alfresco'@'localhost';
If you want to create two tenants, you need to create two secondary databases:
CREATE DATABASE db_tenant_a
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
GRANT ALL ON db_tenant_a.* TO 'alfresco'@'localhost';
CREATE DATABASE db_tenant_b
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
GRANT ALL ON db_tenant_b.* TO 'alfresco'@'localhost';
Then you can create the tenants via the API (this API will populate the tenant database with the corresponding tables)
a. POST http://localhost:9999/activiti-app/api/enterprise/admin/tenants
{
"name" : "db_tenant_a",
"configuration" : "tenant.admin.email=admin@db_tenant_a.com\n datasource.driver=com.mysql.jdbc.Driver\n datasource.url=jdbc:mysql://127.0.0.1:3306/db_tenant_a?characterEncoding=UTF-8\n datasource.username=alfresco\n datasource.password=password"
}
b. POST http://localhost:9999/activiti-app/api/enterprise/admin/tenants
{
"name" : "db_tenant_b",
"configuration" : "tenant.admin.email=admin@db_tenant_b.com\n datasource.driver=com.mysql.jdbc.Driver\n datasource.url=jdbc:mysql://127.0.0.1:3306/db_tenant_b?characterEncoding=UTF-8\n datasource.username=alfresco\n datasource.password=password"
}
Then you should be able to Log in with tenant admin for each tenant using admin@app.activiti.com and user's passord
db_tenant_b: admin@db_tenant_b.com
!Note: Do not use admin@app.activiti.com to create users inside the tenants, only tenant admins should create users
You can then create users using tenant admin and login with those users and create new models: processes, app and try running them
I didn't find the file activiti-app.properties . is it me that will create the file, if yes. where do I want to create the file?
There should be a file with default values on your server - see Configuring Alfresco Process Services | Alfresco Documentation
if activiti-app.properties does not exist in the path specified in the official documentation then I will create the file and configure it or what?
Are you definitely using the same product and version as that documentation page?
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.