Organization registry managing customers and agencies in the Hydra platform.
| Domain | hydraorganization.experiencenet.com |
| Edge | 141.227.136.199 (traefik + hydrascalerouter) |
| Scale | Incus scale hydraorganization on pi-node-004-nvme (mesh 10.10.100.18, host port 30001) |
| Config + data | /root/.hydraorganization inside the scale, backed by /srv/scales/hydraorganization on the node |
| Image | scaleregistry.experiencenet.com/hydraorganization:{tag} (multi-arch, HYDRA_AUTO_UPDATE=off) |
| Update | tag a release, let CI publish the image, then hydraskin update hydraorganization --tag vX.Y.Z (dry run) and --apply on pi-node-004-nvme over the hydracluster exec transport |
| Health | GET /api/v1/health |
The dedicated host at 46.225.184.72 (systemd install) is retired; the service moved to the scale on 2026-08-25.
curl -s https://hydraorganization.experiencenet.com/api/v1/health
The response includes the service version and the current count of organizations stored.
All mutating endpoints (POST, PUT, DELETE) require a bearer token in the Authorization header. Read endpoints (GET) do not require auth.
| Method | Path | Auth | Description |
|---|---|---|---|
GET |
/api/v1/health |
No | Service health and organization count |
GET |
/api/v1/runbook |
No | This runbook (served as Markdown) |
GET |
/api/v1/events |
Yes | SSE stream of organization change events |
GET |
/api/v1/organizations |
No | List all organizations (optional ?type= filter) |
GET |
/api/v1/organizations/{id} |
No | Get a single organization by ID |
GET |
/dashboard |
No | Org-owner dashboard, live data (see below) |
GET |
/api/v1/organizations/{id}/overview |
No | Dashboard aggregate as JSON; 404 for any org but the configured one |
POST |
/api/v1/organizations |
Yes | Create a new organization |
PUT |
/api/v1/organizations/{id} |
Yes | Update an existing organization |
DELETE |
/api/v1/organizations/{id} |
Yes | Delete an organization |
curl -X POST https://hydraorganization.experiencenet.com/api/v1/organizations \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"id": "visit-flanders",
"name": "Visit Flanders",
"type": "customer",
"description": "Flemish tourism board",
"contact_name": "Jane Doe",
"contact_email": "jane@visitflanders.com"
}'
The id field is required and must be unique. The name field is required. The type field accepts any string; the conventional values are customer (end users operating venues) and agency (content creators submitting builds).
curl -s https://hydraorganization.experiencenet.com/api/v1/organizations/visit-flanders
curl -s https://hydraorganization.experiencenet.com/api/v1/organizations | jq .
Filter by type:
curl -s "https://hydraorganization.experiencenet.com/api/v1/organizations?type=customer" | jq .
curl -X PUT https://hydraorganization.experiencenet.com/api/v1/organizations/visit-flanders \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Visit Flanders",
"type": "customer",
"contact_email": "new-contact@visitflanders.com"
}'
curl -X DELETE https://hydraorganization.experiencenet.com/api/v1/organizations/visit-flanders \
-H "Authorization: Bearer <token>"
A successful delete returns HTTP 204 with no body.
/dashboard renders the org-owner dashboard. It reads live data when the dashboard config block is present, and falls back to example data otherwise. ?mock=1 forces the example data.
Where each number comes from (internal/dashboard/live.go):
| Panel | Source | Auth |
|---|---|---|
| Venue roster | hydravenues GET /api/v1/venues?organization= |
none |
| District names | hydravenues GET /api/v1/districts |
none |
| Heads per venue | hydracluster GET /api/v1/heads |
admin token |
| Bodies per venue | hydracluster GET /api/v1/nodes, role hydrabody |
admin token |
| Experiences | hydraexperiencelibrary GET /api/v1/experiences, joined on venue id |
admin token |
| Reliability | hydrastreamingmonitor GET /api/v1/intelligence and GET /api/v1/health |
none |
What is deliberately absent. Session counts, streamed time and visitor ratings are not shown, because nothing records them per venue today. Streaming sessions carry no venue and survive only in an in-memory ring (#595); hydranps holds 208 records of which one has a score and none has a venue (#565). The struct uses pointers and Known flags for these, so an absent value is never serialised as a confident zero.
Reliability needs both monitor calls. intelligence only counts an outage once it closes, so a service that is down right now reports full uptime. The provider cross-checks health and drops the percentages for any service that is currently down.
The fleet join is by venue id string. hydracluster node.venue is free text and nothing enforces it against the hydravenues ids. Any cluster venue value matching no venue in the roster is logged (dashboard: cluster venue values not in any roster), so drift shows up in the log before it shows up as a wrong number (#594).
Degradation. Each source has its own timeout. A source that fails degrades only its own panel and is reported in the page footer and in sources[] in the JSON. If the venue roster itself fails there is no dashboard, and the page says so.
Access and org scoping. Setting iamnim.base_url turns on login and per-org scoping:
/dashboard requires a session; without one it redirects to /dashboard/login, which sends the person to iamnim./dashboard/authed catches the returning session, moves it into an HttpOnly Secure SameSite=Lax cookie, and redirects in one hop so nothing credential-shaped stays in the address bar, in history, or in a Referer. iamnim returns the session as a query parameter today; the one-time code exchange that removes that entirely is #591.?org=<slug> is validated against membership and never trusted. More than one membership renders an org switcher; none renders a plain "no access" page that deliberately does not name any org.GET /api/v1/organizations/{id}/overview answers 401 rather than redirecting, so a machine client gets a usable error.Authorization is membership and nothing else, because Pantheon has no role model.
Leaving iamnim.base_url out keeps the dashboard PUBLIC, pinned to dashboard.org_id. That is how it ships today, and the page then serves live operational data to anyone: venue names, heads and bodies online per venue, and experience placement. The venue roster and reliability were already public from their own services; the per-venue fleet posture was not.
Grant the membership before turning auth on. A person with no Pantheon membership sees the "no access" page, so enabling auth without a membership locks out the intended reader. The org and membership are ops work in #590. Order: the person signs into iamnim once so their user record exists in realm r_349832f91720, then the org is created with the slug matching the hydraorganization org id, then the membership is granted, then iamnim.base_url goes into the config.
Experiences answer "deployed at your venues", not "owned by you". hydraexperiencelibrary has no organization link (#593), so the join is on venue id. An experience another org places at a shared venue appears here.
HydraOrganization is a Go service (Cobra CLI + YAML store + systemd) that acts as the central registry for organizations in the Hydra platform.
YAML store: organization records live in /root/.hydraorganization/. The store has two layers:
organizations.yaml -- index file with lightweight entries (id, name, type, timestamps) used for fast listingorganizations/<id>/organization.yaml -- full per-organization record including description and contact fieldsAll writes use atomic rename (write to .tmp then rename into place) to prevent partial writes from corrupting the store.
Auth: mutating endpoints are protected by a static bearer token configured in config.yaml under server.admin_token. Token validation is handled by hydraauth.
SSE events: every create, update, and delete emits a server-sent event on /api/v1/events. Downstream services (HydraPipeline, HydraVenues) subscribe to this stream to react to organization changes.
Auto-updates: on startup the service registers a background poller that checks releases.experiencenet.com every 6 hours. If a newer version is available it downloads, replaces the binary, and restarts via systemd. Setting HYDRA_AUTO_UPDATE=off skips the poller entirely (logged as Auto-update: disabled (HYDRA_AUTO_UPDATE=off)); the container image sets this, since there the image is the unit of update and there is no systemd unit to restart.
Container image: v* tags also publish a multi-arch (amd64 + arm64) OCI image to scaleregistry.experiencenet.com/hydraorganization:<tag> and :latest. It runs serve --dev --listen :8080 — plain HTTP, with TLS terminated upstream — and expects /root/.hydraorganization to be supplied as an Incus disk device (or a Docker bind mount); the image deliberately declares no VOLUME, because Incus's OCI runtime cannot satisfy an anonymous volume and the container would fail to start.
TLS: production mode uses autocert (Let's Encrypt) with the certificate cache at /root/.hydraorganization/certs.
ssh root@46.225.184.72 systemctl status hydraorganization
ssh root@46.225.184.72 journalctl -u hydraorganization -f
Show last 100 lines:
ssh root@46.225.184.72 journalctl -u hydraorganization -n 100 --no-pager
ssh root@46.225.184.72 systemctl restart hydraorganization
ssh root@46.225.184.72 hydraorganization version
Never manually deploy. Use the release pipeline:
git -C /home/claude-user/hydraorganization tag v<X.Y.Z>git -C /home/claude-user/hydraorganization push origin v<X.Y.Z>releases.experiencenet.com.ssh root@46.225.184.72 hydraorganization updatehydrarelease verify --project hydraorganizationIf the YAML store becomes corrupted (partial writes, disk issues):
ssh root@46.225.184.72 systemctl stop hydraorganizationssh root@46.225.184.72 ls -la /root/.hydraorganization/ssh root@46.225.184.72 cat /root/.hydraorganization/organizations.yaml.tmp files left by a crashed write: ssh root@46.225.184.72 find /root/.hydraorganization -name '*.tmp'.tmp files: ssh root@46.225.184.72 find /root/.hydraorganization -name '*.tmp' -deletessh root@46.225.184.72 systemctl start hydraorganizationssh root@46.225.184.72 journalctl -u hydraorganization -n 50 --no-pagerssh root@46.225.184.72 cat /root/.hydraorganization/config.yamlserver.admin_token is set in the config -- the service refuses to start without itssh root@46.225.184.72 ss -tlnp | grep 443ssh root@46.225.184.72 ls -la $(which hydraorganization)ssh root@46.225.184.72 hydraorganization servecurl -s https://hydraauth.experiencenet.com/api/v1/verify -H "Authorization: Bearer <token>"ssh root@46.225.184.72 curl -s https://hydraauth.experiencenet.com/api/v1/healthssh root@46.225.184.72 dateIf a venue's organization_id points to a deleted organization:
curl -s https://hydraorganization.experiencenet.com/api/v1/organizations | jq .If downstream subscribers (HydraPipeline, HydraVenues) stop receiving organization events:
curl -s -N -H "Authorization: Bearer <token>" https://hydraorganization.experiencenet.com/api/v1/eventsssh root@46.225.184.72 systemctl restart hydraorganizationHetzner automated daily server snapshots are enabled on hydraorganization (46.225.184.72), context hydraexperiencenet. Backup window: 22:00--02:00 UTC, 7-day retention.
The snapshot covers the entire server disk, including:
/root/.hydraorganization//root/.hydraorganization/config.yaml/root/.hydraorganization/certs/usr/local/bin/hydraorganizationhydraexperiencenet project.ssh root@46.225.184.72 poweroff).curl -s https://hydraorganization.experiencenet.com/api/v1/health
curl -s https://hydraorganization.experiencenet.com/api/v1/organizations | jq 'length'