This patch enables users to create new tenants via the ANT process.
Users can enter:
* Tenant ID
* Tenant Name
* Data to load on creation of the tenant db (e.g.seed, seed-ext, demo)
* Database Platform (Derby, MySQL, Oracle, PostgreSQL) remark: You can NOT mix platforms)
* IP address of the database (you can add a port if needed)
* User-ID for the database
* Password for the database
Based on the data provided the process will:
* Create a new row in the Tenant table
* Create a new row in the TenantDataSource table
* Create new tables in the new tenant database and fill with initial data (seed, seed-ext, demo)
* Create a new admin id for the tenant (based on Tenant ID followed by '-admin')
* Set the initial password for the tenant admin id (initial 'ofbiz', must be changed on first login)
This patch has been tested against: Derby, MySQL, PostgreSQL. This has not been tested against other db platforms.
Prior to running the ANT task the user
* has to modify 'general.properties' in framework/common/config to reflect multi tenancy (multitenant=Y)
* has to have appropriate db driver(s) in place
* has to create the databases first in function of the entityengine.xml datasource-names (not for Derby, applicable for MySQL and PostgreSQL.)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1065144 13f79535-47bb-0310-9956-ffa450edef68
8 lines
518 B
XML
8 lines
518 B
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<entity-engine-xml>
|
|
<Tenant tenantId="@tenantId@" tenantName="@tenantName@"/>
|
|
<TenantDataSource tenantId="@tenantId@" entityGroupName="org.ofbiz"
|
|
jdbcUri="jdbc:mysql://@db-IP@/ofbiz_@tenantId@" jdbcUsername="@db-User@" jdbcPassword="@db-Password@"/>
|
|
<TenantDataSource tenantId="@tenantId@" entityGroupName="org.ofbiz.olap"
|
|
jdbcUri="jdbc:mysql://@db-IP@/ofbizolap_@tenantId@" jdbcUsername="@db-User@" jdbcPassword="@db-Password@"/>
|
|
</entity-engine-xml> |