NETVS - Middleware
Installation
The NET-SUITE middleware requires python3
.
In case you don't want a venv setup, omit steps 1&2.
-
Create venv:
virtualenv venv/
-
Change into venv:
source bin/activate
-
Install dependencies:
pip install -r requirements.txt
Productive setup with uwsgi
uwsgi -s /tmp/net-suite.sock --virtualenv <path to env> --manage-script-name --mount /net-suite=run:app
DEV-Setup
DEBUG = True
in config.py
.
python3 main.py
systemd
Also take at look at the uwsgi documentation.
Configuration
NET-DB
Postgres
Net-Suite uses different databases depending on the host operation mode defined in /usr/local/etc/host_oper_mode_data.cfg
:
[op_environment]
mode = test
# mode = prod
# mode = test
[redundancy]
mode = active
[default_database_connection]
prod = pgsql_prod
test = pgsql_test
devel = psql_devel
The different databases are defined in the HOME
of the user running DNSVS in the file ~/.db_connection_data.ini
:
[pgsql_prod]
host=prodhost
port=5435
user=user
db=db
[pgsql_test]
host=testhost
port=5435
user=user
db=db
[pgsql_devel]
host=develhost
port=5435
user=user
db=db
Postgres' authentication information is retrieved from ~/.pgpass
.