Warning: This is a fork of Muk It - Odoo Session Store.
By default Odoo stores web client (werkzeug) sessions in the file system. This prevent to scale Odoo on several instances.
This addon allows to store sessions either in a PostgreSQL Database or Redis making it possible to scale Odoo by adding instances.
The requirements are only required if Redis is used as the session store.
A interface to the Redis key-value store for Python. To install Redis please follow the instructions or install the library via pip.
pip install redis
To install this module, you need to:
Download the module and add it to your Odoo addons folder. Afterward, log on to your Odoo server and go to the Apps menu. Trigger the debug mode and update the list by clicking on the "Update Apps List" link. Now install the module by clicking on the install button.
To upgrade this module, you need to:
Download the module and add it to your Odoo addons folder. Restart the server and log on to your Odoo server. Select the Apps menu and upgrade the module by clicking on the upgrade button.
Since this module need to be activated even if no database is selected it should be loaded right at the server start. This can be done by editing the configuration file or passing a load parameter to the start script.
Parameter: --load=web,inouk_session_store
Once added, this module's configuration is done exclusively using these ENVIRONMENT VARIABLES.
INOUK_SESSION_STORE = 'postgresql' or 'redis'
If INOUK_SESSION_STORE is postgresql, 2 more options are available:
- INOUK_SESSION_STORE_DBNAME ; The name of the database used to store sessions. Default value is inouk_session_store.
- INOUK_SESSION_STORE_DBTABLE ; The name of the table used to store sessions. Default value is odoo_sessions.
Redis support is not implemented yet.
- session_store_prefix
- session_store_host
- session_store_port
- session_store_dbindex
- session_store_pass
- session_store_ssl
- session_store_ssl_cert_reqs
After setting the parameters, the session store is used automatically.
In order to use ssl, which is a requirement of some databases, session_store_ssl should be set to True and session_store_ssl_cert_reqs should be set to 'required' except in the case where the server certificate does not match the host name.
e.g. # Server has a proper certificate session_store_ssl=True session_store_ssl_cert_reqs=required
# Server does not have a proper certificate (AWS possibly) session_store_ssl=True session_store_ssl_cert_reqs=None
For more information please see the redis python module documentation
INOUK_SESSION_STORE_DEBUG is reserved for future use.
- Mathias Markl <[email protected]>
- Cyril MORISSE <[email protected]>
Some pictures are based on or inspired by the icon set of Font Awesome:
Parts of the module are inspired by:
This module is maintained by Cyril MORISSE <[email protected]>