Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Release 3.1.0+

Since release 3.1.0, all services will run in python 3.6 environment. Upgrading from an earlier version will overwrite any previous configurations and enforce python3.6.

However, if you have not migrated & tested your dataloader plugins, studio plugins or piplets to python3.6 compatible code, you can still manually revert to run specific services in python2.7.

During the upgrade from Squirro version < 3.1.0, rpm (RedHat Package Manager) will rename /etc/sysconfig/squirro_venv_sq<service name>d and append .rpmsave to the filename, thereby preventing the service configuration file from using the environment variables therein.

For each service that you wish to run back in python2.7, you must remove the .rpmsave extension, e.g. for topic service:

Code Block
languagebash
mv /etc/sysconfig/squirro_venv_sqtopicd.rpmsave /etc/sysconfig/squirro_venv_sqtopicd

Make sure to restart the service in question before you start using it, like so:

Code Block
sudo systemctl restart sqtopicd

Release 3.0.0

In releases 3.0.x, squirro runs most services by default in python 3.6. However there are still 4 services running by default in python 2.7 (datasource, frontend, plumber and topic). These services still run in python 2.7 to guarantee compatibility of the customer specific code like dataloader plugins, studio plugins or pipelets.

To change the default python environment back to python 2.7 for all squirro services, you can edit the file squirro_venv_default in /etc/sysconfig. If you need to run a single squirro service in a python 2.7 environment, you can overwrite the variable in a service specific file. You can do that by creating a file with the name <squirro_venv_<service>> in the directory /etc/sysconfig (E.g. squirro_venv_sqtopicd). The variables to be set for python 2.7 are the following:

Code Block
languagebash
SQUIRRO_PYTHON=python27
SQUIRRO_VIRTUALENV=virtualenv

Once added or changed you need to restart the corresponding service.

To migrate a service back to python 3, it is enough to remove the corresponding <squirro_venv_<service>> file or change the above mentioned variables to the following values and restart the service:

Code Block
languagebash
SQUIRRO_PYTHON=rh-python36
SQUIRRO_VIRTUALENV=virtualenv3

To migrate your own code, dataloader plugins, studio plugins or pipelets to python 3 code, please refer to the official documentation here:
https://docs.python.org/3.6/howto/pyporting.html
http://python3porting.com/

https://python-future.org/compatible_idioms.htmlThis page can now be found at Services on the Squirro Docs site.