Skip to content

Releases

Release v0.1.3

Choose a tag to compare

@github-actions github-actions released this 02 Nov 01:35
3c2ad82

Docker Image

ghcr.io/v31-dev/sage:0.1.3

What's Changed

Features

Fixes

  • fix tailscale ping; other optimizations by @sidxdev in #86

Full Changelog: v0.1.2...v0.1.3

Developer Notes

Important

Update as usual: take a backup, pause Sage until it shows it is safe to stop, then run the newer image against the same volume. No environment variable, compose or tailnet change is needed. On the first start each worker is synced once, and Traefik, cloudflared, Vector and Telegraf are recreated with their new log limits, so expect a short interruption on every worker.

Some log history does not carry over. The Requests page starts empty, tasks from before the update show no log lines, and the manager's old log and the stored lines of Traefik, cloudflared, Telegraf and Vector are deleted by the first daily cleanup. Application logs are kept.

Live updates

The UI no longer polls. Each browser tab keeps one connection to the manager, and what a background task, the manager's own checks or another tab changes appears without a reload.

  • Status, tasks, backups, notifications and logs all update this way.
  • A dot on the manager's icon in the sidebar shows the connection (connected, on a slower fallback, or not connected) and pulses with each heartbeat, every 10 seconds.

Logs

Each kind of log now has its own store and its own place in the UI.

  • Application logs show the latest 1000 lines, from five minutes back by default, and follow new lines while you stay at the bottom. Filter by worker and by a From/To window, and search for text anywhere in a line.
  • Markers in an application's logs show what Sage did to each container: deployed, stopped, stopped and started again for a backup, a volume restored, a worker rebooted, a container removed.
  • Requests are Traefik's access lines in columns, filtered by worker, method, status, route, host, path and time. Routed only hides requests for hosts no application serves, which are mostly internet scanners.
  • Tasks can be filtered by name, executor, status, scope (app:test* works) and time, and show when each was queued, started and finished. A task's log dialog follows new lines, and a task with several containers can be narrowed to one container's part.
  • The Logs page is gone. The lines of the manager's tasks are on the Tasks page, and the rest of its output is in docker logs.
  • Only Traefik's and the applications' lines are shipped. Anything else run on a worker, such as a one-off docker run, stays there.
  • Log storage is bounded. Each application's logs, and the task logs, are limited to 256 MiB, and all logs together to 2 GiB or 10% of the data volume, whichever is smaller, next to the 14-day retention. On a worker, each container keeps at most five Docker log files of 10 MB. An application's container gets this limit at its next deploy.

Workers

  • A worker is online when its SSH server answers through Tailscale, the path Sage's commands take, instead of when it answers tailscale ping. It still goes offline after two misses in a row, about a minute.
  • After the manager starts, a worker shows as checking until the first sync has looked at it.
  • The Workers page shows each worker's latest minute of metrics from the pushed list.

Fixes

  • Logs a worker pushes that the manager can't store are now refused, so Vector sends them again. They used to be lost.
  • A Cloudflare token that is rejected, or a domain it can't use, now stops startup at once with the reason. Sage retries only failures that can clear by themselves.

Technical notes

Config

  • No change to the env vars, sample.env, docker-compose.yml, the Dockerfile or app/entrypoint.sh.
  • Added to app/config.py: UPDATES_COALESCE_SECONDS 3, UPDATES_PING_INTERVAL_SECONDS 10, UPDATES_PING_TIMEOUT_SECONDS 10, LOG_SHARD_MAX_BYTES 256 MiB, LOG_TOTAL_MAX_BYTES 2 GiB, LOG_TOTAL_MAX_DISK_SHARE 0.10, LOG_TRIM_TO_SHARE 0.9, LOG_KEEP_NEWEST_ROWS 1000, LOG_SIZE_CHECK_SECONDS 30, LOG_TRIM_BATCH_ROWS 10000, LOG_SHARD_VACUUM_RATIO 1.25, LIST_MAX_ROWS 1000, LOG_INTAKE_MAX_BYTES 8 MiB, REPORT_UNKNOWN_LIMIT 100, WORKER_METRICS_STALE_SECONDS 180, SSH_BANNER_TIMEOUT_SECONDS 3, SSH_CLOSE_WAIT_SECONDS 5.
  • Renamed: OFFLINE_AFTER_MISSED_PINGS is OFFLINE_AFTER_MISSED_CHECKS, still 2.

Startup (app/main.py, app/api.py)

  • The UI and API server runs app_asgi (build_asgi_app): socketio.ASGIApp in front of FastAPI, inside OnlyManagerAddress outside development. That class replaces the only_manager_address middleware: another host name gets the redirect, and a WebSocket is closed with code 1008. redirect_app is app_redirect.
  • fastapi_middleware is gone from both apps, with the request id and the X-Task-ID header. uvicorn's access log runs instead, and AccessLogFilter leaves out the routes marked openapi_extra=NO_ACCESS_LOG and SOCKET_IO_PATH. The ingest server no longer sets access_log=False, which would silence the logger every server shares.
  • Manager starts Logs().start_capture() and calls load_workers(), which replaces refresh_worker_summary(). refresh_worker_paths joins _AT_STARTUP.

Pushed updates (app/services/updates.py, app/routes/updates.py, ui/src/lib/updates.ts)

  • Socket.IO at /api/socket.io. Client events: subscribe, unsubscribe. Server events: state {topic, data} and topic_error {topic, status}.
  • Topics, each the JSON of its REST route: info, workers, worker:<hostname>, application:<project>/<name>, tasks, backup-status, backups, release. Feeds of rows: notifications, task-history, task-logs:<task> or task-logs:<task>/<part>, application-logs:<project>-<app>, requests.
  • A change waits UPDATES_COALESCE_SECONDS, then the topics that depend on it are computed on UPDATES_EXECUTOR (2 threads). The server pings every UPDATES_PING_INTERVAL_SECONDS and drops a connection after UPDATES_PING_TIMEOUT_SECONDS.
  • same_origin accepts a page only if its Origin is the scheme and host the request arrived with. A client that sends no Origin is accepted.

Endpoints

  • Added: GET /api/requests/ (worker, host, method, status, path, min_duration_ms, routed, from_ts, to_ts, after_id, limit), GET /api/projects/{project}/applications/{application}/logs (hostname, search, from_ts, to_ts, after_id, limit), GET /api/tasks/history, GET /api/tasks/history/filters, GET /api/tasks/{task_id}/parts, GET /api/tasks/{task_id}/logs (sub_task_id, after_id). limit is at most LIST_MAX_ROWS.
  • Removed: GET /api/workers/{hostname}/logs/{container}, workers from GET /api, completed and limit from GET /api/tasks, and * as a hostname.
  • POST to GET: .../applications/{application}/get_available_workers, .../applications/{application}/metrics, /api/backups/platform_backup_status, and /{backup}/download, also under a volume. _READ_ONLY_POSTS is gone, so the settings tests, which are POSTs, answer 503 while Sage is paused.
  • GET /api/tasks carries queued_at and started_at. GET /api/workers is Manager.worker_list: hostname, ip, online, status, path, container_count, infra, metrics. GET /api/workers/{hostname} adds metrics. online is null until a sync has looked at the worker, and status can be checking. Deleting a container on such a worker fails with a message to try again.
  • POST /api/vector/logs answers 204, 400 without X-Node-Name, 413 above LOG_INTAKE_MAX_BYTES, and 503 when a write fails. Vector sends a batch again on a 5xx, so a file already written gets it twice.

Logs (app/services/logs/, replacing services/logs.py)

  • Files under logs/ in the data volume: <project>-<app>.db for each application, requests.db (Traefik's access lines in columns: ts, worker, host, method, path, status, duration_ms, router, service, client, size) and tasks.db (task_id, sub_task_id, ts, level, logger, message).
  • A new application shard indexes with the FTS5 trigram tokenizer. A shard from an earlier release keeps its tokenizer and is scanned when searched.
  • stored_time keeps every time as UTC with nine digits of fraction and Z, so that times compare as text.
  • Markers are lines in the stream sage (MARKER_STREAM), written by mark and Logs.write_marker when an action ends.
  • Logs.trim_shard and Logs.trim_total run after a write, at most every LOG_SIZE_CHECK_SECONDS, and in Logs.cleanup.
  • Logs.cleanup drops every file that is neither in Logs.FILES nor an application's shard. This removes sage.db, traefik.db, cloudflared.db, telegraf.db and vector.db.
  • The manager stores only the lines of its queued tasks. The lines of a quiet task are held by TaskLines and written only if it fails. Everything goes to stdout, with task or task/part from TaskIdFilter.

Database (app/services/db/)

  • Worker.online is dropped. Task.started_at is added (null for a task cancelled before it started), Task.created_at is when the task was queued, and Task.finished_at is indexed.
  • Database._sync_columns now also drops a column no model has, at startup and after a platform restore.

Workers (app/services/manager/workers.py, decisions.py, app/services/tailscale.py)

  • vector.yml: the shipped transform keeps traefik and containers...
Read more

Release v0.1.2

Choose a tag to compare

@github-actions github-actions released this 27 Oct 05:23
ba013fb

Docker Image

ghcr.io/v31-dev/sage:0.1.2

What's Changed

Other Changes

Full Changelog: v0.1.1...v0.1.2

Release v0.1.1

Choose a tag to compare

@github-actions github-actions released this 27 Oct 00:35
6d173e0

Docker Image

ghcr.io/v31-dev/sage:0.1.1

What's Changed

Fixes

Maintenance

  • Backend test suite, CI and dev tooling by @sidxdev in #77
  • bump Python to 3.14 and some other dependencies by @sidxdev in #78
  • ui test suite and CI by @sidxdev in #79

Other Changes

  • npm audit fixes by @sidxdev in #80
  • Worker monitoring: Telegraf replaces Glances, and status comes from the workers' reports by @sidxdev in #81
  • Remove CLOUDFLARE_ACCOUNT_ID & TS_WORKER_TAG by @sidxdev in #82

Full Changelog: v0.1.0...v0.1.1

Developer Notes

Important

Workers are no longer found by their Tailscale tag: add each one from the Workers page. The workers already in Sage stay, and a machine that carries the tag but was never added is ignored (see the Workers section of the README). Update as for v0.1.0: take a backup, pause Sage until it shows it is safe to stop, then run the newer image against the same volume. On the first start each worker is synced once: Glances is replaced by Telegraf, and Traefik, Vector and cloudflared restart, so expect a short interruption on every worker.

Workers are added by hand, and report for themselves

Sage no longer goes looking for workers, and a worker's state now comes from what the worker reports instead of from SSH polling and Tailscale's own flag.

Adding and removing workers

  • Add Worker on the Workers page takes the hostname or Tailscale IP of a machine on your tailnet (Docker installed, Tailscale SSH enabled). Sage checks that it answers a ping, then sets it up over SSH. The worker shows as adding meanwhile.
  • TS_WORKER_TAG is no longer read. The tag stays in your tailnet policy, where it lets the manager reach the workers. The Tailscale settings page no longer shows it.
  • Several Sages can share a tailnet. Each worker records the Sage that manages it, and a machine another Sage manages is refused with that Sage's domain in the message: delete it from there first. Each Sage needs its own domain.
  • Deleting a worker:
    • an online worker that still has containers is refused: delete the containers first;
    • an online worker without containers has Sage's services stopped and Sage's files removed from it, so the machine is clean again (the VM itself is not deleted);
    • an offline worker is removed from Sage together with its containers. Sage can't clean it up, so delete the VM, or what is left on it, yourself. The dialog says so.
  • A worker is shown as online, not ready, offline, adding, rebooting or removing. Restart and Delete show their state at once, and a second restart or delete of the same worker is refused.

Worker monitoring

  • Every worker runs a Telegraf container (replacing Glances) that pushes the host's and the containers' metrics and the containers' state to the manager every 10 seconds, on port 9001 like Vector's logs.
  • Application and container status follow those reports, so a change shows within seconds instead of at the next minute, and the metrics charts are no longer two minutes behind.
  • A worker is online when it answers tailscale ping, and offline after two misses in a row (about a minute). Tailscale's own online flag could be wrong for up to 15 minutes in both directions. While the manager's own node is cut off from the tailnet, workers keep the state they had.
  • When a report shows a container of the worker's stack down, Traefik not answering, or a worker silent for a minute, Sage runs docker compose up -d for the stack and notifies you, at most once a minute per worker. This also repairs a Traefik that fails to start because the worker booted before its Tailscale address existed.
  • The worker page shows the state of its stack (Traefik, Vector, Telegraf, cloudflared), and the Workers list refreshes every 10 seconds.
  • Telegraf and Vector are limited to 128 MB each on a worker. The recommended minimum machine, for the manager and for each worker, is 1 GB of memory and 1 core.

Cloudflare

  • CLOUDFLARE_ACCOUNT_ID is no longer read: Sage takes the account from the active zone of DOMAIN. The zone must be active (the registrar lists Cloudflare's nameservers) and the token must see only one active zone of that name, or startup stops with a message that says which.

Fixes

  • Deploying an application from a Docker image always pulls the image, so a tag that was pushed again (latest) deploys the new build instead of the copy already on the worker.
  • Metrics charts no longer come back empty when a reading lands at the moment a minute turns.
  • Creating a project or an application without a label answers 400 instead of failing with a server error, and a delete that the database refuses answers 409 instead of 500.
  • A Git repository URL with a trailing newline is refused.
  • One bad timestamp from the backend no longer crashes the page that shows it.
  • 15 vulnerable dependencies in the UI (4 critical, 8 high) are upgraded.

Other changes

  • Secrets on workers are written readable by root only (0600): a worker's .env, an application's .env files and build secrets. The backup and restore scripts are 0700. The workers' traefik/certs/key.pem is rewritten only when the certificate changes, so on an existing worker it stays 0644 until then. Resync Traefik rewrites it as 0600 at once.
  • Commands Sage runs on a worker are stopped by the worker at their deadline, their output reaches the task log as it arrives, and the pooled SSH connections are closed when Sage stops.
  • The image runs on Python 3.14 (from 3.12), and the UI is built on Node 24.
  • Settings → Upgrade shows GitHub alert blocks (Note, Tip, Important, Warning, Caution) as highlighted blocks.

Things to know

  • The env parser follows Docker Compose: a # with no space before it is part of an unquoted value in the project env, the application env, build args and build secrets (PASSWORD=pa#ss is no longer cut at the #), and an apostrophe inside a value (MSG=don't stop) no longer opens a quote. An application that relied on the old behaviour changes on its next deploy.
  • TS_WORKER_TAG and CLOUDFLARE_ACCOUNT_ID can be removed from the env. Leaving them set is harmless, but v0.1.0 refuses to start without them, so keep them if you may go back.
  • METRICS_PORT is now INGEST_PORT (default 9001, so nothing changes unless you set it). Port 61208 (Glances) is no longer used, and a tailnet policy that lists it for the manager's access to workers can drop it. Workers reach the manager on 9001 as before.
  • The backup format is unchanged and v0.1.0 backups restore. A backup made before this release has no instance id, though: restored into a manager that already ran this version, it gives the manager a new one, and its workers (which hold the old one) are refused as managed by another Sage until you delete /opt/sage/revisions/owner on each.

Technical notes

Config

  • Required env: TS_AUTH_KEY, TS_NAME, DOMAIN, CLOUDFLARE_API_TOKEN, ENCRYPTION_KEY (checked in app/entrypoint.sh). No longer read: TS_WORKER_TAG, CLOUDFLARE_ACCOUNT_ID, METRICS_PORT (now INGEST_PORT, ENV INGEST_PORT=9001 in the image).
  • app/entrypoint.sh starts tailscaled without --outbound-http-proxy-listen, and TAILNET_HTTP_PROXY (127.0.0.2:1055) is gone: it carried the Glances requests.
  • app/config.py holds the locations, endpoints and timings: REPORT_INTERVAL_SECONDS 10, REPORT_KEEP_ALIVE_SECONDS 30, REPORT_MAX_BYTES 8 MiB, REPORT_STALE_SECONDS 30, REPORT_SETTLE_SECONDS 15, REPORT_STARTUP_GRACE_SECONDS 60, OFFLINE_AFTER_MISSED_PINGS 2, PING_TIMEOUT_SECONDS 3, WORKER_REBOOT_LIMIT_SECONDS 300, WORKER_STACK_SILENCE_SECONDS 60, WORKER_STACK_REPAIR_COOLDOWN_SECONDS 60, COMMAND_KILL_AFTER_SECONDS 5, COMMAND_WAIT_GRACE_SECONDS 15. Modules read them as config.NAME.
  • Times are stored as naive UTC (utcnow() in utils/common.py).

Startup (app/main.py)

  • The port-9001 server is api_ingest.py (was api_vector.py) on INGEST_PORT, with the access log off and keep-alive REPORT_KEEP_ALIVE_SECONDS. It serves POST /api/telegraf/report and the Vector routes under /api/vector.
  • On the first stop signal, after the running tasks finish, Tailscale.close() closes every pooled SSH connection.
  • Database.reconcile_schema() (startup, and after a restore) creates the Instance table and, when it is empty, one row.

Workers (app/services/manager/workers.py, decisions.py)

  • Worker rows are created only by add_worker. sync_workers looks at known workers only: Tailscale.peers() filtered by hostname, pinged together (Tailscale.online_states: tailscale ping -c 1 --timeout=3s, offline after OFFLINE_AFTER_MISSED_PINGS misses, states untouched while Tailscale.connected() is false). plan_worker_sync (a pure function) decides: offline (stopped answering, or gone from the tailnet), or setup (came back, new IP, forced sync, startup stamp check). repair_worker_stacks follows.
  • Manager.worker_status is computed on each call and stored nowhere: removing (a queued or running remove_worker), adding (add_worker), rebooting (a queued reboot_worker, or a reboot mark until the worker reports a Telegraf that started after the request, at most WORKER_REBOOT_LIMIT_SECONDS), offline, not ready (the report says Trae...
Read more

Release v0.1.0

Choose a tag to compare

@github-actions github-actions released this 20 Oct 04:37
ff75e7f

Docker Image

ghcr.io/v31-dev/sage:0.1.0

What's Changed

Other Changes

Full Changelog: v0.0.27...v0.1.0

Developer Notes

Important

This release changes how Sage is deployed: the manager is now a single container with its own Tailscale node and new environment variables, so it needs a new compose file or run command (see the Manager section of the README). The in-app upgrade can't do this, so update by hand. Take a backup first, but keep it only for going back to the previous version: this version can't restore backups made by earlier ones. The database itself has no breaking changes.

The manager is now a single container that joins your tailnet as its own node. It needs no host Tailscale, TUN device, Docker socket or published ports, only a persistent volume and its environment. Cloudflare is part of the platform again: Sage sets up the tunnel, the DNS record and the certificates itself on start.

Setup

  • The manager is configured by environment variables: TS_AUTH_KEY, TS_NAME, TS_WORKER_TAG, DOMAIN, CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN and ENCRYPTION_KEY. A missing one stops the container with a message that names it.
  • The UI is served only at https://<TS_NAME>.core.<DOMAIN>, with its own Let's Encrypt certificate. Plain http://<TS_NAME> redirects to it, and any other address redirects too. Workers' internal domains (*.int.<DOMAIN>) use a second certificate. Both renew automatically, and the manager's is swapped in without a restart.
  • A first start can take a few minutes: Sage sets up Cloudflare, then requests the certificate, and logs each step. If that keeps failing it retries for about 20 minutes and exits with the reason.
  • An invalid or expired TS_AUTH_KEY stops the container at once with a [CRITICAL] line. So does an ENCRYPTION_KEY that isn't the key the data was written with, and the key can't be changed after the first boot.
  • TS_NAME, TS_WORKER_TAG and the Cloudflare details change with an env edit and a restart: workers are brought in line on start.
  • S3 (backups) and Discord notifications stay optional and are set in the UI.
  • Sage has no login of its own. The tailnet policy is the only gate, and the README now has an example policy.
  • The image is smaller (profiling tools are development-only) and the manager uses less memory (about 90 MB, from about 150).

Settings

  • One page per section under a Settings group in the sidebar: Tailscale, Cloudflare, S3, Notifications and Upgrade.
  • Status icons show whether each section works, with the reason when it doesn't. Sections are checked every 5 minutes. The Workers item in the sidebar shows whether every worker is online.
  • S3 and Notifications have a Test button (S3 writes and deletes a small marker object), a Reset button once edited, and ask before you leave with unsaved changes.
  • The Tailscale and Cloudflare pages show what the env set, link to the matching dashboards and show both certificates' expiry.
  • Secret fields have a copy button, and read-only fields show a lock.

Backups

  • Platform and volume backups share one format: AES-256 with openssl, then an integrity check (HMAC-SHA256). It is checked before anything is decrypted, so a corrupted file or another key is refused up front. Settings → S3 shows copyable commands that open either kind with openssl.
  • Download a backup from the Backups page (platform) or a volume's Restore dialog (volume). The browser fetches it from S3 through a link that works for 60 seconds.
  • Backups already in your S3 bucket are listed when you save the S3 settings, at startup and from Discover Backups. Entries whose file is gone are removed from the list.
  • Platform backups run every 12 hours (was 6). History is kept for 14 days (was 7): logs, metrics, notifications, tasks and the backups in S3.
  • Restoring a platform backup blocks Sage while it runs: an overlay shows what is happening, changes are refused, and the restore starts once running tasks have finished. Afterwards the page reloads, the restored settings are in use (S3 keeps the values it had), workers are resynced and backups are discovered again. Tasks that were waiting are cancelled.
  • A failed or rejected restore leaves the database as it was.
  • Backup routes say "S3 is not configured" instead of failing when S3 is off.

Stopping and upgrading

  • Sage no longer restarts or upgrades itself. Settings → Upgrade shows the release notes and the manual steps: take a backup, pause Sage until it shows it is safe to stop, then run the newer image against the same volume.
  • Pause holds queued work and refuses changes until you resume. Sage always starts unpaused.
  • On a stop signal Sage lets running tasks (a deploy, a backup) finish before it exits. Queued tasks are recorded as cancelled. Give the container a stop grace period of a few minutes. A second signal stops it at once.
  • ghcr.io/v31-dev/sage:latest now follows the newest release.

Other changes

  • Actions show their state at once. An application and its containers show deploying, stopping, backup or restoring as soon as you click, a settings section shows Applying after Save or a resync, and the restore overlay appears immediately. The sidebar icons and the pause banner refresh every 30 seconds.
  • Statuses look the same everywhere: applications, containers, workers, domains, tasks and settings use one set of badges and icons, in light and dark themes.
  • Worker sync no longer sends a notification when nothing changed.
  • Placeholders in forms are examples ("e.g. …"), defaults are prefilled and optional fields say so.
  • Dates are shown in readable form throughout.
  • The manager reaches workers' SSH and Glances metrics through its own Tailscale node, and workers ship their logs to port 9001 of the manager.

Things to know

  • Earlier backups can't be restored by this version. Platform backups are now encrypted as a whole and volume archives carry the integrity check.
  • Resources of a previous domain, account or TS_NAME stay in Cloudflare until you delete them.

Technical notes

Config

  • Required env: TS_AUTH_KEY, TS_NAME, TS_WORKER_TAG, DOMAIN, CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN, ENCRYPTION_KEY (checked in app/entrypoint.sh).
  • No longer read: HOSTNAME (now TS_NAME), WORKER_TAILSCALE_TAG (now TS_WORKER_TAG), ADMIN_EMAIL, S3_*, DISCORD_WEBHOOK. Setting rows for undefined keys are dropped on every Settings.load_all (startup and after a restore).
  • Ports: PORT (default 80) redirects to the manager address, HTTPS_PORT (default 443) serves the UI and API, METRICS_PORT (9001) takes worker logs. ENV=development serves plain HTTP on PORT (9000 in the dev compose) behind the dev Traefik and skips the hostname check.

Startup (app/entrypoint.sh, app/main.py)

  • entrypoint: tailscaled in userspace networking, wait for BackendState, tailscale up with TS_AUTH_KEY only when it is NeedsLogin (failure is fatal), wait up to 30 s for a tailnet IPv4 (fatal), tailscale set hostname TS_NAME, then exec the app. Fatal paths stop tailscaled first and print a [CRITICAL] line in Sage's log format.
  • main.py: Manager() (the settings rows decrypting is the ENCRYPTION_KEY check; InvalidToken exits), Manager.setup_domain() (Cloudflare connect, then the manager certificate; retries after 60, 240 and 960 s; a rate limit exits; a still-valid certificate lets startup continue), then HTTPS on 443 with uvicorn ssl (Certs.tls_context reloaded in place) plus redirect_app on PORT.
  • Queued after the servers are up (scheduler _AT_STARTUP): refresh_latest_release, renew_certificates, discover_backups, check_settings, check_worker_stamps.
  • api.py: in production every request whose Host is not the manager hostname gets a redirect to it (only_manager_address).

Certificates (app/services/certs.py)

  • Two Certificate objects: manager = [<TS_NAME>.core.<DOMAIN>] (never leaves the manager) and workers = [*.int.<DOMAIN>] (pushed to workers). ACME DNS-01 through Cloudflare TXT records (comment sage-acme-challenge), no contact email, renewal inside 30 days, daily at 03:00. is_valid() requires every name in the SANs, so a domain change makes both stale.
  • A Certificate keeps its parsed PEM in memory (load() at construction and after issue() writes), so validity and expiry checks and the settings status never read the disk.

Cloudflare (app/services/cloudflare.py)

  • Plain httpx client (the SDK is gone); network errors, 429 and 5xx are retried after 1 and 2 s; CloudflareError carries the API messages.
  • Records: tunnel <DOMAIN>-sage, proxied CNAME *.<DOMAIN> (comment is the tunnel name), A <TS_NAME>.core.<DOMAIN> (ttl 60, comment sage-manager), A *.int.<DOMAIN> per worker (comment sage-worker-<hostname>).

Workers (app/services/manager/workers.py)

  • setup_worker is the single idempotent heal. Stamps in <worker home>/revisions: infra (hash of worker templates, version, domain, tunnel id), certs (hash of the workers certificate) and one routing hash per application. check_stamps at startup converges workers that stayed online, which is how a changed env reaches them. A forced sync deletes the stamps first and ends with docker compose restart traefik and restart vector.
  • The infra stamp includes the version, so every new release restarts traefik, vector and cloudflared on each worker once.
  • SSH goes...
Read more

Release v0.0.27

Choose a tag to compare

@github-actions github-actions released this 25 Jul 09:20
80cd9f4

Docker Image

ghcr.io/v31-dev/sage:0.0.27

What's Changed

Features

Full Changelog: v0.0.26...v0.0.27

Release v0.0.26

Choose a tag to compare

@github-actions github-actions released this 24 Jul 14:55
32b43f5

Docker Image

ghcr.io/v31-dev/sage:0.0.26

What's Changed

Features

Full Changelog: v0.0.25...v0.0.26

Release v0.0.25

Choose a tag to compare

@github-actions github-actions released this 23 Jul 08:20
4b86b0f

Docker Image

ghcr.io/v31-dev/sage:0.0.25

What's Changed

Fixes

Maintenance

Full Changelog: v0.0.24...v0.0.25

Release v0.0.24

Choose a tag to compare

@github-actions github-actions released this 23 Jul 07:57
1766124

Docker Image

ghcr.io/v31-dev/sage:0.0.24

What's Changed

Features

Fixes

Full Changelog: v0.0.23...v0.0.24

Release v0.0.23

Choose a tag to compare

@github-actions github-actions released this 23 Jul 06:52
d86f62c

Docker Image

ghcr.io/v31-dev/sage:0.0.23

What's Changed

Features

Maintenance

Full Changelog: v0.0.22...v0.0.23

Release v0.0.22

Choose a tag to compare

@github-actions github-actions released this 17 Jul 10:37
31502b7

Docker Image

ghcr.io/v31-dev/sage:0.0.22

What's Changed

Fixes

  • Fix race conditions against instant model updates in routes by @sidxdev in #53

Full Changelog: v0.0.21...v0.0.22