Zato 3.1 - py 3 support on a RH server

Hi, I have a couple questions

One of my devs is drooling over being able to use python3 for Zato services. Which is fine, except that I have installed Zato 3.1 py 2.7 version on our test server. We only have py 2.7 code in need of migration to the new environment as of now, but it would be cool to get py 3 service code working as well.

How would I go about removing the Zato version I have already installed?
Simply ‘yum remove zato’ after having removed all traces of the test cluster I have set up?

We came from the happy world of CentOS but these days we are forced to use RH linux with it’s annoying Software Collections feature. Installing python 3 the RH way looks to me to hide the py 3 behind SCL. Which leads to more questions…

To get the python 3 support working on RH, do I need to to install python 3 on the OS level or just add the correct repo and install zato?

From other discussion I’ve gathered that Zato is 99% isolated from the underlying OS with regards to python 2.7. If that is also true for the python 3 support, I expect headaches with py 3 and SCL

Any insights to be had?

Thanks

Hi, @badsequel!

As far as I understand, Zato 3.1 has different packages to be used with Python 2.7 or Python 3.x, which makes sense because you have to compile against one or the other.

I don’t think you need to remove Python 2.7 when installing either from sources or from packages, albeit it makes things simpler. I don’t know how the Redhat packages are built, but if Python 3 executable and packages are inside it, then it could be considered self-contained, as you hinted.

I always install from sources and I only have Python 3 in the system, but that is in order to keep things simple. I know I could have Python 2.7 also because, when compiling, you tell the install script where the Python binary is. So you provide it with the one you want, which is then copied into its virtualenv.

Let me just add that the assumption with RHEL 7 is that Python 3 is available in the system but in what way it is installed is up to users.

In other words, you need to make sure that it can be found but since there may be at least two ways to do it - SCL or installation of Python 3 from source, and Python 3 is not available by default in the same manner as Python 2 is - you just need to install it a way that you consider best in your situation.

Then, just like @jsabater said, you install the Zato package for RHEL 7 and Python 3. The process is described here:

https://zato.io/docs/3.1/admin/guide/install/py3/rhel.html

If you install Zato from packages, you cannot have Zato versions for both Python 2.7 and 3.x because they will both want to install to /opt/zato.

If you want to have Zato for both Python lines in the same system, you need to compile it from source:

https://zato.io/docs/3.1/admin/guide/install/py27/source.html
https://zato.io/docs/3.1/admin/guide/install/py3/source.html