Hello everyone,I have been looking into the multitenancy support in ofbiz. It seems the architecture is based on having a separate database for each tenant rather than using one single db with differentiating tenant data based on 'tenantId'.
There are some configuration steps as set in the following url to enable multitenancy : https://cwiki.apache.org/confluence/display/OFBIZ/Multitenancy+support#Multitenancysupport-Settingtheecommerceapp.touseanspecificTenantDatabase And it seems it is all manual to add a new tenant. My question here is, is there any way to add multiple tenant in an automated way? So that whenever a new tenant signup for a new account we can do it dynamically from the website? Please suggest. Thanks. Regards, Hammad Ali Khan Afridi Skype hammad.afridi |
Hi Hammad,
First of all, whether to have separate databases per tenant or having tenant separation within one database is an architectural choice. Both have their pros and cons. Currently, the default setup regarding the tenant database(s) is very straight forward: 2 are necessary, and if using the default derby setup these will be created. When using external rdbms solutions, like mysql, postgresql, oracle or mssql, more effort is required. A one time configuration setup, and then creating the 2 databases in the rdbms). But with a little effort applied it can even be made to use 1 database per tenant. Re: the document (linked) It can be done a lot easier. Just use the ./ant create-tenant command to establish the tenants databases and populate these. Best regards, Pierre Smits *OFBiz Extensions Marketplace* http://oem.ofbizci.net/oci-2/ On Tue, Nov 10, 2015 at 11:01 PM, Hammad Afridi < [hidden email]> wrote: > Hello everyone,I have been looking into the multitenancy support in ofbiz. > It seems the architecture is based on having a separate database for each > tenant rather than using one single db with differentiating tenant data > based on 'tenantId'. > There are some configuration steps as set in the following url to enable > multitenancy : > > https://cwiki.apache.org/confluence/display/OFBIZ/Multitenancy+support#Multitenancysupport-Settingtheecommerceapp.touseanspecificTenantDatabase > > And it seems it is all manual to add a new tenant. My question here is, is > there any way to add multiple tenant in an automated way? So that whenever > a new tenant signup for a new account we can do it dynamically from the > website? Please suggest. Thanks. > Regards, > Hammad Ali Khan Afridi Skype hammad.afridi > > |
In reply to this post by Hammad Afridi-2
Hi Hamad,
You might have a look at our git repository at https://gerrit.antwebsystems.com/#/admin/projects/ where we have a 'tenant' component which we use in the GrowERP demo and production environment and which allows the creation of new ofbiz/growerp tenants from a registration at a website. Although it is working, we will switch to a swarm/docker multitenant configuration where we have an ofbiz/growerp docker instance per tenant. This setup is more flexible and make customizations of tenants much more easy. Regards, Hans Bakker CEO AntWebsystems.com On 11/11/15 05:01, Hammad Afridi wrote: > Hello everyone,I have been looking into the multitenancy support in ofbiz. It seems the architecture is based on having a separate database for each tenant rather than using one single db with differentiating tenant data based on 'tenantId'. > There are some configuration steps as set in the following url to enable multitenancy : > https://cwiki.apache.org/confluence/display/OFBIZ/Multitenancy+support#Multitenancysupport-Settingtheecommerceapp.touseanspecificTenantDatabase > > And it seems it is all manual to add a new tenant. My question here is, is there any way to add multiple tenant in an automated way? So that whenever a new tenant signup for a new account we can do it dynamically from the website? Please suggest. Thanks. > Regards, > Hammad Ali Khan Afridi Skype hammad.afridi > > -- Regards, Hans Bakker CEO, http://antwebsystems.com |
In reply to this post by Pierre Smits
Hello Pierre,Thanks for replying back. At the moment I am using derby db which means the DEMO1 and DEMO2 tenant is already installed. But what username and password must be used to access the mgmt apps for each tenant?
While the ant command for creating tenant seems useful my question was with regards to automation where a new user wants to create a new account and that will eventually create a new tenant on the backend. Please adivse on this as well if you can.Thanks. Regards, Hammad Ali Khan Afridi Email [hidden email] Skype hammad.afridi On Tuesday, 10 November 2015, 23:44, Pierre Smits <[hidden email]> wrote: Hi Hammad, First of all, whether to have separate databases per tenant or having tenant separation within one database is an architectural choice. Both have their pros and cons. Currently, the default setup regarding the tenant database(s) is very straight forward: 2 are necessary, and if using the default derby setup these will be created. When using external rdbms solutions, like mysql, postgresql, oracle or mssql, more effort is required. A one time configuration setup, and then creating the 2 databases in the rdbms). But with a little effort applied it can even be made to use 1 database per tenant. Re: the document (linked) It can be done a lot easier. Just use the ./ant create-tenant command to establish the tenants databases and populate these. Best regards, Pierre Smits *OFBiz Extensions Marketplace* http://oem.ofbizci.net/oci-2/ On Tue, Nov 10, 2015 at 11:01 PM, Hammad Afridi < [hidden email]> wrote: > Hello everyone,I have been looking into the multitenancy support in ofbiz. > It seems the architecture is based on having a separate database for each > tenant rather than using one single db with differentiating tenant data > based on 'tenantId'. > There are some configuration steps as set in the following url to enable > multitenancy : > > https://cwiki.apache.org/confluence/display/OFBIZ/Multitenancy+support#Multitenancysupport-Settingtheecommerceapp.touseanspecificTenantDatabase > > And it seems it is all manual to add a new tenant. My question here is, is > there any way to add multiple tenant in an automated way? So that whenever > a new tenant signup for a new account we can do it dynamically from the > website? Please suggest. Thanks. > Regards, > Hammad Ali Khan Afridi Skype hammad.afridi > > |
Hammad,
My advise is not to use the OOTB tenants as found in the demo data sets, but rather go with creating your own. Then you also get a feel for the process. You could, of course, also (re)create the admin of the tenant by using the appropriate ./ant command. For available commands use ./ant -p Best regards, Pierre Smits *OFBiz Extensions Marketplace* http://oem.ofbizci.net/oci-2/ On Wed, Nov 11, 2015 at 3:02 AM, Hammad Afridi < [hidden email]> wrote: > Hello Pierre,Thanks for replying back. At the moment I am using derby db > which means the DEMO1 and DEMO2 tenant is already installed. But what > username and password must be used to access the mgmt apps for each tenant? > While the ant command for creating tenant seems useful my question was > with regards to automation where a new user wants to create a new account > and that will eventually create a new tenant on the backend. Please adivse > on this as well if you can.Thanks. Regards, > Hammad Ali Khan Afridi > Email [hidden email] > Skype hammad.afridi > > > > On Tuesday, 10 November 2015, 23:44, Pierre Smits < > [hidden email]> wrote: > > > Hi Hammad, > > First of all, whether to have separate databases per tenant or having > tenant separation within one database is an architectural choice. Both have > their pros and cons. > > Currently, the default setup regarding the tenant database(s) is very > straight forward: 2 are necessary, and if using the default derby setup > these will be created. When using external rdbms solutions, like mysql, > postgresql, oracle or mssql, more effort is required. A one time > configuration setup, and then creating the 2 databases in the rdbms). But > with a little effort applied it can even be made to use 1 database per > tenant. > > Re: the document (linked) > It can be done a lot easier. > Just use the ./ant create-tenant command to establish the tenants databases > and populate these. > > Best regards, > > Pierre Smits > > *OFBiz Extensions Marketplace* > http://oem.ofbizci.net/oci-2/ > > On Tue, Nov 10, 2015 at 11:01 PM, Hammad Afridi < > [hidden email]> wrote: > > > Hello everyone,I have been looking into the multitenancy support in > ofbiz. > > It seems the architecture is based on having a separate database for each > > tenant rather than using one single db with differentiating tenant data > > based on 'tenantId'. > > There are some configuration steps as set in the following url to enable > > multitenancy : > > > > > https://cwiki.apache.org/confluence/display/OFBIZ/Multitenancy+support#Multitenancysupport-Settingtheecommerceapp.touseanspecificTenantDatabase > > > > And it seems it is all manual to add a new tenant. My question here is, > is > > there any way to add multiple tenant in an automated way? So that > whenever > > a new tenant signup for a new account we can do it dynamically from the > > website? Please suggest. Thanks. > > Regards, > > Hammad Ali Khan Afridi Skype hammad.afridi > > > > > > > > |
Free forum by Nabble | Edit this page |