Commit Graph

14 Commits

Author SHA1 Message Date
Herbert Wolverson
393a489bca Allow logged-in users to update ispConfig.py via web UI
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>
2023-01-10 16:12:09 +00:00
Herbert Wolverson
165dae030b Adds an authentication system.
* 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>
2023-01-10 14:12:51 +00:00
Herbert Wolverson
42c77f3432 Add example systemctl .service files
Add example .service files for lqosd and lqos_node_manager.

Signed-off-by: Herbert Wolverson <herberticus@gmail.com>
2023-01-10 14:12:50 +00:00
Herbert Wolverson
b01b9520a5 First iteration of a Python module for direct bus interaction
* 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>
2023-01-10 14:12:50 +00:00
Herbert Wolverson
bd5ace9fbf Couple more .gitignore entries to avoid including
Linux TC status and lastRun.txt in the tree.

Signed-off-by: Herbert Wolverson <herberticus@gmail.com>
2023-01-10 14:12:50 +00:00
Herbert Wolverson
deded47cac Add build script and associated path changes
* 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>
2023-01-10 14:12:50 +00:00
Herbert Wolverson
b0ff63d278 Update .gitignore, fix syntax in LibreQoS.py
* 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>
2023-01-10 14:12:50 +00:00
Dave Täht
113a3f7c96 More gitignore fixes 2022-12-10 21:37:52 -08:00
Dave Täht
a1d779f2d4 Clean up .gitignore 2022-12-10 20:43:29 -08:00
rchac
0821df4f76 remove cpumap-pping from gitignore 2022-10-22 14:48:29 -06:00
rchac
c86395bb66 Switch from xdp-cpumap-tc to cpumap-pping 2022-10-21 22:49:50 -06:00
Robert Chacón
337b898bdc
Update .gitignore 2022-09-27 12:18:54 -06:00
Robert Chacón
f161bd3819
add ignores/dirty so the branch stays clean/_more_ pullable in prod 2022-09-13 07:59:04 -06:00
Warren
c36460007b add ignores/dirty so the branch stays clean/_more_ pullable in prod 2022-09-13 16:52:08 +12:00