Skip to content
Snippets Groups Projects

NETVS - Middleware

Installation

The NET-SUITE middleware requires python3.

In case you don't want a venv setup, omit steps 1&2.

  1. Create venv:

     virtualenv venv/
  2. Change into venv:

     source bin/activate
  3. Install dependencies:

    pip install -r requirements.txt

Generate APLIST/MACFINDER certificate

Login as root on macfinder-1.tmn.scc.kit.edu and execute /root/make-devel-cert.sh <certname>. The script will ask for some input. Typically the default and yes are correct.

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

To use the normal hosts, you can use:

[pgsql_prod]
host = net-pgsql.scc.kit.edu
db = net
user = netadmin

[pgsql_test]
host = net-pgsql-test.scc.kit.edu
db = net
user = netadmin

[pgsql_devel]
host = net-pgsql-devel.scc.kit.edu
db = net
user = netdevel

Postgres' authentication information is retrieved from ~/.pgpass.