feat(decdn_node): add manual local-binary install method - #18
Conversation
Add a `decdn_node_install_method` toggle (release | manual, default release) so operators can deploy locally-built binaries when no GitHub Release exists yet. In manual mode the role copies the decdn-node daemon and decdn CLI verbatim from control-machine paths (decdn_node_manual_bin_src / decdn_cli_manual_bin_src) into place, with copy's checksum idempotency replacing the release version stamp. The version assert is now gated to release mode, a manual-mode assert requires both source paths, and the --version backstop is mode-agnostic (rc != 0 always fails; the version-substring match applies only when a version is set). Templates and the systemd unit are unchanged — both modes land the daemon at decdn_bin. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe Ansible role now supports Changesdecdn-node installation methods
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Operator
participant AnsibleRole
participant GitHubReleases
participant ControlMachine
participant TargetHost
participant DecdnService
Operator->>AnsibleRole: configure install method
alt release
AnsibleRole->>GitHubReleases: fetch pinned tarballs
AnsibleRole->>TargetHost: install binaries and version stamp
else manual
AnsibleRole->>ControlMachine: read local binaries
AnsibleRole->>TargetHost: copy binaries and clear release stamp
TargetHost->>DecdnService: restart service
end
AnsibleRole->>TargetHost: run decdn-node --version
TargetHost-->>AnsibleRole: return status and version output
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
Pull request overview
Adds a second installation path to the ansible/roles/decdn_node role so the daemon/CLI can be deployed before any GitHub Releases exist, while preserving the existing default release-based behavior.
Changes:
- Introduces
decdn_node_install_method(release|manual) plus manual source-path defaults and validation. - Splits install logic into mutually exclusive
releasevsmanualblocks; manual mode copies controller-local binaries with checksum idempotency. - Updates docs/metadata to describe the two install methods and day-2 implications (upgrades + switching hygiene).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ansible/roles/decdn_node/tasks/main.yml | Adds install-method validation and conditional asserts for release vs manual requirements. |
| ansible/roles/decdn_node/tasks/install.yml | Implements manual binary copy path and gates the existing release-tarball workflow by install method. |
| ansible/roles/decdn_node/defaults/main.yml | Adds new defaults for install method and manual binary source paths. |
| ansible/roles/decdn_node/README.md | Documents install methods, prerequisites, and upgrade/switching behavior. |
| ansible/roles/decdn_node/meta/main.yml | Updates role description to reflect the new manual install option. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request introduces a new manual installation method for the decdn_node Ansible role, allowing operators to copy locally-built binaries from the control machine as an alternative to downloading official GitHub releases. The changes include conditional tasks in install.yml, updated configuration assertions in main.yml, and updated documentation. The review feedback suggests a robust improvement: automatically deleting the installed-version stamp file during manual installations to prevent state conflicts when switching back to the release method, along with a corresponding documentation update.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…rding Address PR #18 review: - Manual mode now removes /usr/local/lib/decdn/installed-version so a release -> manual -> release round-trip with an unchanged version always re-fetches the official tarball (was a documented footgun; now automatic). README "Switching methods" simplified accordingly. - The manual-mode assert message referenced `install_method` instead of the real variable `decdn_node_install_method`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
What & why
The
decdn_noderole installed the daemon + CLI only from pinned GitHub Release tarballs — but no release exists yet, so there was no way to deploy the node without first cutting one. This adds a second install method,manual, that copies locally-built binaries from the Ansible control machine. Default staysrelease, so existing inventory (host_vars/decdn-node-1,decdn_node_version: "0.1.0") is unaffected.Changes
defaults/main.yml— newdecdn_node_install_method(release|manual, defaultrelease) +decdn_node_manual_bin_src/decdn_cli_manual_bin_src.tasks/main.yml— validate the method (unconditional, first); gate the version assert torelease; add a manual-mode assert requiring both control-machine paths. The gates are mutually exclusive but jointly exhaustive, so no reachable path skips config validation.tasks/install.yml— wrap the existing release flow in awhen: releaseblock; add a parallelmanualblock thatcopys both binaries (checksum-idempotent,root:root 0755, notifies restart on change only); make the--versionbackstop mode-agnostic (rc != 0always fails; version-substring match only when a version is set).README.md/meta/main.yml— document both methods, manual prerequisites, the no-version-stamp day-2 behavior, and release↔manual mode-switch hygiene.Templates and the systemd unit need no change — both modes land the daemon at
{{ decdn_bin }}, whichExecStartalready references.Verification
yamllint,ansible-lint(production profile), andansible-playbook --syntax-check— clean.changed=0), and the version backstop passes on a working binary with an empty version.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
decdn-nodeusing either pinned release archives or locally supplied binaries.Bug Fixes
Documentation