Multiple trytond services

For many Docker seems to be the preferred way of running trytond in production
(Configure Tryton server 5 (good practices or advices))
I don’t know Docker, I’v read a few articles on running Docker in production, it’s not that simple.

So we might start running trytond as a regular service on a vm. And maybe later using Docker.

We would also like to run several trytond services. Each running with it’s own database and log file.
I managed to run 2 services on one vm and it works. (see below)

Is it a good idea to run multiple trytond services like this? We might even run 10, 20 or more.
Or should I learn Docker/Kubernetes/…?
We use Tryton 5.0

● tryton-server.service - Tryton Server WSGI App
   Loaded: loaded (/lib/systemd/system/tryton-server.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2019-11-07 14:26:44 CET; 1 weeks 1 days ago
     Docs: man:trytond,file:/usr/share/doc/tryton-server,file:/usr/share/doc/tryton-server-doc,http:doc/tryton.org/
 Main PID: 7212 (trytond)
    Tasks: 1 (limit: 1138)
   Memory: 24.1M
   CGroup: /system.slice/tryton-server.service
           └─7212 /usr/bin/python3 /usr/bin/trytond --config /etc/tryton/trytond.conf --logconf /etc/tryton/trytond_log.conf
tdj@debian:~$ systemctl status tryton-server-foo
● tryton-server-foo.service - Tryton Server WSGI App
   Loaded: loaded (/lib/systemd/system/tryton-server-foo.service; disabled; vendor preset: enabled)
   Active: active (running) since Sat 2019-11-16 12:11:00 CET; 17min ago
     Docs: man:trytond,file:/usr/share/doc/tryton-server-foo,file:/usr/share/doc/tryton-server-doc,http:doc/tryton.org/
 Main PID: 10037 (trytond)
    Tasks: 1 (limit: 1138)
   Memory: 7.3M
   CGroup: /system.slice/tryton-server-foo.service
           └─10037 /usr/bin/python3 /usr/bin/trytond --config /etc/tryton/trytond-foo.conf --logconf /etc/tryton/trytond_log-foo.conf
1 Like

I do not see any issue with such settings. Indeed the demo servers was configured like this until 5.0. We switched to a docker setup for two reasons:

  • Simpler to manage (a single docker-compose configuration file)
  • Easier to manage old version which may require old Python modules or database

But I would say that in order to limit each Tryton server to connect to only compatible database, we used a different database user per server.
Or you can fill in ir.configuration the hostname from which the database can be connected (but it is less error prone).

2 Likes

Hi,

Other simple way of running tryton in production is this:

  • Virtualmin with LEMP stack installed on centos, ubuntu or debian server (nginx to use it like web and proxy server).
  • uWSGI to manage Tryton.
  • Postgresql.
  • Virtualenv (venv for python3).

With virtualmin you can to manage postgresql easily, create several virtual server with domains and have a database user to each tryton installation.We have 25 customers with this infraestructure currently.

1 Like

one super easy way to use Docker/Kubernetes is RancherOS, we use it to tryton saas backup servers. test it :smiley:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.