Repository navigation
feat(ansible): decdn_origin_nodes and the node.yml / publisher.yml entry points - #133
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The publisher option in both setup guides still leads into commands hard-coded for the node-only inventory.
2 open findings
What changed in this PR
Adds distinct Ansible entry points for cache-node operators and publishers while preserving shared deployment behavior.
Changes:
- Adds
node.yml,origin.yml, andpublisher.ymlwith matching Make targets. - Introduces origin inventory groups, examples, and documentation.
- Extends baseline, firewall, and playbook-guard tests.
| File | Description |
|---|---|
tests/scripts-test.sh |
Tests new entry points and origin guards. |
README.md |
Updates Ansible quickstart. |
docs/requirements.md |
Updates inventory reference. |
cloud-init/baseline-plays.awk |
Handles excluded host-pattern terms. |
ansible/tests/playbook-guards/inventory.yml |
Adds origin guard fixtures. |
ansible/tests/firewall-holes/inventory.yml |
Adds origin host shapes. |
ansible/tests/firewall-holes/expected.json |
Defines expected origin firewall holes. |
ansible/tests/firewall-holes/check.sh |
Documents origin firewall coverage. |
ansible/roles/decdn_node/tasks/main.yml |
Corrects cache-origin messaging. |
ansible/roles/decdn_node/README.md |
Documents cache and origin behavior. |
ansible/roles/decdn_node/defaults/main.yml |
Clarifies origin defaults. |
ansible/roles/baseline/README.md |
Updates inventory reference. |
ansible/README.md |
Documents persona entry points. |
ansible/playbooks/site.yml |
Composes node and publisher playbooks. |
ansible/playbooks/publisher.yml |
Adds publisher orchestration. |
ansible/playbooks/origin.yml |
Adds guarded origin deployment. |
ansible/playbooks/node.yml |
Adds cache-node deployment. |
ansible/playbooks/group_vars/decdn_origin_nodes.yml |
Applies shared firewall rules to origins. |
ansible/playbooks/group_vars/all.yml |
Documents origin firewall inheritance. |
ansible/Makefile |
Adds persona deployment targets. |
ansible/inventory/hosts-publisher.yml.example |
Adds publisher inventory template. |
ansible/inventory/hosts-node.yml.example |
Narrows node inventory template. |
ansible/inventory/host_vars/origin-1/secret.yml.example |
Adds origin secret template. |
ansible/inventory/host_vars/origin-1/main.yml |
Adds origin host configuration. |
ansible/inventory/host_vars/decdn-node-1/main.yml |
Converts example to a pure cache. |
ansible/inventory/group_vars/iroh_relay_hosts.yml |
Updates publisher inventory reference. |
ansible/inventory/group_vars/iroh_dns_server_hosts.yml |
Updates publisher inventory reference. |
ansible/inventory/group_vars/decdn_origin_nodes.yml |
Documents shared origin configuration. |
ansible/inventory/group_vars/decdn_nodes.yml |
Clarifies cache/origin inheritance. |
ansible/galaxy/node/CHANGELOG.md |
Records corrected origin semantics. |
ansible/.gitignore |
Documents split inventory templates. |
AGENTS.md |
Records the new deployment architecture. |
.github/workflows/ci.yml |
Updates inventory-template commentary. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This was referenced Oct 10, 2026
thiras
force-pushed
the
feat/origin-nodes-entry-points
branch
from
October 10, 2026 16:43
d5960bc to
d9a75ed
Compare
…try points Node operators run cache nodes; publishers run origin nodes and the services around them. The playbooks now have an entry point per persona: node.yml (`make deploy-node`, decdn_nodes:!decdn_origin_nodes) and publisher.yml (`make deploy-publisher`: origin.yml, sponsord.yml, iroh_relay.yml, iroh_dns_server.yml). site.yml imports both, and `make deploy` still deploys everything. Origins are decdn_origin_nodes, a child of decdn_nodes, so they keep the node's firewall hole, backup, decommission, relay allowlist and Alloy scrape. origin.yml refuses an origin outside decdn_nodes or without an origin backend; node.yml warns about a backend outside the group. The group checks live in the playbooks, not the role. baseline-plays.awk counts a play for the positive terms of its host pattern only. The inventory example splits into hosts-node.yml.example (a cache node, no origin backend) and hosts-publisher.yml.example (origin-1, plus the sponsord, relay and DNS blocks). The decdn_node docs no longer say a serving node needs an origin: without one it fills misses from other nodes (ADR 001's pure caches). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mespaces The relay_foreign_namespaces gate is backend-authoritative (ADR 002, Retrieval by namespace): an origin-configured node serves only what its own backend holds and declines the rest, whatever the request's namespace. The comments and AGENTS.md said it served only the namespaces it is an origin of. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both quickstarts offered the publisher inventory, whose host is origin-1, then hard-coded decdn-node-1 in every following command. A HOST variable now carries the example's host through them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
thiras
force-pushed
the
feat/origin-nodes-entry-points
branch
from
October 10, 2026 17:10
d9a75ed to
c4009a9
Compare
2 tasks done
thiras
added a commit
that referenced
this pull request
Oct 10, 2026
…EADMEs (#136) * docs: link the node and origin playbooks from the Compose and chart READMEs Review dropped these links while node.yml, origin.yml and decdn_origin_nodes were in another PR (#133); they are on main now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: name decdn_nodes membership for origins, and where the backend goes Review of #136: the chart's origin sentence left out that origin.yml requires the host in decdn_nodes; the Compose node row now says node.yml skips origins; and the publisher inventory example's parenthetical read as if group_vars did the refusing, when it is where the backend goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Stacked on #130. Merge that first; this PR's base then moves to
main.deCDN has two kinds of operators: node operators, who run nodes, and publishers, who run origin nodes and the services around them. This PR gives each its own entry point:
node.yml(new)make deploy-nodedecdn_nodes:!decdn_origin_nodespublisher.yml(new)make deploy-publisherorigin.yml→sponsord.yml→iroh_relay.yml→iroh_dns_server.ymlorigin.yml(new)make deploy-origindecdn_origin_nodessite.ymlmake deploy(unchanged)node.ymlthenpublisher.ymldecdn_origin_nodesis a child ofdecdn_nodes. Origins therefore keep the node's udp/4433 hole, backup, decommission, relay allowlist and Alloy scrape. Each node is deployed once undersite.yml.origin.yml'spre_tasksrefuse an origin outsidedecdn_nodesor without an origin backend.node.ymlwarns about a backend on a host outside the group.sponsord.yml's.baseline-plays.awknow counts a play for the positive terms of its host pattern only. Without that, cloud-init's baseline guard would see nodecdn_nodesplay.hosts.yml.examplesplits intohosts-node.yml.example(decdn-node-1, now a pure cache) andhosts-publisher.yml.example(origin-1plus the sponsord, relay and DNS blocks). New files:inventory/group_vars/decdn_origin_nodes.yml,host_vars/origin-1/, andplaybooks/group_vars/decdn_origin_nodes.yml.decdn_nodedocs and assert message no longer say "a serving node needs an origin". ADR 001 has origin-backed nodes and pure caches. The role already derives node-to-node pull-through for a node without an origin.Test plan
make test-scripts. New cases:check/deploy-{node,origin,publisher};decdn_cache_origin_kindordecdn_cache_origins; refuses an orphan or a missing backend);node.yml's warning, and that its play skips origins;baseline-plays.awkfixtures with an exclusion pattern;node.yml,origin.ymlandsponsord.yml.make lint,make lint-ansiblemake molecule SCENARIOS='cloud-init cloud-init-sponsord'(real boots through the newsite.yml)Downstream (internal-devops)
Re-sync:
playbooks/{node,origin,publisher,site}.ymlandplaybooks/group_vars/{all,decdn_origin_nodes}.yml;ansible/Makefiletargets and their guard lists;cloud-init/baseline-plays.awk.Then move origin-configured hosts under
decdn_origin_nodes. Until thennode.ymlwarns about them andpublisher.ymlskips them.🤖 Generated with Claude Code