Skip to content

ridgewarden 0.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 24 Nov 00:57

ridgewarden is the core agent for AREDN mesh apps: it polls the node, keeps a signed log every site agrees on, and keeps working when the mesh splits. See the README.

What's new in 0.2.0

Added

  • ridgewarden top: the agent live in a terminal or an SSH session, with an overview and a page each for peers, the log (each station's chains, forks, gaps and refused events), the node and the nodes it crawls, blobs with fetch progress, and recent events.
  • A tui feature in ridgewarden-client with the pieces top is built from (event loop, tabs, state pills, tables, loading and error states, loading off the screen's thread), so apps can have terminal views that look and behave the same.
  • GET /local/v1/metrics: the numbers ridgewarden status shows, in Prometheus' text format, for a scraper on the same machine. Off unless [metrics] enabled = true; loopback only, with the app token.
  • Polls of the site's own node are kept parsed (node_polls, node_links) for 8 days, which "what changed", status and top read. Raw replies kept from before are parsed once on upgrade.
  • aredn::Api and NodeObs::api in ridgewarden-client: which sysinfo layout a reply was read as.
  • The simulator's 3.x nodes answer the way AREDN 3.25.8.0 does: JSON at /cgi-bin/sysinfo.json (api_version 1.14, OLSR link qualities, LQM trackers, services by address) and an HTML page at /a/sysinfo. Its 4.x nodes redirect /cgi-bin/sysinfo.json to /a/sysinfo.
  • ui::ICON: pages made with ui::Page carry the suite's tab icon inline, so browsers no longer ask each app for a /favicon.ico it doesn't have.

Changed

  • Sysinfo replies are read by their api_version: 1.x link qualities as OLSR's 0-1 fractions, 2.x link data from LQM trackers only, and both where the version is missing or unknown (the agent logs that once).
  • Raw sysinfo replies are kept 2 days instead of 8.
  • mono_time carries on across restarts, and past what a CLI command wrote meanwhile or what sync brought back after a restore from an old copy, instead of starting again from 0 each time the agent starts.
  • Node polls, crawls and sync follow a redirect only to the same host and port, and at most twice.
  • CLI messages and the dashboard call the signed list of stations the trust list.
  • Charts widen their left margin to fit long axis labels such as -94.0 dBm, up to a third of the chart.
  • A sysinfo reply over 8 MB is refused, a service with a name, link, protocol or host over 256 bytes is left out, and one reply gives at most 4096 services and 8192 hosts.
  • A service or host list too big for one event (256 KB as JSON) is kept for this site's own pages and not shared, instead of failing every poll; the agent logs it once.
  • A poll that goes wrong after the node answered, such as a reply that isn't sysinfo, is logged as a failed poll with the reason, for the node and for crawled nodes, instead of leaving no trace.
  • ridgewarden top refuses to run as root where the agent doesn't, since files root opens in the data dir could lock the agent out.
  • Terminal views keep only the newest unread load, and stop drawing as soon as any thread panics.

Fixed

  • 3.x nodes are polled at /cgi-bin/sysinfo.json. 3.25 answers /a/sysinfo with its web page, so every poll of a 3.x node failed. The core tries /a/sysinfo first and remembers which path each node answered on.
  • Services on 3.x nodes are listed under the advertising node's name, from the hosts list, instead of its address.
  • A neighbor blocked on the node (LQM user_blocks) no longer comes back as a link from link_info.
  • ridgewarden update works in a new folder in /var/tmp that only root can open, instead of in the data dir, whose owner (the agent's user) could swap a release between root checking and installing it. It never uses $TMPDIR, which su and sudo VAR=value pass on from whoever asked, and refuses a parent folder other users could change. The folder of 0.1.0's updates in the data dir is removed.
  • ridgewarden update unpacks without the archive's owners and modes, installs only a plain file (never through a link), and stages the new binary as a new file, never writing through whatever was at that name; it syncs the binary to disk before the rename and the folder after it, and a failed folder sync after a good rename is a warning, not a failure. Anything left from a failed install is removed. GitHub's answer, the checksum list, the signature and the archive are refused past the size a real release has, whether curl fetches them or the mesh has them, and a release's tag must be a plain version.
  • ridgewarden update tries releases from the mesh and GitHub together, newest first by a proper version order, and takes the first that checks out; two names for one version, such as 1.2.3 and 1.2.03, used to break the sort. Ctrl-C at its prompt removes its work folder.
  • ridgewarden update reads the archive's checksum from sha256sum on stdin, so a path with a backslash in it can't garble it.
  • The dashboard's "stations writing" counts stations; it counted each station's telemetry log as another one.
  • Peers from the config or an invite are named by their callsign on the dashboard, in status, in top and in the metrics, from their signed identity, which the core checks after its first good pull from each. They showed ? before.
  • The README runs the commands that open the agent's data as its user (sudo -u ridgewarden) and update with sudo, and says that the .deb's own scripts don't check the release signature.

Downloads

File For Size Notes
ridgewarden_0.2.0_amd64.deb x86_64 2.9 MB Debian / Raspberry Pi OS package
ridgewarden_0.2.0_arm64.deb Raspberry Pi (arm64) 2.7 MB Debian / Raspberry Pi OS package
ridgewarden-v0.2.0-aarch64-linux.tar.gz Raspberry Pi (aarch64) 3.3 MB Static binary, systemd unit, README and license
ridgewarden-v0.2.0-x86_64-linux.tar.gz x86_64 3.6 MB Static binary, systemd unit, README and license
install-all.sh Linux 2.8 KB The core plus the apps you name (or the ten main ones), each checked with the core
install.sh Linux 3.2 KB Script install: picks the build, checks checksum and signature
SHA256SUMS.txt all 1.4 KB Checksums of every file
SHA256SUMS.txt.sig all 86 B Release signature over the checksums

Once installed, ridgewarden update finds newer releases on GitHub or on the mesh, checks the signature and checksum, and installs only when you say yes.

Install

One line, on a 64-bit Raspberry Pi OS or x86_64 Linux box on an AREDN node's LAN:

curl -fsSL https://github.com/Londopy/ridgewarden/releases/latest/download/install.sh | sudo RIDGEWARDEN_CALLSIGN=YOURCALL sh

Debian package: sudo apt install ./ridgewarden_0.2.0_arm64.deb (or _amd64), then sudo ridgewarden --config /etc/ridgewarden/ridgewarden.toml init --callsign YOURCALL --data-dir /var/lib/ridgewarden && sudo chown -R ridgewarden:ridgewarden /var/lib/ridgewarden && sudo systemctl enable --now ridgewarden.

Docker: docker run --network host -v /srv/ridgewarden:/data -v /etc/ridgewarden:/config ghcr.io/londopy/ridgewarden:0.2.0 (with data_dir = "/data" in the config).

Verify a download

sha256sum -c SHA256SUMS.txt --ignore-missing
ridgewarden verify-release SHA256SUMS.txt

The second command, run with a ridgewarden you already have installed, checks the release signature against the key that install trusts.

Checksums
5754357c2b6b91e0c813e7c5c2f80b663cddd0565e887183c886c699944bd377  install-all.sh
2d7bcb0ee001961426b083f25a43a82cfdc83f34babbd1fd79168ce46271ca5c  install.sh
5a9631896fd3eeee5fa188f3bd071c87c9d00914cc7a97e50a453b16f39df43c  ridgewarden-v0.2.0-aarch64-linux.tar.gz
430c7e58e9c3c2a7d6f3faf8bf21ffdd9b3d5367e6650758c1e1fce95d925ff4  ridgewarden-v0.2.0-aarch64-linux.tar.gz.magnet.png
0281f8f2228dbdea1565c6d17db6c249815ef58d76ec3a384d73463abf52e8e8  ridgewarden-v0.2.0-aarch64-linux.tar.gz.torrent
9bab636026c3f42c309321e76820f0472188b1ccf3e5e741bf319f81249db32a  ridgewarden-v0.2.0-x86_64-linux.tar.gz
0269dda7501cfacf8cf8640a2bea70eadb1728b2ef34f3f6f77209a43e688049  ridgewarden-v0.2.0-x86_64-linux.tar.gz.magnet.png
3dd52f6826671b925f2e01ff121636ea36298d3c3741cf621fa88fd44e76d213  ridgewarden-v0.2.0-x86_64-linux.tar.gz.torrent
47d7373d9081063796b30e48593660aaae4c0674bc4a358432aca770fe1d0f35  ridgewarden_0.2.0_amd64.deb
4a79a178aafc83f9a6a2c2b46778d92098f7f8995926ce58bae937bb171ddb26  ridgewarden_0.2.0_amd64.deb.magnet.png
4f6095afc093562358316bf5ab48d12d9b22f7c0d6c2d0a588779fc6c9acdc66  ridgewarden_0.2.0_amd64.deb.torrent
a2f70a2d1050e62dbdaf663f84448296c24a08665f84663e551d3178763e9d4e  ridgewarden_0.2.0_arm64.deb
f1774cf2c2ef6eddaef249d64dd3a6ba264ece83ff68511958efe4a11b5cf1f4  ridgewarden_0.2.0_arm64.deb.magnet.png
b5d1dfe9f9fb0a355fdb9228b228963f31cb855fc6a5e387f1c71ff9caf6011a  ridgewarden_0.2.0_arm64.deb.torrent

Torrents

Each package and archive (.deb, .tar.gz) is also a .torrent with its GitHub download as the web seed: a BitTorrent client gets it from GitHub when nobody is seeding, and from peers when they are. The magnet links carry the same web seed, but need one peer to fetch the file list first. The install scripts, checksums and signature are a few KB each and have no torrent.

File Torrent Magnet (QR)
ridgewarden-v0.2.0-aarch64-linux.tar.gz ridgewarden-v0.2.0-aarch64-linux.tar.gz.torrent QR code of the magnet link for ridgewarden-v0.2.0-aarch64-linux.tar.gz
ridgewarden-v0.2.0-x86_64-linux.tar.gz ridgewarden-v0.2.0-x86_64-linux.tar.gz.torrent QR code of the magnet link for ridgewarden-v0.2.0-x86_64-linux.tar.gz
ridgewarden_0.2.0_amd64.deb ridgewarden_0.2.0_amd64.deb.torrent QR code of the magnet link for ridgewarden_0.2.0_amd64.deb
ridgewarden_0.2.0_arm64.deb ridgewarden_0.2.0_arm64.deb.torrent QR code of the magnet link for ridgewarden_0.2.0_arm64.deb
Magnet links
# ridgewarden-v0.2.0-aarch64-linux.tar.gz
magnet:?xt=urn:btih:1ca2e67a6327ac54a50a9dbf7cf6cd729acb5f1c&dn=ridgewarden-v0.2.0-aarch64-linux.tar.gz&xl=3467711&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Fopen.stealth.si%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.torrent.eu.org%3A451%2Fannounce&ws=https%3A%2F%2Fgithub.com%2FLondopy%2Fridgewarden%2Freleases%2Fdownload%2Fv0.2.0%2Fridgewarden-v0.2.0-aarch64-linux.tar.gz

# ridgewarden-v0.2.0-x86_64-linux.tar.gz
magnet:?xt=urn:btih:bf9a80c0e8f821e662356f7ab3620c27b5c40456&dn=ridgewarden-v0.2.0-x86_64-linux.tar.gz&xl=3736352&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Fopen.stealth.si%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.torrent.eu.org%3A451%2Fannounce&ws=https%3A%2F%2Fgithub.com%2FLondopy%2Fridgewarden%2Freleases%2Fdownload%2Fv0.2.0%2Fridgewarden-v0.2.0-x86_64-linux.tar.gz

# ridgewarden_0.2.0_amd64.deb
magnet:?xt=urn:btih:cd5ca63950b021684c90880821e77d1d31810dac&dn=ridgewarden_0.2.0_amd64.deb&xl=3050458&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Fopen.stealth.si%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.torrent.eu.org%3A451%2Fannounce&ws=https%3A%2F%2Fgithub.com%2FLondopy%2Fridgewarden%2Freleases%2Fdownload%2Fv0.2.0%2Fridgewarden_0.2.0_amd64.deb

# ridgewarden_0.2.0_arm64.deb
magnet:?xt=urn:btih:3d64d6c2f1285b34ba50feea542ea9e6965069e6&dn=ridgewarden_0.2.0_arm64.deb&xl=2851580&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce&tr=udp%3A%2F%2Fopen.stealth.si%3A80%2Fannounce&tr=udp%3A%2F%2Ftracker.torrent.eu.org%3A451%2Fannounce&ws=https%3A%2F%2Fgithub.com%2FLondopy%2Fridgewarden%2Freleases%2Fdownload%2Fv0.2.0%2Fridgewarden_0.2.0_arm64.deb

Full changelog: v0.1.0...v0.2.0

README | Changelog | Report a problem