[Tutorial] Step by Step Primer to setup ERPNext on Google Cloud Platform

Honestly, I was so overwhelmed just trying to figure out how to get anything but a local metal box running that I never took the extra time to figure out the Containers in GCP. I managed to get VM instances running, and making reusable images of your instance. That was enough to launch me into getting some real work done, so I didn’t try to get any further in GCP. I now keep a paid account there with at least 3 VM instances running at any given time. I have a ton of custom work in test at the moment. But the free trial was crucial to me being able to get over the difficult part of the initial learning curve. I would never have paid for all of that frustration back then. Looking back now though, it would have been a really cheap education.

It really would be nice to figure out GCP containers because it would be much simpler to make your instances portable. However, the path to just getting everything to work correctly on GCP as a VM instance was a long road with many setbacks. In fact after this thread was up for a while I found errors in my procedure that would cause the user to be unable to perform system updates in the future. By the time I figured that out, the thread was too old for me to have access to the first post to edit it for corrections. That is how long it took to finally get it right.

If you figure out the container process, please share it. If you do not feel like typing it all out, then PM me your rough notes. I will try to figure them out and edit a Step-by-Step procedure for you to publish. I don’t much care how the information gets out, as long as it gets out here in a usable form for the beginner to understand.

So if you figure it all out and can reproduce your results, I will be happy to help you edit it for beginner use. Then you can have your own step by step primer to manage for a while :grin:

BKM

Thanks for the $24/month metric for 15 users on Google Cloud. I found the same price level was needed at Digital Ocean.

That is running 1 CPU and 3.75gb of RAM and a 10gb drive image. I use more resources when running production machines for live customer work in order to have the best possible performance, but of course that is when I am billing them for those resources :grin:

BKM

Hi, @bkm

I’ve create ERPNext image on Docker which can be use in development and production, It can run using docker stacks on any vm on any host.

Please check this out

Best regards,
pipeCh

1 Like

I used this tutorial to create ErpNext on GCP. Succeeded at first try. Thank you very much.
Just a quick note: There is a checkbox when creating the server “Enable HTTP access”. If you check it than there is no need to do the steps about firewall.

1 Like

You are very correct. Unfortunately, this guide was developed very early in my server learning days and there are many improvements I would like to be able to make to it. However, after a few months, the ability for the author to make changes disappears and the original post can no longer be edited.

That is okay though, because nice folks like yourself are constantly adding to the thread and improving the experience as we go. :grin:

Thanks for taking interest enough to add to the conversation.

BKM

3 Likes

@bkm -

Hello from Austin, Texas!

Thanks for these steps. I’ve got it installed on my instance on GCP. You’re steps were :exclamation: on point :exclamation: .

Now, if I can just figure out how to create my first tenant, to the discussion boards I go!

2 Likes

@pratik_shah Sorry for the lengthy delay in response. I have been traveling a lot lately for my current ERPNext clients and the holidays were no exception.

Were you able to get past the setting up of multiple tenants in ERPNext?

If not, then let me know. I do know that I have a thread on here somewhere that details the best path forward for that task.

BKM

1 Like

When I try to run bench start under development, I stuck somewhere below. It holding long time and nothing happen after “Rebuilding erpnext-web.css” any idea?

3000
17:12:53 socketio.1 | listening on *: 9000
17:12:59 web.1 | * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
17:12:59 web.1 | * Restarting with inotify reloader
17:12:59 watch.1 | yarn run v1.13.0
17:13:00 watch.1 | $ node rollup/watch.js
17:13:00 web.1 | * Debugger is active!
17:13:00 web.1 | * Debugger PIN: 308-746-816
17:13:06 watch.1 |
17:13:06 watch.1 | Rollup Watcher Started
17:13:06 watch.1 |
17:13:06 watch.1 | Watching…
17:13:07 watch.1 | Rebuilding frappe-web.css
17:13:17 watch.1 | Rebuilding desk.min.css
17:13:17 watch.1 | Rebuilding frappe-rtl.css
17:13:21 watch.1 | Rebuilding module.min.css
17:13:21 watch.1 | (node:1474) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 change listeners added. Use emitter.setMaxListeners() to increase limit
17:13:21 watch.1 | Rebuilding form.min.css
17:13:22 watch.1 | Rebuilding list.min.css
17:13:23 watch.1 | Rebuilding report.min.css
17:13:26 watch.1 | Rebuilding web_form.css
17:13:26 watch.1 | Rebuilding email.css
17:13:27 watch.1 | Rebuilding erpnext.css
17:13:27 watch.1 | Rebuilding marketplace.css
17:13:27 watch.1 | Rebuilding erpnext-web.css

Unfortunately… no.

As I stated in the first post with all the instructions, I am not a developer. I am an implementer and I only ever work with --production servers.

The only time I tried to start up a developer server, I had similar problems. That was over a year ago and I haven’t tried developer mode ever again.

You should probably start a fresh thread for this issue and see if anyone else in the developer world can help. This thread was setup for the novice trying to get their first simple production server off the ground.

BKM

Wow… what a shock. I just noticed the number of views on this thread as of today.

5.7k views

I am stunned. Happy that people found it interesting enough to read through it, but stunned none-the-less.

This was the first “Tutorial” I even attempted and that was purely out of frustration with not being able to figure out how to speed up my learning curve with installations.

I am humbled… and encouraged to add more tutorials as I get time.

BKM

6 Likes

Hello @bkm great job on the tutorial. It helped me get my first instance up about 18 months ago and i haven’t looked back since. However, I have not been able to figure out how to set up develop branch on GCP. Although the installations always run successfully, i have been unable to get bench to start. I run the command and it always gets stuck on rebuilding erpnext-web.css.

I don’t know if you’ve successfully set up a develop instance on GCP before and if you can give me some pointers on how i can get it to work. I would appreciate any help i can get at this point.

I did try to setup --develop shortly after I wrote the tutorial. On GCP it never worked. I had similar problems. starting bench would never work at all.

I ran into several things that you could NOT do on GCP and have since only used it as a place to test new features in production builds. It is still a great proving ground for beginners to learn how to install and test ERPNExt, but it has many limitations mainly due to the locked ports they force.

BKM

PLAY RECAP *********************************************************************
localhost : ok=8 changed=4 unreachable=0 failed=1 s kipped=23 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 413, in
install_bench(args)
File “install.py”, line 135, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 327, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘sit e.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frapp e’]’ returned non-zero exit status 2

this is for debian 9 on google cloud.

For al those looking to this as a working tutorial, I am afraid that it is not as functional today as it was when I originally put in the effort and weeks of work to create it.

First of all, it appears nearly impossible to create a v10 install from the easy install method.

Secondly, I no longer work in Google Cloud Platform. It was only good as a development and testing environment. Over the past year I have found alternate server resources that do not impose the same restrictions as the GCP services. To this end I really no longer try to work out the “work-around” steps necessary to get successful installs.

And finally, Aside from adding messages like this, I no longer have access to the original postings and cannot update them even if I had the information to do so. The forum prevents regular users from modifying their posts after a certain time frame. Not sure the exact timing, but it appears to be about 60 days(?). This further pushed me to make other arrangements for important tutorials as noted in my last “Poor Man’s Backup” solution thread.

Thank you to everyone that offered all of the encouraging words for my continued work towrad providing layman’s tutorials for some of the most difficult problems for new users to navigate.

BKM

Thank you @bkm. Can you share the usual VPS that you use. We use Digital Ocean and Vultr but its good to keep knowledge of other tried and tested VPS for ERPNext.


I want to ask

when i make multi tenants based on port

Site only has a Service domain

Site B only has a Distribution domain

But why there is no difference in site A and site B

Why is there no difference in Site A and Site B

@Muzzy

I am not sure my choices will help you much if you are not USA based. The services I use are good for development and testing domestically (for me). I do not know how well they would work in other parts of the world since they are primarily focused on domestic performance. However, one of them does offer Los Angels based servers that are optimized for China service. That one is HostFlyte. My ther favorite local testing server farm is SnowVPS.

Both frequently offer specials of 4gb KVM servers with 2 or 4 CPUs for around $60 per year (or less). The servers remain fairly stable and are perfect for building test servers as often as you like. You do not get the image creation ability that GCP offers, but you are not restricted from running mail servers or other prohibited types like the GCP restrictions. Plus the cost is much cheaper than the $25-$35 per month a GCP server will cost.

Outside the USA your experience will likely be different.

There is a site called LowEndBox.com that posts the special deals from many VPS vendors. I have tried several and so far I only like the 2 mentioned above.

For my production servers, I use Interserver.net. They have been the most reliable for me domestically.

However as always… You mileage may vary :sunglasses:

BKM

1 Like

Thanks BKM for taking the pain to explain in such detail ! It was a great help !
Debian 8 was unavailable so tried with Debian 10 but that failed to proceed ahead, so used Debian 9. Moreover used the below command instead of “sudo python install.py --production”
as it was giving error.
sudo python3 install.py --production

Now I am searching for some data to import. Can anyone help me with this ?

I found this also. In fact there is one for https also !