I have installed v12 latest on Virtualbox (Windows) and able to play around some modules.
Now I want to play around v13 beta for my client, to test some functions that are lacking in v12. I’m trying not to do heavy customization, so hopefully v13 can answer my client’s needs (Distribution and Retail company). In the end, I want to ensure whether I should propose to my client v12 (with more customization) or v13 (even in beta). Because when seeing the features/fixes, the gaps are quite huge between them.
Could anyone point me out on the steps to setup multi tenant? I found only one or two old articles (and an old video) but still not sure about the steps. One system (Virtualbox on Windows) with two separate erpnext installation, each wtih own database schema, v12/v13 desk on different ports.
I’ve managed to create new site, set respective ports on each and install the erpnext app on the second site.
frappe@ubuntu:~/frappe-bench/config$ bench use site1.local
frappe@ubuntu:~/frappe-bench/config$ bench version
bench_manager 0.0.1
erpnext 12.10.1
frappe 12.8.4
frappe@ubuntu:~/frappe-bench/config$ bench use site2.local
frappe@ubuntu:~/frappe-bench/config$ bench version
bench_manager 0.0.1
erpnext 12.10.1
frappe 12.8.4
I’m also able to open both website on different ports, where site1’s is the previous site that I had played around, and site2 is the brand new site.
Port configuration list:
Site bench-manager.local assigned port: 80
Site site1.local assigned port: 8012
Site site2.local assigned port: 8013
I suppose all I need to do is to switch to site2.local and do bench upgrade to v13. Since I’m new to erpnext, where is exactly the site2.local’s app location? Because when I check apps directory, I see only one installation of erpnext.
frappe@ubuntu:~/frappe-bench/apps$ ls -l
total 12
drwxrwxr-x 7 frappe frappe 4096 Aug 19 10:26 bench_manager
drwxr-xr-x 9 frappe frappe 4096 Jul 29 15:37 erpnext
drwxr-xr-x 12 frappe frappe 4096 Jul 29 15:38 frappe
I just want to ensure when I do bench upgrade on the site2, it doesn’t replace site1’s.
Or does this mean Multi Tenancy is only on the DATA level not on the APP level? In other words, I can’t have multi version of the same app under one system?
thanks for the response. the article is not very clear on the steps though. especially if there are shared/multiple configuration, and if one on production mode (v12) and the other on development mode (v13 beta) for example. i’ve searched other discussion but it refers back to the same article.
Have you installed both the sites in the same bench directory? You cannot run two different Frappe/ERPNext versions inside the same bench. What you want is a multi-bench setup and not multi-tenant in that case.
Frappe/ERPNext will use the same instance of the application (Frappe and ERPNext) to create multiple sites which will have their own database(where all the site data is stored).
Check more in the docs for the architecture and directory structure.
thanks for the info. yes. i should go with multi-bench in this case. just one question, since i’m rather new to this, does multi-bench installation share the same database instance/engine as well like in multi-tenant? could you point out how/where to set the new bench’s database config to use the existing database instance?
Not the best person to answer this, but on my local test setup with a v12 and develop setup. All the sites are using the same mariadb engine. No extra setup:
I’m aware of one MariaDB engine/instance for multi sites in one bench (as what you show me in /frappe-bench). I’ve tested myself creating two sites in one bench, I see two schemas as like I originally posted.
What I asked further is when we have multi bench, does it share the same MariaDB engine/instance as well? For example: /frappe-bench (for v12) and /frappe-bench-13 (for v13).
Yes. That’s precisely what I wanted to show. I have two benches, one with develop and other with v12 branch. They’re using the same Db instance:
Ah Ok. Great! I will try to setup the new bench then. Thanks!