Sporking Bench: New tools for installing ERPNext

Hi @brian_pond

I would love to be a tester, been trying to install erpnext for the last 2 weeks many times and still no luck, so would be all too happy to support something that will eventually work well.

Please count me in…

Kind regards

1 Like

That’s the first thing they tell me when I tell that I used ERPNext at my office.

1 Like

I don’t think that there is a big effort required.
Just go step by step the whole process, migrate to Python3, eliminate old repos and introduce new versions of products.
Get rid of the locale check which should have no relation whatsoever.
Get rid of the memory check and watch out for the redis server installation.

I guess that is mostly this. I hacked the code in every step and managed to install under different circumstances.

I’ll definitely participate.

I have some experience building Windows binary distributions, but, alas, not Linux ones. Also, me and Linux have a difficult relationship =)

Unfortunately, nothing more than fiddling with Bench’s YAML playbook and Frappe’s Webpack JSON. But I’m willing to learn.

Why not consider developing /supporting a SNAP package for ERPNext? Would solve installation issues, allow background updates, keep the unified vision, and perhaps free up resources from the current VM, script, docker installs. There have been some posts requesting this…

1 Like

All the best @brian_pond for starting this. Would love to see some code when its ready :slight_smile: . I hope it does not become another bench.

An analysis of these issues might help to identify this. The easy install script broke last week as the Ansible version was not pinned. Maybe a general pinning of all versions would be a good start to fix that problem. But then we have to add the overhead of regularly updating all dependencies!

Either ways, installation is a hard problem. Maybe a docker-first approach might help!

Good luck. And happy to help. I have just started looking into the bench code base to add:

  • command line flag for CORS configurations (via site_config.json)
  • support for faster, partial updates (essentially, bench update app_name)

I will volunteer for specifics once the Wiki is up. I can help with Python/Bash scripts, Python code and testing.

I do have the same comment as above on Docker - last I checked the image was broken. However, I have seen a few commits since then. If that is fixed, then I would recommend something like CapRover + Docker as an ideal combination to get a UI for managing + reverse proxy (with Lets Encrypt).

Why are the following lines ever needed during easy install?

  • name: Check current locale
    shell: localectl
    register: locale_test
    when: ansible_distribution == ‘Centos’ or ansible_distribution == ‘Ubuntu’

  • name: Set Locale
    command: “localectl set-locale LANG={{ locale_lang }}”
    when: (ansible_distribution == ‘Centos’ or ansible_distribution == ‘Ubuntu’) and locale_test.stdout.find(‘LANG=locale_lang’) == -1

  • name: Set keymap
    command: “localectl set-keymap {{ locale_keymap }}”
    when: “(ansible_distribution == ‘Centos’ or ansible_distribution == ‘Ubuntu’) and locale_test.stdout.find(‘Keymap:locale_keymap’) == -1”

  • name: Set Locale as en_US
    lineinfile: dest=/etc/environment backup=yes line=“{{ item }}”

    • “LC_ALL=en_US.UTF-8”
    • “LC_CTYPE=en_US.UTF-8”
    • “LANG=en_US.UTF-8”

Not sure, Tufan. I have not examined Easy Install since 2017. If they are truly needed (perhaps not), the answer is probably somewhere in Ansible scripts? I have briefly examined the Ansible scripts. But not in detail. I prefer to use my own instructions for installing prerequisites and dependencies.

Hi @szufisher : There will be an editable Wiki, plus the project on GitLab. Telegram is convenient for instant chat. But not mandatory, and nothing official will be written there. Most of the collaboration and contribution work will happen outside of Telegram.

I chose Telegram only because it’s already-used for ERPNext Dev channel, ERPNext Help, and other channels.

Wow! this may well be the best thing for erpnext installation! I pray this goes well. @brian_pond this is awesome. I’m a witness after the fact that installation and upgrades are tricky. this is a dream, we pray it becomes a reality. More oil to your gears @brian_pond

1 Like

pip-tools can really help here with pinning all versions, then you can even do things like pip-sync, pip-compile, and all dependancies auto upgraded to test etc.

1 Like

Great move @brian_pond
I’ve been trying to install erpnext on Centos 8. No Luck :frowning:. Spoiled 2 days :angry:

@brian_pond I’d like to play devil’s advocate here and suggest that instead of creating a new installer, erpnext would be better served if we packaged it for Debian and Fedora. IOW, make it as simple as apt install erpnext.

The process of packaging it would shake out all the hardcoded dependency issues, IMO[1]. The packaging reviewers are really good and will help with it. Getting it into Debian means all downstream distros would get it (including Ubuntu) and getting it into Fedora would mean it would enter CentOS and RHEL.

Longer term, this would help ERPNext developers to think consciously about breaking ABI and staging features so that they can keep rolling out updates to distros (think security and bugfixes) while bigger ABI-breaking features will be prepped for the next LTS. The latest development nightly could also be made available through Ubuntu PPAs for testers.

The configuration of a site, OTOH, could then be handled separately - either through ansible, juju charms or the like.

Just my 0.02. But this problem definitely needs addressing.

[1] An example is the dependency on mysql 10.2. I don’t think erpnext uses any cutting-edge features of mysql that should require that particular version. I’ve seen folks go through great lengths to install that version from dubious repositories by turning off basic package signing checks. Who knows what happens on an upgrade.


@rmehta, you might want to check what @revant_one is building on Kubernetes: Decoupled Frappe/ERPNext docker images. @revant_one thought up and built the current version, while discussing the problems with @brian_pond on separate Telegram group …

I like this idea.

1 Like

thanks Brian, there’s no arguing with your response - good luck and thanks in advance!.. the thing that amuses me, on brief interludes from the angry screams of a couple of years on and off of trying to install this great looking product, i sthat someone out there obviously has installed it… i would love to see a console log from this wizard at work!!

Many of us have successfully installed, manually. The Hitchhiker’s Guide describes how this can be accomplished. I maintain my own, personal set of instructions. I’m sure many other people do the same.

I started installing before the Hitchhiker’s Guide was written. It took me weeks before I could repeat my installation without errors. Yet it was months before I mastered it, and truly understood what exactly was happening. Certainly some people probably learned faster than I did. Either because they already had a background in Python web frameworks, or they received help from a friend. Others probably learned slower than I did.

Because when errors happen (and they do). Troubleshooting can be very hard. To successfully troubleshoot, you must understand exactly what’s happening. Is this a SQL error? A Redis error? Is it an error with a PyPi package, or a Node package? How do I change the version of a PyPi or Node package? What’s the SQL username and password that ERPNext is using? Etc.

We should not ask every ERPNext user, company, or enthusiast to build this deep set of knowledge and skills. Why should they be troubleshooting the Installer? It’s a waste of their time. Installation and configure should just work.

People could be spending time where it matters:

  • Learning the Framework.
  • Learning the Modules.
  • Learning how to edit Print Formats, Reports.
  • Learn to build new Apps and DocType, integrate with other software.

Instead of figuring out how to install an enterprise software platform.


Is there a benefit to having separate individual containers for the different dependencies? Especially for end users such as us (as compared to ERPNext hosting providers)? Docker also requires entire infrastructure to be installed which consumes system resources. I was recommending a SNAP package or apt install as it allows you to install to a standalone, VM, linux container, etc…while preserving the current structure.

i would kill for the chance to consider an upgrade!