Skip to content
Snippets Groups Projects
Commit efff06bd authored by !! Julian Keck (old Account; do not use) !!'s avatar !! Julian Keck (old Account; do not use) !! :ghost:
Browse files

ADD clarifications to middleware documentation

parent 5b5ce21f
Branches
No related tags found
No related merge requests found
...@@ -41,7 +41,6 @@ MAIL_SMARTHOST="" ...@@ -41,7 +41,6 @@ MAIL_SMARTHOST=""
IP_CONTACT_SEND_MAIL="true" IP_CONTACT_SEND_MAIL="true"
# IP_CONTACT_OVERRIDE_MAIL_RECEIVER="somebody@example.com" # IP_CONTACT_OVERRIDE_MAIL_RECEIVER="somebody@example.com"
IP_CONTACT_EMAIL_SENDER="noreply@netvs.scc.kit.edu" IP_CONTACT_EMAIL_SENDER="noreply@netvs-devel.scc.kit.edu"
WAPI_NETVS_SUPERUSER="" WAPI_NETVS_SUPERUSER=""
gunicorn -k uvicorn.workers.UvicornWorker --reload --bind localhost:8000 main:app
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
## Installation ## Installation
The NET-SUITE middleware requires ```python3```. The NETVS middleware requires ```python3```.
In case you don't want a venv setup, omit steps 1&2. In case you don't want a venv setup, omit steps 1&2.
1. Create venv: 1. Create venv:
```shell ```shell
virtualenv venv/ python3 -m venv venv/
``` ```
2. Change into venv: 2. Change into venv:
```shell ```shell
source bin/activate source venv/bin/activate
``` ```
3. Install dependencies: 3. Install dependencies:
...@@ -23,9 +23,9 @@ In case you don't want a venv setup, omit steps 1&2. ...@@ -23,9 +23,9 @@ In case you don't want a venv setup, omit steps 1&2.
pip install -r requirements.txt pip install -r requirements.txt
``` ```
## Generate APLIST/MACFINDER certificate ## Generate AP-List/MACfinder certificate
Login as root on `macfinder-1.tmn.scc.kit.edu` and execute `/root/make-devel-cert.sh <certname>`. 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. The script will ask for some input. Typically, the default values and yes are correct.
## Productive setup with uwsgi ## Productive setup with uwsgi
...@@ -40,12 +40,24 @@ uwsgi -s /tmp/net-suite.sock --virtualenv <path to env> --manage-script-name --m ...@@ -40,12 +40,24 @@ uwsgi -s /tmp/net-suite.sock --virtualenv <path to env> --manage-script-name --m
```shell ```shell
python3 main.py python3 main.py
``` ```
or
```shell
gunicorn -k uvicorn.workers.UvicornWorker --reload --bind localhost:8000 main:app
```
## systemd ## systemd
Also take at look at the [uwsgi documentation](http://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd). Also take at look at the [uwsgi documentation](http://uwsgi-docs.readthedocs.io/en/latest/Systemd.html#one-service-per-app-in-systemd).
## Configuration ## Configuration
### Middleware
`WAPI_NETVS_SUPERUSER` is the superuser for the middleware.
When queries are required which are not possible as the requesting user (due to permission restrictions), the superuser is used.
Therefore, the user must have the necessary permissions to execute those queries.
Typically, a user with `cntl.default_reader` and `wapi.devel_tester` is used.
As the queries are executed directly against the database, no token for the user is required; it will only be used to populate the context of the query.
### NET-DB ### NET-DB
#### Postgres #### Postgres
Net-Suite uses different databases depending on the host operation mode defined in ```/usr/local/etc/host_oper_mode_data.cfg```: Net-Suite uses different databases depending on the host operation mode defined in ```/usr/local/etc/host_oper_mode_data.cfg```:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment