Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,18 @@ jobs:
path: dist
merge-multiple: true

- name: Stamp manifest version
# pdn-app.yaml's `version:` field is informational (pdn shows it
# in its UI) and should track the release tag. Stamp it into the
# copy we attach so the asset always matches the release it
# ships with; the repo copy stays as-is.
run: |
sed -i 's/^version: .*/version: "${{ needs.test.outputs.version }}"/' pdn-app.yaml
grep '^version:' pdn-app.yaml

- name: Create GitHub Release
# pdn-app.yaml rides along as a release asset so the pdn build
# can fetch manifest + binary from the same release.
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -256,4 +267,5 @@ jobs:
--title "$tag" \
--target "${{ github.sha }}" \
--generate-notes \
dist/*
dist/* \
pdn-app.yaml
2 changes: 2 additions & 0 deletions docs/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Every operator-tunable setting on a DAPPS node has three configuration surfaces:

For runtime-changeable knobs (probing on/off, fragment threshold, airtime budget, etc.), the dashboard is the right surface - changes pick up without a restart. For startup-only knobs (callsign, packet-node host/port, MQTT port, dashboard URL), the env var is the right surface - they're read once at boot.

> **Deployment-managed mode (`DAPPS_ENV_MANAGED=true`)**: when a supervising deployment (a packet.net node host, say) sets `DAPPS_ENV_MANAGED=true`, every *set* `DAPPS_*` env var becomes deployment-managed config instead - re-applied over the persisted row at **every** start, with the matching dashboard fields badged "managed by environment" and rendered read-only. `DAPPS_ENV_MANAGED` itself is a mode switch read each start, never stored. Leave it unset for the standalone installs documented here: with it unset (or `false`) env vars keep the first-start-only semantics above and the dashboard stays in charge.

## Show the current persisted config

```bash
Expand Down
41 changes: 28 additions & 13 deletions pdn-app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
# deb from this repo's published release binary) or /var/lib/packetnet/apps/dapps
# (owner-installed), and the app stays OFF until the node owner enables it.
#
# A future dapps release workflow should attach this file as a release asset
# (next to the dapps-linux-* binaries) so pdn's build can fetch manifest +
# binary together from one release instead of carrying an interim copy.
# The release workflow attaches this file as a release asset (next to the
# dapps-linux-* binaries, with `version:` stamped to the release tag) so pdn's
# build can fetch manifest + binary together from one release.
manifest: 1
id: dapps # must equal the package directory name
name: DAPPS
version: "0.33.12" # informational, shown in pdn's UI — should track the release tag
version: "0.34.0" # informational, shown in pdn's UI — should track the release tag
description: Distributed Asynchronous Packet Pub/Sub — store-and-forward messaging over packet radio.
icon: inbox
capabilities: [network, web] # binds its own callsigns over RHPv2; serves its own web UI
Expand All @@ -21,26 +21,41 @@ capabilities: [network, web] # binds its own callsigns over RHPv2; serves its o
# DAPPS is not a console verb; it speaks RHPv2 to the node and binds its own
# callsigns.
#
# FIRST-START SEEDING — read before enabling: DAPPS seeds its config from
# DAPPS_* env vars ONLY on first start (a fresh data/dapps.db in the working
# directory). Once the db exists, env vars stop mattering — later changes go
# through the DAPPS dashboard's /Setup // /Config pages, or by deleting the db
# to re-seed. In particular the owner MUST supply their callsign via pdn's
# `apps:` override environment BEFORE the first start (there is no sensible
# default — DAPPS boots in setup-required mode with the N0CALL placeholder and
# refuses to bind bearers until a real callsign is configured):
# CONFIG SEEDING — how DAPPS_* env vars behave: DAPPS has two modes, switched
# by DAPPS_ENV_MANAGED (read each start, never stored):
#
# - unset/false (the standalone default): env vars seed missing options on
# first start only; thereafter the dashboard owns every value.
# - "true" (set below — pdn-supervised deployments opt in): every set
# DAPPS_* env var is deployment-managed config — re-applied over whatever
# the dashboard stored at EVERY start, and badged read-only in the
# dashboard. Unset variables never touch stored config: anything not
# pinned below stays editable live through the DAPPS dashboard's
# /Setup // /Config pages, exactly as standalone.
#
# CALLSIGN — no pre-set needed: pdn injects PDN_NODE_CALLSIGN, and while no
# real callsign is configured DAPPS derives its own identity as
# <node-base-callsign>-<DAPPS_SSID> (DAPPS_SSID defaults to 7, so node M0XYZ
# gets DAPPS at M0XYZ-7). If that SSID is already claimed on the node (pdn
# refuses the listen with errCode 9 "Duplicate socket"), DAPPS probes the
# next free SSID over RHPv2 (skipping 0 and the node's own SSID) and keeps
# the first one that binds — the confirmed identity is then stable across
# restarts. The owner can still pin a different identity via pdn's `apps:`
# override environment — an explicit DAPPS_CALLSIGN (or a real callsign saved
# via the dashboard) always wins over derivation and never probes:
#
# apps:
# - id: dapps
# enabled: true
# environment:
# DAPPS_CALLSIGN: M0XYZ-7
# DAPPS_CALLSIGN: M0XYZ-9 # optional — omit to accept <nodecall>-7
#
# The working directory defaults to the app's state dir, so the database lands
# in /var/lib/packetnet/apps/dapps (DAPPS resolves it cwd-relative).
service:
command: ./dapps # relative — resolves to the release binary in this package dir
environment:
DAPPS_ENV_MANAGED: "true" # opt in: env vars below are re-applied at every start
DAPPS_NODE_BEARER: rhpv2 # speak RHPv2 to pdn (not AGW)
DAPPS_NODE_HOST: "127.0.0.1"
DAPPS_RHP_PORT: "9000" # pdn's RHP server loopback port
Expand Down
2 changes: 1 addition & 1 deletion src/dapps/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Release already exists for v$(Version). Bump this in the same
PR as the change you want released.
-->
<Version>0.33.12</Version>
<Version>0.34.0</Version>

<!--
sqlite-net-pcl 1.9.x ships a SQLitePCLRaw.lib.e_sqlite3 that lists
Expand Down
Loading
Loading