1.1.6 • Published 5 days ago

@openli/openli-provisioner-web v1.1.6

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
5 days ago

OpenLI Provisioner Web Interface

Web interface for the OpenLI provisioner.

Installation

For more details on how to install and configure this software, please go to the wiki page at https://github.com/OpenLI-NZ/openli/wiki/OpenLI-Provisioner-Web-UI

Manual install

  1. Install requirements:

    • python >= 3.6
    • python3-venv
    • redis-server
    • systemd
    • curl
    • make
    • sudo
    • apache2 (optional)
  2. Clone the github repository and change into the cloned directory:

    git clone https://github.com/OpenLI-NZ/openli-provisioner-web.git
    cd openli-provisioner-web
  3. Use the provided install script:

    sudo ./scripts/openli-web-provisioner-install-manual.sh
  4. Configure config.yml (see Configuration file) and gunicorn.py under /etc/openli-provisioner-web. It is recommended to set workers in gunicorn.py to the number of logical threads in your system + 1.

    Note: In production, it is highly recommended to configure a password for the redis server.

  5. Start systemd service:

    sudo systemctl enable openli-provisioner-web
    sudo systemctl start openli-provisioner-web
    sudo systemctl restart redis-server
  6. Configure web server (In this example we use apache2 for Debian/Ubuntu, but you can use any web server application with a similar configuration):

    sudo cp contrib/apache.conf /etc/apache2/sites-available/openli-provisioner-web.conf

    Note: Make sure to edit the apache site configuration to set the appropriate values for hostnames, listening ports and SSL certificates.

    sudo a2ensite openli-provisioner-web
    sudo systemctl restart apache2

Uninstall

./scripts/openli-provisioner-web-uninstall-manual.sh

Configuration file

Configuration is provided by a YAML file located at either:

  • Path provided by the OPENLI_PROVISIONER_WEB_CONFIG_FILE environment variable.
  • <installation directory>/openli_provisioner_web/config/config.yml
VariableTypeRequiredDefaultDescription
site_titlestringfalseTitle to display for the web interface instance.
api_urlstringfalsehttp://localhost:8992URL for the OpenLI intercept configuration REST API.
api_auth_enabledbooleanfalsetrueSet to true if the REST API authentication is enabled.
log_levelstringfalseINFOLog level for output to stdout/stderr. Choices: ERROR, WARNING, INFO, DEBUG.
redis_hoststringfalselocalhostRedis database hostname or IP address (when api_auth_enabled: true)
redis_portintegerfalse6379Redis database port (when api_auth_enabled: true)
redis_dbintegerfalse0Redis database ID (when api_auth_enabled: true)
redis_passwordstringfalseRedis database password (when api_auth_enabled: true)
session_cookie_domainstringtrue when api_auth_enabled: trueDomain for the session cookie (when api_auth_enabled: true). This should be set to the server name of the web server.
session_cookie_pathstringfalse/Path for the session cookie (when api_auth_enabled: true).
session_cookie_securebooleanfalsefalseIf true, require secure connections (when api_auth_enabled: true). It is recommended to set this to true in production.
session_lifetime_secondsintegerfalse3600 (1 hour)Session lifetime in seconds (when api_auth_enabled: true).
session_cookie_signing_keystringtrue when api_auth_enabled: trueA secure random string for signing session cookies with (when api_auth_enabled: true). It is recommended to provide a string of length 40. The minimum required length is 20 to provide a good level of security.

Note: Redis and session configuration is only used when API authentication is required.

Environment varables

VariableDescription
OPENLI_PROVISIONER_WEB_DEBUGIf true, start in debug mode.
OPENLI_PROVISIONER_WEB_CONFIG_FILEPath to main configuation file.
OPENLI_PROVISIONER_WEB_API_FILEPath to API definition file.
OPENLI_PROVISIONER_WEB_ROUTES_FILEPath to routes configuration file.

Development

Requirements

Build from source

# Replace <project directory> with the directory you cloned the repository to
cd <project directory>
npm install
BUILD_PATH=openli_provisioner_web/build npm run build

Run development server

  1. Build from source
  2. Create a configuration file and make sure to set session_cookie_domain to localhost.localdomain
  3. python3 -m venv .venv
    source .venv/bin/activate
    pip install -r requirements.txt
    # Replace <path to config file> with the path to your configuration file
    OPENLI_PROVISIONER_WEB_CONFIG_FILE="<path to config file>" flask --app openli_provisioner_web run
  4. Goto http://localhost.localdomain:5000
1.1.6

5 days ago

1.1.5

2 months ago

1.1.4

2 months ago

1.1.3

4 months ago

1.1.2

4 months ago

1.1.1

9 months ago

1.1.0

10 months ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago