Skip to content

feat(spored): ship Windows spored via S3 + install at launch (#77 stage 4) - #87

Merged
scttfrdmn merged 1 commit into
mainfrom
feat/77-windows-spored-stage4
Jun 8, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
feat/77-windows-spored-stage4

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Summary

Stage 4 of Windows spored (#77): Windows spored now deploys exactly like the Linux agent — built by GoReleaser, uploaded to the same regional S3 buckets, and installed at instance boot. (Directly addresses the "deploy via S3 like Linux" requirement.)

  • .goreleaser.yaml: spored build adds goos: windows (amd64; windows/arm64 ignored).
  • release workflow: uploads spored-windows-amd64.exe (+ .sha256) to every spawn-binaries-<region> bucket — project-prefixed, root, and versioned paths, mirroring the Linux spored upload.
  • scripts/install-spored.ps1: the Windows counterpart of install-spored.sh — IMDSv2 region detect, S3 download with regional→us-east-1 fallback, then spored service install/start.
  • cmd/launch.go buildWindowsUserData: the EC2Launch <powershell> block now also downloads spored.exe from the regional bucket and installs the service at boot (instance role carries S3 read), so a launched Windows instance self-manages in-instance — no longer dependent solely on the reaper.
  • windowsLifecycleGuard relaxed: idle/completion/pre-stop work in-instance now (Stage 3), so --idle-timeout is accepted (not just --ttl); still require one timeout, reaper backstops the deadline.
  • Makefile build-windows-amd64 also builds spored-windows-amd64.exe.

Verification

GOOS=windows + host build clean; make check green; guard test updated (idle now allowed). install-spored.ps1 parse-verified on real Windows 11 (zero parser errors). The actual S3 download + service install on a live instance is Stage 5 (after the windows binary ships in the v0.38.0 release).

Refs #77. Next (Stage 5): cut v0.38.0 so spored-windows-amd64.exe lands in S3, then launch a real Windows EC2 instance and verify the full in-instance lifecycle (boot→install→monitor→TTL/idle/completion self-terminate).

…ge 4)

Windows spored now deploys exactly like the Linux agent — built by GoReleaser,
uploaded to the same regional S3 buckets, and installed at instance boot.

- .goreleaser.yaml: spored build adds goos windows (amd64; windows/arm64 ignored).
- release workflow: uploads spored-windows-amd64.exe (+ .sha256) to every
  spawn-binaries-<region> bucket — project-prefixed, root, and versioned paths,
  mirroring the Linux spored upload.
- scripts/install-spored.ps1: the Windows counterpart of install-spored.sh —
  IMDSv2 region detect, S3 download with regional→us-east-1 fallback, then
  `spored service install/start` (auto-start + on-failure restart).
- cmd/launch.go buildWindowsUserData: the EC2Launch <powershell> block now also
  downloads spored.exe from the regional bucket and installs the service at
  boot (instance role carries S3 read), so a launched Windows instance
  self-manages in-instance — no longer dependent solely on the reaper.
- windowsLifecycleGuard relaxed: idle/completion/pre-stop work in-instance now,
  so --idle-timeout is accepted (not just --ttl); still require one timeout and
  the reaper backstops the deadline.
- Makefile build-windows-amd64 also builds spored-windows-amd64.exe.

GOOS=windows + host build clean; make check green; install-spored.ps1
parse-verified on real Windows 11. (The actual S3 download + service install on
a live instance is exercised in Stage 5 after the windows binary ships.)

Refs #77.
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 99fd6a1 into main Jun 8, 2026
3 checks passed
@scttfrdmn
scttfrdmn deleted the feat/77-windows-spored-stage4 branch June 8, 2026 22:43
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.

1 participant