64 lines
2.4 KiB
Markdown
64 lines
2.4 KiB
Markdown
# RouterOS update-feed service
|
|
|
|
The project site now includes a small HTTP service for the RouterOS v7 update
|
|
metadata used by the package updater. It serves the static landing page and
|
|
Gitea release list, plus the plain-text update responses verified against
|
|
MikroTik's public server.
|
|
|
|
## Verified HTTP responses
|
|
|
|
RouterOS requests channel metadata in this form:
|
|
|
|
```http
|
|
GET /routeros/NEWESTa7.stable?version=7.23.8
|
|
```
|
|
|
|
The response is plain text containing the offered version and Unix build time:
|
|
|
|
```text
|
|
7.25.1 1793623193
|
|
```
|
|
|
|
The service currently maps `testing` to 7.23.8 for the upgrade-path experiment,
|
|
`long-term` to 7.24.6, and `stable` to 7.25.1. The version query parameter is
|
|
accepted and ignored, as it is by the upstream endpoint. Unknown channels return
|
|
HTTP 200 with `No version available in this channel`, matching the updater's
|
|
plain-text response handling.
|
|
|
|
After receiving a version, the RouterOS update UI requests its changelog:
|
|
|
|
```http
|
|
GET /routeros/7.25.1/CHANGELOG
|
|
```
|
|
|
|
The body is the release's plain-text changelog. The three initial changelogs are
|
|
stored under `site/feed/changelogs/`; update them alongside the channel metadata
|
|
when publishing a new package version. `/healthz` is used by the Kubernetes
|
|
probes. `/api/releases` returns public Gitea release metadata for the landing
|
|
page.
|
|
|
|
These endpoints are a working metadata feed, not yet a complete package updater.
|
|
The project has not yet changed `sys2` to query this service, and the package
|
|
download request and response format has not been confirmed. A version appearing
|
|
in the update dialog must not be treated as proof that the signed NPK download
|
|
will work. The test plan is to first patch the updater host in a test system NPK,
|
|
capture its requests on a disposable RouterOS device, implement the matching
|
|
package response and downloads, then test install and rollback before marking
|
|
updates available by default.
|
|
|
|
## Hosting
|
|
|
|
The service runs from `service/server.py`; the corresponding container and
|
|
portable Helm chart live in this repository. Its public deployment target is
|
|
`https://mikrotik.brunner.ninja`. The service has no credentials or writable
|
|
data. It reads the checked-in feed/changelog files and queries the public Gitea
|
|
release API for the download page.
|
|
|
|
Local checks:
|
|
|
|
```sh
|
|
python3 -m unittest service.test_server -v
|
|
podman build -f service/Dockerfile -t localhost/mikrotik-olsr-site:test .
|
|
helm lint chart/mikrotik-olsr-site
|
|
```
|