Use `esbuild` to build TypeScript, and bundle components together
in a minified form for the `lts_node` website.
This is very much a work in progress, committing as a checkpoint.
* Adds a new Rust program, `lqos_setup`.
* If no /etc/lqos.conf is found, prompts for interfaces and
creates a dual-interface XDP bridge setup.
* If no /opt/libreqos/src/ispConfig.py is found, prompts
for bandwidth and creates one (using the interfaces also)
* Same for ShapedDevices.csv and network.json
* If no webusers are found, prompts to make one.
* Adds build_dbpkg.sh
* Creates a new directory named `dist`
* Builds the Rust components in a portable mode.
* Creates a list of dependencies and DEBIAN directory
with control and postinst files.
* Handles PIP dependencies in postinst
* Calls the new `lqos_setup` program for final
configuration.
* Sets up the daemons in systemd and enables them.
In very brief testing, I had a working XDP bridge with
1 fake user and a total bandwidth limit configured and
working after running:
dpkg -i 1.4-1.dpkg
apt -f install
Could still use some tweaking.
1) lqos_config understands writing to a new ispConfig.py file, copying the
previous one and amending to avoid changing any not-covered data.
2) The web UI can adjust the config, upload a new one and it is saved.
Signed-off-by: Herbert Wolverson <herberticus@gmail.com>
* The new Rust utility "webusers" manages /opt/libreqos/webusers.toml.
* You can add/update/remove/list users from that tool.
* The "allow anonymous" option in webusers.toml permits access for
unauthenticated users, but won't let them change anything. This is
for payne demonstrations.
* All web APIs and pages should now be secured, requiring a login.
* The login requires cookies.
Signed-off-by: Herbert Wolverson <herberticus@gmail.com>
* Adds the `lqos_python` module to the Rust build system.
* `lqos_python` exposes an API for calling bus commands
directly, instead of via a helper. Currently, "is alive"
for testing the daemon, and IP mappings are exported.
* Update the build script to build the .so file and put
it where Python can find it.
* Exclude the binary from Git.
* Update `LibreQoS.py` to use bus commands for clearing,
deleting IP mappings. Adding is not yet covered, due
to the way commands are batched - and that not yet being
supported by the library.
* Add a check to `LibreQoS.py` that the `lqosd` daemon
is running and accepting connections. Abort if it isn't,
since nothing else will work anyway.
Signed-off-by: Herbert Wolverson <herberticus@gmail.com>
* Adds build_rust.sh:
* Creates `src/bin` and `src/bin/static` if needed.
* Compiles all of the executables in the `rust` tree.
* Copies the executables into `src/bin`
* Copies the static web data for `lqos_node_manager`
into `bin/static`.
* Updates .gitignore to ignore the bin/ folder
* Updates LibreQoS.py to call bin/xdp_iphash_to_cpu_cmdline
instead of ./xdp_iphash_to_cpu_cmdline (cleaner).
* Updates graphInfluxDB.py to call the temporary Rust shim
that provides output like the previous one, hopefully
(poorly tested) allowing the existing graph system to work
with the new structure.
See #181
Signed-off-by: Herbert Wolverson <herberticus@gmail.com>
* Add src/rust/target to the .gitignore file,
to avoid including Rust build artifacts in the
Git tree.
* Fix the syntax when calling the IP mapping helper
and deleting IP mappings.
Signed-off-by: Herbert Wolverson <herberticus@gmail.com>