Skip to content

feat(cloud-init): user-data-node.yaml and user-data-publisher.yaml with an origin node - #134

Merged
thiras merged 2 commits into
mainfrom
feat/cloud-init-personas
Oct 10, 2026
Merged

thiras merged 2 commits into
mainfrom
feat/cloud-init-personas

Conversation

@thiras

@thiras thiras commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Stacked on #133 (which is stacked on #130). One cloud-init template per kind of operator:

  • user-data.yaml → user-data-node.yaml for node operators: a cache node.
  • user-data-sponsord.yaml → user-data-publisher.yaml for publishers: an origin node, sponsord and its onramp on one VM. Each group can be deleted.
    • localhost is in decdn_nodes and decdn_origin_nodes as siblings, because the lint refuses children:.
    • The template ships an http origin backend to fill in.

bootstrap.sh:

  • refuses an origin outside decdn_nodes;
  • checks an origin's baseline play as decdn_origin_nodes, because its play is origin.yml's, not node.yml's decdn_nodes:!decdn_origin_nodes;
  • tells an S3 origin that its keys go in decdn.env;
  • gives decdn_origin_nodes no secrets of its own.

lint.py:

  • refuses an origin without decdn_nodes;
  • refuses an origin with no backend in decdn_origin_nodes.vars.

Molecule: cloud-init-sponsord is renamed cloud-init-publisher. It now also boots the origin node:

  • the decdn/decdn and decdn/sponsord stub releases are served under their own mirror bases;
  • a new refusal case covers an origin outside decdn_nodes;
  • the node's secret is added to the gate assertions;
  • verify checks decdn-node is running and that node.toml's [cache.origin] is the configured http backend.

Test plan

  • make lint-cloud-init
  • make test-scripts. New lint negatives: origin without decdn_nodes, origin without a backend, origin node from source, S3 keys in the origin vars. Plus baseline-plays.sh on the publisher template's host, and the relaxed hint-arm check.
  • make lint, ansible-lint
  • make molecule SCENARIOS='cloud-init cloud-init-publisher': both 7/7

Downstream

internal-devops: a renamed molecule scenario or template that it references needs the same rename.

🤖 Generated with Claude Code

Copilot AI balanced review requested due to automatic review settings October 10, 2026 16:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Origin linting accepts incomplete backends, and two operator-facing instructions are misleading.

2 open findings
What changed in this PR

Introduces operator-specific cloud-init paths for cache-node and publisher deployments, with publisher hosts now including an origin node.

Changes:

  • Renames cloud-init templates and Molecule coverage around node/publisher personas.
  • Adds origin inventory validation, secret gating, and deployment coverage.
  • Updates documentation, CI references, and script tests.
File Description
tests/​scripts-test.sh Updates template names and origin checks.
README.md Documents the new templates.
Makefile Updates cloud-init lint inputs.
CONTRIBUTING.md Updates command and scenario documentation.
cloud-init/​user-data-publisher.yaml Adds the publisher origin node inventory.
cloud-init/​user-data-node.yaml Reframes the node template as cache-only.
cloud-init/​tests/​lint.py Adds origin membership and backend validation.
cloud-init/​README.md Documents publisher deployment and secrets.
cloud-init/​bootstrap.sh Adds origin membership, baseline, and secret handling.
ansible/​roles/​sponsord/​README.md Renames publisher Molecule coverage.
ansible/​roles/​sponsord_onramp/​README.md Renames publisher Molecule coverage.
ansible/​README.md Updates scenario naming.
ansible/​molecule/​cloud-init/​prepare.yml Updates shared-scenario references.
ansible/​molecule/​cloud-init/​molecule.yml Updates node template references.
ansible/​molecule/​cloud-init/​includes/​refuse.yml Updates publisher scenario references.
ansible/​molecule/​cloud-init/​converge.yml Boots the renamed node template.
ansible/​molecule/​cloud-init-publisher/​verify.yml Verifies the origin node and backend.
ansible/​molecule/​cloud-init-publisher/​side_effect.yml Tests origin guards and node secrets.
ansible/​molecule/​cloud-init-publisher/​prepare.yml Creates separate signed release mirrors.
ansible/​molecule/​cloud-init-publisher/​molecule.yml Defines publisher scenario behavior.
ansible/​molecule/​cloud-init-publisher/​converge.yml Boots and configures the publisher template.
ansible/​Makefile Renames the slow Molecule scenario.
AGENTS.md Updates repository cloud-init guidance.
.github/​workflows/​molecule.yml Updates scenario timing documentation.
.github/​workflows/​ci.yml Updates cloud-init CI documentation.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread cloud-init/tests/lint.py
Comment thread cloud-init/bootstrap.sh Outdated
@thiras
thiras force-pushed the feat/origin-nodes-entry-points branch from d5960bc to d9a75ed Compare October 10, 2026 16:43
@thiras
thiras force-pushed the feat/cloud-init-personas branch from 1818a58 to 799ba39 Compare October 10, 2026 16:45
@thiras
thiras force-pushed the feat/origin-nodes-entry-points branch from d9a75ed to c4009a9 Compare October 10, 2026 17:10
@thiras
thiras force-pushed the feat/cloud-init-personas branch from 799ba39 to c2c5729 Compare October 10, 2026 17:10
Base automatically changed from feat/origin-nodes-entry-points to main October 10, 2026 17:38
thiras and others added 2 commits October 10, 2026 20:38
…th an origin node

One template per kind of operator. user-data.yaml becomes
user-data-node.yaml (node operators: a cache node), and
user-data-sponsord.yaml becomes user-data-publisher.yaml (publishers: an
origin node, sponsord and its onramp on one host, each group deletable).

The publisher template lists localhost in decdn_nodes and
decdn_origin_nodes as siblings, with an http origin backend to fill in.
bootstrap.sh learns the group: it refuses an origin outside decdn_nodes,
checks an origin's baseline play as decdn_origin_nodes (its play is
origin.yml's, not node.yml's), and tells an S3 origin where its keys go.
lint.py refuses an origin without decdn_nodes or without a backend. The
cloud-init-sponsord scenario becomes cloud-init-publisher and boots the
origin too, from a decdn/decdn and a decdn/sponsord release under their
own mirror bases, and checks the backend in node.toml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the S3 key hint

lint.py took any non-empty decdn_cache_origin_kind (or list) as a
backend, so a typo'd kind, an http origin without its URL or an empty
list entry passed and failed only after the host waited for its secrets.
It now checks each kind's required fields, as roles/decdn_node does. The
login hint printed the two AWS keys on one line, which is one invalid
entry in an EnvironmentFile; it now prints one per line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thiras
thiras force-pushed the feat/cloud-init-personas branch from c2c5729 to 88accfa Compare October 10, 2026 17:38
@thiras
thiras merged commit 97eedad into main Oct 10, 2026
54 checks passed
@thiras
thiras deleted the feat/cloud-init-personas branch October 10, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants