Funding development of a docker Environment - how do I do it?

@fblauer can you share how you practically do that?

Here are 12 blog posts that explain everything that you need to know about lxd/lxc:

(There is also good documentation available on the canonical site)

Once you have played around with it a little, you can just launch an instance from the Ubuntu: image site, to get started
Customize it to your taste - I install a standard user, webmin, and a few standard utilities like openssh for example.
This becomes my template on which I install Erpnext (and possibly other stacks which I might want to test or evaluate)
I publish some standard containers as images on my desktop and can access them from other machines, like a portable for example, or from outside
The concept is simiar to a VM, but much faster and more convenient. I have cheat sheets in evernote that I copy and paste from, since I wasn’t really a command line guy, but they work just fine

1 Like

just curious …

  1. why have you chosen to use LXC and not Docker?
  2. you treat your container just like a VM, no service separation, right?
  3. data also stored inside of the container?

Hi All,
Our team (ridhosribumi) have finished renewing “erpnext docker” for erpnext version 7 from our “old erpnext-docker erpnext version 6”.
We use this docker for our company.

For those who are interested and want to try, you can get it through this link “GitHub - Ridhosribumi/docker-erpnext: Dockerized ERPNext

I hope this sharing will be helpful and we can learn together.

Best regards,
Team ridhosribumi @lukptr @tara_antonius @hendrik_zeta

1 Like
  1. why have you chosen to use LXC and not Docker?
    I found it easier to understand and get started. For example, there is nothing to “fund”. Maybe you can explain how I can use docker without having to rely on developers, since I am a user. But, like I said I can’t compare them since have never used docker. Does it require experience with development to make my own containers and images? Just sounds more complicated to me for my use cases

  2. you treat your container just like a VM, no service separation, right?
    I guess so since I don’t know what a “service separation” is

  3. data also stored inside of the container?
    Yes, everything is in the container, similar to a vm.

there is nothing to fund in docker neither. This thread talked about funding because the idea back then was to make something with separate services (and not all-in-one) which is [in the docker world] the promoted way to do stuff. And I saw clearly I couldn’t accomplish that myself, so I though maybe if more ppl where interest in such they could join to pay someone expert enough in Docker to set this up.

So funding is not required for Docker if you can do it yourself in general :slight_smile:

you’d have a container for each service involved (i.e. Nginx, MariaDB, frappe, …). This might go as far as having a container for the right python version (2.7 here).

These separate containers talk to each other to serve an application (erpnext in our case) to your browser

This mainly seems to be of advantage when you run many instances of something or different Application which all use a database (which then can be accessed from one database Container for all different Applications)

Or you have 100 ERPNext systems … instead of running 100 Maridb Servers (as you would by just multiplying the all-in-one container/vm) they would acces their respective database all from the one Container running MariaDB

I am not expert enough to really judge what the pro’s on cons are, but in the Docker world this is very much what everybody seems to see as the way to go

Now, I have learned in this process as much as apparently ERPNext/Frrape seems not to be fit for a real service separation by design somehow.

In my opinion, the “work” needed is to document best practice to be able to launch a machine from start to finish (no interactive shell business inside the host-machine) and how to maintain security patches and a smooth way to update to latest stable erpnext .

Amazon Container Service (ECS) has this thing they call Tasks which can be used to setup isolated containers for each service (i.e. mysql, redis, frappe/erpnext, etc). Similar things could be achieved using kubernetes as well as a bunch of shell-scripts just running the docker commands one-by-one. Maybe an official repo with fine-tuned and well documented recepies for this might be the answer to something that seems to be one of the most commonly asked questions in the forums (from doing it manually to via docker or similar).

What would be of great help from the frappe-team though is documentaion for the following:

  1. A basic system-overview of what each of our running services are doing, where we have persistant data (i.e. do we need to keep Redis AOF when doing maintenence/OS-updates), basically a suggested map of Docker volumes needed for user-uploads/attachments, relevant logs etc.

  2. Suggested work-flow when updating erpnext / running migrations. Let’s say you’d use Amazon RDS to keep the data-store outside of the Docker instance, and maybe a S3 mount for uploaded files. Then our last challenge that needs a well thought out orchestration is when patching up the host OS or updating to a newer erpnext. We would simply spin up a new instance that would give us the latest ubuntu and frappe stuff, but for an instance used in production, we’d first have to terminate the running one so the data migrations can run safely. Here I think it would be great to split it up a bit so this could run as separate steps via the docker cmd’s… Would be great with input here.

  3. Some good security tips on how to deal with password for the system and databases, passing those in separate from the scripts.

  4. Bonus: but very useful. Separate docs + scripts on howto clone a database to a separate instance or locally running at an office machine where test-migration can run to avoid downtime on the production instance in case something unexpected would fail when running an update.

4 Likes

Thank you for the docker file. This is the only docker that is updated regularly on the docker hub. However, I’m still trying to figure out how to customize this docker file to separate the following components into different containers and connect them to each other.

ERPNext
MariaDB 10+
Redis

Also, separate the volumes

MaridaDB Container Database >to> Amazon RDS.
ERPNext Container Files >to> S3

I have tried using Rancher container management, do you think this is a good direction for implementation.

Thanks

@Javid_Hussain

I think the most advanced project in this regards (separation of services) is the one discussed here: ERPNext docker discussion - #31 by ianneub

the github repo for the docker compose is: docker-frappe/alpine at docker-compose · ianneub/docker-frappe · GitHub

1 Like

hi @fblauer not sure whether you have noted that I forked this topic to an LXC/LXD topic (which I am looking at lately)

I’d be super curious to hear how you practically run your ERPNEXT on LXD. Especialy your updating/testing procedures and storage (database/attachments). If you have a minute and wouldn’t mind to share it there … that’ll be awesome

Its pretty straight forward, except instead of using a VM, I am using LXC/LXD in the same way, as I posted in a previous message.

any news on this topic? I’m very interested on this type of deployment.

If i want to start to separate in containers erpnext where can i find info about install manually?

I understand that bench do all job, will be a good start point check bench code or there are any tutorial for this?

@meigallodixital that latest attempt here is this I think A working setup using docker compose. Have you seen/tried it?

1 Like

I’m trying to separate all services / parts into containers and parameterize with environment variables. If I manage to make it functional, I will publish the repository here to polish it, since I am sure something will be missing or broken. I’m not an erpnext expert but i will try do it :wink: