Google Developer Console and Bitnami

I am looking for anyone who can set up multitenancy on our VM instance running an ERPNext Bitnami stack on Google console.

We have a small budget for this. Please help.

Rgds,
Phehello
Joburg, South Africa

Hi @Phehello,

I am currently running ERPNext on Google Compute Engine on Ubuntu. I am not using bitnami as the bench install makes its more or less pointless.

My suggestion would be to spin up a new VM on GCE and install ERPNext via the bench

Then, follow these instructions to add multi tenancy https://github.com/frappe/bench/wiki/Multitenant-Setup#dns-based-multitenancy

If you have any questions feel free to let me know!

If you haven’t used a terminal before for servers, id suggest using Debian or Ubuntu. Once logged in run updates:

sudo apt-get update (hit enter)
sudo apt-get upgrade (hit enter)
then after the updates are installed, follow the bench directions and go from there.

after the install type cd frappe_bench to get to that directory. Once there follow the linked directions on setting up multi tenancy

I haven’t used bitnami but I assume the process is similar if you are more comfortable using that instead of the bench.

Best of luck

2 Likes

Oh thanks Doc.

I have done all of that actually today … The whole multitenant setup thing. Now my issue is this: I tried both port and DNS methods to access the other tenants. I learnt that I have to set that up in my Google Console somewhere and I have not done that yet. What I have not figured out yet is: how do I access the tenants or extra installations if I am using ports - say port 81, port 82 for each different tenant. This part remains a mystery until now … Or do I also set this up in Google Console?

Thanks in advance …

Rgds,
Phehello

Ports are Unique and you can either associate it with your hostname (ex. http://your-company-name.com:81) or Public IP Addresss of Server itself (ex. http://192.168.1.1:81)
Each port represents separate instance of ERPNext/Frappe

Watch this video till first 3.44 minutes of this video: https://youtu.be/eCAMPcl7NKc
It is meant for Developers but help you understand architecture and features.

Watched the video. Thanks for that. Informative indeed. So my installation sits on Ubuntu 14.0 on Google infrastructure. Here is my ideal situation. One one Google server instance, I want to run 100 installations of ERPNEXT for my 100 clients. I can the ports or DNS route. DNS sounds better because my 100 clients can have client1.mysite.co.za , client2.mysite.co.za until client100.mysite.co.za etc … I can run all the commands to create these in command-line as I have already created 4 sites so far. I need to do the following:

  • tie my erpnext instance to my company’s 'domain using DNS so that all installs effected in frappe can fetch the domain not an IP address
    Creating more instances on frappe is not a problem, the problem is accessing the via my domain’s DNS settings. Can you please break down the DNS part of the multi tenants set up. This is where I am stuck.

I know I have to get DNS A and CName records from Google Console/Ubuntu server and then somehow I need to tie them together. This is where I need your knowledge please.

Thank you in advance and I appreciate your help

To set dns based multi tenant use following command on ubuntu server

bench set-nginx-port client1.mysite.co.za 80
bench set-nginx-port client2.mysite.co.za 80
. . .
bench setup nginx
sudo service nginx reload

Above commands will generate configuration for nginx for all sites on port 80.
for SSL refer https://frappe.github.io/frappe/user/guides/deployment/configuring-https.html

Above commands requires client1.mysite.co.za, client2.mysite.co.za are sitenames used and respective sites available under ~/frappe-bench/sites directory

The generated configuration file is ~/frappe-bench/config/nginx.conf

DNS records also have to be set such that all subdomains use configured Ubuntu server

Setting up DNS Records

Records are added on domain registrar’s console (e.g. godaddy’s DNS Manager) or with Google https://cloud.google.com/dns/docs

there are two ways

add ‘A Name’ record for each subdomain. e.g:

client1.mysite.co.za.	IN	A	111.111.111.111 (google compute / ubuntu server IP)
client2.mysite.co.za.	IN	A	111.111.111.111 

This way clients can be easily moved to another server. Drawback is if IP of server changes, 100 changes are to be made.

other way is to add client subdomains as ‘C Names’ e.g:

client1.mysite.co.za.	IN	CNAME	mysite.co.za.
client2.mysite.co.za.	IN	CNAME	mysite.co.za.
mysite.co.za.		IN	A	111.111.111.111 (google compute / ubuntu server IP)