system: allow to configure remote journal upload

We add a new capability that allows user to configure
systemd-journal-upload service.

When the /czechlight-system:journal-upload is present then its
child leafs form a url that is used as a destination for journal
upload.

Velia writes into two environment files containing the DESTINATION=<url>
variable where <url> is the value for --url option of
systemd-journal-upload [1]. One file for both running and startup
datastores.
The systemd-journal-upload unit file should read both of these
environment files (first the startup, second the running) and also it
should not start unless at least one of these files exists.

We need both of these files. systemd-journal-upload can start quite
early during the system startup phase, definitely before velia or any
sysrepo startup->running copying. In case velia fails to start for some
reason we want these logs to be uploaded as well to know what prevented
velia from start. Therefore we can't wait for velia to setup the env
file and start the systemd-journal-upload service.

[1] https://www.freedesktop.org/software/systemd/man/252/systemd-journal-upload.service.html

Depends-on: https://gerrit.cesnet.cz/c/CzechLight/dependencies/+/6766
Change-Id: I0f77fc39af337fb4b350758e5c59117e3ea78a85
6 files changed
tree: 6eb3d7af9feb61415d750cb743614ef9702c09fe
  1. .clang-format
  2. .gitmodules
  3. .zuul.yaml
  4. CMakeLists.txt
  5. Doxyfile.in
  6. LICENSE
  7. LICENSE.md
  8. README.md
  9. ci/
  10. cmake/
  11. docs/
  12. src/
  13. tests/
  14. yang/
README.md

YANG System management for embedded devices running Linux

Together with sysrepo, this software provides "general system management" of embedded devices. The target platform is anything that runs Linux with systemd. This runs in production on CzechLight SDN DWDM devices.

Health tracking

This component tracks the overal health state of the system, including various sensors, or the state of systemd units. As an operator-friendly LED at the front panel of the appliance shows the aggregated health state.

System management

Firmware can be updated via RAUC, and various aspects of the system's configuration can be adjusted. This includes a firewall, basic network settings, and authentication management.

Supported YANG models

For a full list, consult the yang/ directory in this repository.

Installation

For building, one needs:

The build process uses CMake. A quick-and-dirty build with no fancy options can be as simple as mkdir build && cd build && cmake .. && make && make install.