tracker icon indicating copy to clipboard operation
tracker copied to clipboard

ERPNext - new appliance feature request

Open JedMeister opened this issue 7 years ago • 14 comments

We've had a request for ERPNext. Not sure if we'll be able to add this to v15.0 or not, but I've added it to the milestone for now...

Website: https://erpnext.com/ Source: https://github.com/frappe/erpnext Recommended Install: https://github.com/frappe/bench

JedMeister avatar Jan 22 '18 13:01 JedMeister

Deferring this to v15.1

JedMeister avatar Mar 02 '18 06:03 JedMeister

Any update for ERP next OVA file?

sanath1978 avatar Jun 13 '18 03:06 sanath1978

Hi @sanath1978 - nothing concrete yet, other than it won't happen in the next month or 2. We're already way behind for our next release and seeing as no one has stepped up to help us create the appliance, it won't happen until we have time to look at it.

Thanks very much for showing your interest though. Hopefully we'll add it for our v15.1 release.

JedMeister avatar Jun 13 '18 04:06 JedMeister

If you make ERP next with multi tenancy, I would definitely host via your AWS launch pad. Is that help to you?

On Wed, Jun 13, 2018 at 10:21 AM Jeremy Davis [email protected] wrote:

Hi @sanath1978 https://github.com/sanath1978 - nothing concrete yet, other than it won't happen in the next month or 2. We're already way behind for our next release and seeing as no one has stepped up to help us create the appliance, it won't happen until we have time to look at it.

Thanks very much for showing your interest though. Hopefully we'll add it for our v15.1 release.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/turnkeylinux/tracker/issues/998#issuecomment-396812688, or mute the thread https://github.com/notifications/unsubscribe-auth/AZRqapCvUOklTZB4vuPNgjLJD7a84N8Eks5t8Jo4gaJpZM4RmqJb .

sanath1978 avatar Sep 21 '18 03:09 sanath1978

Hi @sanath1978 - thanks for the encouragement, but we just don't have the spare cycles ATM.

If you want to have a go creating the TurnKey NextERP buildcode, that would certainly push it forward. I'm happy to coach you as much as I can if you want. Otherwise, we'll get to it as soon as we can, but TBH, I'm not really sure when that will be.

JedMeister avatar Sep 24 '18 04:09 JedMeister

I am ready top start with your guide. Please tell me where to start?

On Mon, Sep 24, 2018 at 10:12 AM Jeremy Davis [email protected] wrote:

Hi @sanath1978 https://github.com/sanath1978 - thanks for the encouragement, but we just don't have the spare cycles ATM.

If you want to have a go creating the TurnKey NextERP buildcode, that would certainly push it forward. I'm happy to coach you as much as I can if you want. Otherwise, we'll get to it as soon as we can, but TBH, I'm not really sure when that will be.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/turnkeylinux/tracker/issues/998#issuecomment-423875928, or mute the thread https://github.com/notifications/unsubscribe-auth/AZRqapYh-COnhKUTQQH6Dj5w0zORPrxoks5ueGLSgaJpZM4RmqJb .

sanath1978 avatar Sep 27 '18 12:09 sanath1978

Hey @sanath1978 apologies on my slow response...

First up, you'll want to launch a copy of TKLDev. I suggest that you run it in a local VM (that's what I do...). The docs are quite useful, although things have changed a little with the v15.0 release and they need to be updated. The major difference for v15.0 is that the sandbox doesn't work as it did previously. There is also a meta-doc page which may be of interest...

To get a bit of a feel for it, I suggest that you start off with the "how to build isos with TKLDev" tutorial.

From there, you can either start with an appliance that is somewhat close (is ERPNext a fork of something we already have in the library? If so, that might be a good place to start?). Regardless, you can find all the build code for the current library (and some deprecated ones) here.

Whilst on face value, the build code may seem a little dense, to anyone who knows much about Linux in general (and Debian in particular), actually the build code is pretty straight forward. Essentially all our appliances are based on Core and using the current (v15.0 at the time of writing) WordPress appliance code as an example; on top of that (as a OS chroot), any packages noted in the plan are pre-installed.

Then files included in the common overlays (found here - as defined in the Makefile beside COMMON_OVERLAYS = ... - WordPress doesn't have any) are overlayed over the chroot filesystem; relative to / of the installed OS. Then the same with the app specific overlay files. To explicitly demonstrate: overlay/etc/some.conf would end up as /etc/some.conf.

Then finally the configuration scripts. First the common ones (again as noted the Makefile - this time WordPress has one). Then the appliance specific ones in conf.d (WP has 2; conf.d/downloads & conf.d/main) are run within the OS chroot.

To summarise, the build process goes like this:

  • bootstrap - basic bootstrap is mounted as chroot
  • root.patched - all packages from the local plan, plus common plans are installed
  • root.build - common overlays applied
  • root.build - local overlays applied
  • root.build - common confs scripts are run
  • root.build - local confs scripts are run

The last step is to bundle it all up as an ISO. As a bit of an aside, the other builds are then generated from the ISO via buildtasks (to maintain consistency as much as possible).

There are lots more details, but it's probably best if you read through some of the docs and have a play with TKLDev. Please do not hesitate to ask if you have further questions. Feel free to post on the forums (I check them most days) or ping me (via an @jedmeiser mention) anywhere here on GH to get my attention.

Good luck! :+1:

JedMeister avatar Oct 03 '18 07:10 JedMeister

I am sorry for late reply.

No problem!

I will look at what you said here and get back to you if I have any problem.

Awesome! :smile:

by the way ,I am not a linux expert.

No problem, although I suggest that you get yourself at least somewhat familiarised with git (GitHub have some good "gettting started" type docs), as well as bash. Hopefully my post above will help. Also you'll almost certainly find lots of resources online. So long as you keep in mind that TurnKey is based on Debian (Ubuntu is also based on Debian) you should be able to find plenty of info to help you out. And as I say, if you get stuck or are unsure, please feel free to ask.

is that possible to have https://www.turnkeylinux.org/core and make installation of ERP next?

Yes, that is possible, although it may not be the best place to start. I had a quick google and it seems that ERPNext uses MySQL/MariaDB as a backend database, so our "MySQL" appliance (which actually provides MariaDB as of v15.x) might be an even better option? On the appliance page, you can find the buildcode by following the link that says "Source code".

I note that ERPNext also includes Nginx, so another option might be the Nginx appliance? (Which includes MariaDB as well as Nginx). Note though, that that includes PHP-FastCGI too, which I'm pretty sure ERPNext doesn't need (so would need to be stripped out).

Good luck! :smile:

JedMeister avatar May 31 '19 05:05 JedMeister

Getting ERPNext setup in a VPS/VM can be a pain. There's an easy installer script, but getting the dependencies and permissions sorted is tough before running that. The forums over @ ERPNext are riddled with users struggling to get it working on various distributions.

Might make an awesome Turnkeylinux container if it ever happened. :)

stacygaudreau avatar Aug 22 '19 21:08 stacygaudreau

@hibouambigu - Thanks for your input. I agree it would make a great appliance. I'd love to see it happen, although at this point we have some higher priority items.

I note that @sanath2020 did have a look, but I assume from lack of recent updates that they got otherwise occupied and/or struggled to get it working and/or installed for their personal use (rather than developing the build code to allow us to provide an appliance).

We may get to it ourselves at some point, although we're a relatively small team, with lots to do! My offer of support and coaching to anyone who would like to have a go at developing the required build code (so that we can release an appliance) still stands. So if you'd like to have a go, please read previous comments and let me know if you have any further questions or need a hand with anything...

JedMeister avatar Aug 26 '19 00:08 JedMeister

Hey @JedMeister

Totally understood on the time priorities and allocation of resources in a small team. Running a limited operation here myself as well, juggling all those hats and all that fun stuff. Thanks for taking the time to reply!

I would be keen to take you up on the offer of some support and coaching with it. I've been successful deploying ERPNext in Ubuntu 18.04, so far, but willing to take a crack at Debian 9 as well in the interest of a TKL container build.

Admittedly it might take me a little bit to play with TKLDev and figure out the right questions to ask you. I've been using some of your appliances in Proxmox VE's LXC implementation with success (thanks!) but probably could use a better-than-topographic understanding of containers to get to grips with TKLDev.

In regards to ERPNext, as you discovered awhile back it does seem to have a good number of common dependencies which are satisfied in part by a handful of existing TKL offerings: MariaDB, Nginx, Redis, Node.js, etc.

The application has a deployment script which takes a handful of arguments to configure a batteries included installation (Nginx, MariaDB and other dependencies). Perhaps TurnKey Core would be a good start then.

The deployment script works good, when it works. Unless that seems like a potentially error prone way to prep an appliance, I reckon I'll give that a looksee once exploring the TKLDev stuff.

Thanks again!

stacygaudreau avatar Aug 27 '19 15:08 stacygaudreau

Hey @hibouambigu

Thanks for taking the time to reply!

You're most welcome! :smile: I always love to see new appliances added to our library (despite the added workload in then maintaining them... :wink: ) So it would be remiss of me to not at least respond!

Please excuse this lengthy response, but I wanted to address your post as directly and explicitly as possible...

I would be keen to take you up on the offer of some support and coaching with it. I've been successful deploying ERPNext in Ubuntu 18.04, so far, but willing to take a crack at Debian 9 as well in the interest of a TKL container build.

Awesome! I imagine that there shouldn't be too much difference between installing on Ubuntu vs installing on Debian.

FWIW the main "higher priority" item on my agenda at the moment is getting (at least an RC) of TurnKey 16.0 Core out the door (based on Debian 10/Buster). I'm getting pretty close (although in fairness, I've been saying that for weeks now...).

But in the meantime, developing an appliance on our current base is fine. Porting it to Debian 10/Buster shouldn't be too bad. It may require some dependency "massaging", but otherwise should be fairly straight forward.

Admittedly it might take me a little bit to play with TKLDev and figure out the right questions to ask you.

Yes, totally understandable.

As we use TKLDev all the time (and we developed it) I'm sure that there is some "curse of knowledge" that goes on within the docs. Having someone such as yourself looking over it, may assist us to improve the docs to make things more clear?!

So please do not hesitate to ask any questions you have. Especially if there is anything in the docs that doesn't make sense, or could be improved for clarity.

OTTOMH, the only thing that the docs cover that wont work as expected, is the "sandbox" (as noted in the first paragraph of my previous comment).

I've been using some of your appliances in Proxmox VE's LXC implementation with success (thanks!) but probably could use a better-than-topographic understanding of containers to get to grips with TKLDev.

Great to hear that our containers have been of value to you.

I forget whether TKLDev is available as a container, but if it is, it shouldn't be (there are some issues with using nested overlay filesystems - as employed by both LXC and TKLDev). So the first step will be to install it as a "proper" VM (the iso installs fine to KVM under Proxmox, or there is an OVA that will work under alternate VM environment if you prefer).

In regards to ERPNext, as you discovered awhile back it does seem to have a good number of common dependencies which are satisfied in part by a handful of existing TKL offerings: MariaDB, Nginx, Redis, Node.js, etc.

The application has a deployment script which takes a handful of arguments to configure a batteries included installation (Nginx, MariaDB and other dependencies). Perhaps TurnKey Core would be a good start then.

In all of our appliances, MariaDB, Nginx and Redis are all installed from the (Debian) repos, so starting with Core and adding those (and any other packages provided by the Debian repos) to the plan (plan/main) should do the trick to get them installed.

NodeJS is installed via a common makefile, namely nodejs.mk. You too can leverage the existing code by adding this line to you appliance Makefile:

include $(FAB_PATH)/common/mk/turnkey/nodejs.mk

Put that line just above the include $(FAB_PATH)/common/mk/turnkey.mk line in your ERPNext appliance Makefile (link to the relevant line in Core's Makefile).

Any large config changes (or other complete files/scripts you wish to include) can be added to the overlay directory (relative to /, e.g. to add /etc/some.config to your appliance, add the file to the build code as overlay/etc/some.config). Installation (including further config adjustments) can be done via a conf script (executable files in conf.d/ are run in alphanumeric order, after the overlays are applied). Currently the convention is to do all your work in conf.d/main, although many also have a conf.d/downloads script and a couple of the more complex installs break the script into separate, multiple conf.d/ scripts (prefixed with a 2 digit number to ensure they run in the desired order). Having said that, I imagine that a single conf script would be suitable in this case.

Beyond the installation, probably the trickiest component of new appliance development are the inithooks (aka firstboot scripts). They ensure that each appliance is unique (lots of software these days has some sort of "secret" that should be unique to each install). They also allow users to do stuff such as set admin user passwords and emails on firstboot.

Hopefully my previous comment (plus the docs as noted/linked to there) will assist, but as I say, any further questions, please ask.

JedMeister avatar Aug 28 '19 01:08 JedMeister

Once again we've failed to add all the new appliances, let's try again on 17.0!

OnGle avatar Aug 03 '21 11:08 OnGle

  1. Add more options to payment inside invoice form when user choosing bank transfer mode of payment ,add field to enter TrxID for this payment inside the payment table

  2. Auto Delivery note generation option from invoices form data

MEClouds avatar Oct 25 '23 19:10 MEClouds