Create common onboarding library to eliminate edge deployment friction #635
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar#635
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from GitHub.
Original GitHub issue: #1915
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/issues/1915
Original created: 2025-10-31T20:55:09Z
Problem Statement
The current edge onboarding process requires extensive manual intervention through shell scripts, kubectl commands, and configuration manipulation. This creates significant friction for edge deployments and doesn't scale for production use.
Current Pain Points:
setup-edge-e2e.sh,edge-poller-restart.sh,setup-edge-poller.sh,refresh-upstream-credentials.sh)See detailed analysis in:
docker/compose/edge-e2e/FRICTION_POINTS.mdIMPORTANT SCOPE: This is ONLY for edge service onboarding. k8s and main docker-compose stack already have working SPIFFE enrollment via SPIFFE controller and CRDs - those are NOT being changed.
Vision
Create a common onboarding library (
pkg/edgeonboarding) that edge ServiceRadar components (agent, poller, checkers) can use to automatically onboard using a simple token-based flow.Desired User Experience
For Edge Poller/Agent:
For Edge Checkers:
The library handles everything:
Proposed Architecture
1. Common Onboarding Library
Package:
pkg/edgeonboardingCore Interface:
Deployment Type Detection:
Sticky vs Dynamic Config:
2. Automatic Poller Registration via KV
KV/Database-based approach (NOT ConfigMaps):
isKnownPoller()in Core to checkedge_packagestable via KVallowed_poller_idcolumn toedge_packagestableallowed_poller_id = poller_id_override OR component_idKey Point: ConfigMaps are legacy. Everything dynamic should be in KV (datasvc).
3. Separate Docker Compose Stacks
Strategy: Keep main stack clean, create dedicated edge stacks
edge-poller-stack.compose.yml(already exists aspoller-stack.compose.yml):edge-checker-stack.compose.yml(new):main docker-compose.yml:k8s deployments:
4. Simplified Package Management
Add CLI commands (extends existing serviceradar-cli):
Fix API authentication:
Implementation Plan
Phase 1: Core Library (Week 1-2)
pkg/edgeonboardingpackagePhase 2: KV-backed Registration (Week 2)
allowed_poller_idcolumn toedge_packagestableallowed_poller_idisKnownPoller()to check KV/databasePhase 3: Service Integration (Week 3)
ONBOARDING_TOKENenvironment variable supportPhase 4: Stack Reorganization (Week 3-4)
edge-checker-stack.compose.ymledge-poller-stack.compose.ymlto use librarydocker-compose.ymlhas no edge logicPhase 5: CLI and API Improvements (Week 4)
serviceradar-cli edgecommandsPhase 6: Cleanup and Documentation (Week 4-5)
setup-edge-e2e.sh, etc.)Success Criteria
Deployment Simplicity:
Automation:
Scalability:
Code Quality:
Architecture:
Out of Scope (Future Work)
Related Issues
docker/compose/edge-e2e/FRICTION_POINTS.mdFiles Impacted
New:
pkg/edgeonboarding/- Core librarydocker/compose/edge-checker-stack.compose.yml- New checker-only stack for edgeModified:
pkg/db/edge_packages.go- Addallowed_poller_idcolumnpkg/core/pollers.go- UpdateisKnownPoller()to check KV/databasedocker/compose/edge-poller-stack.compose.yml- Use onboarding library (edge only)NOT Modified:
docker-compose.yml(main) - No edge logic addedRemoved (after migration):
docker/compose/setup-edge-e2e.shdocker/compose/edge-poller-restart.shdocker/compose/setup-edge-poller.shdocker/compose/refresh-upstream-credentials.shdocker/compose/edge-e2e/directory (documentation moves to main docs)🤖 Generated with Claude Code
Imported GitHub comment.
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/issues/1915#issuecomment-3477243000
Original created: 2025-11-02T02:40:02Z
Progress Update: Service Device Registration
Completed foundational work for service component visibility and lifecycle management - a prerequisite for the common onboarding library.
What Was Done
Implemented comprehensive device registration system so that pollers, agents, and checkers appear as distinct devices in the inventory, even when running on the same IP address.
Key Features:
serviceradar:service_type:service_idThis Enables:
Impact on Onboarding Library
This work addresses the "Auto-register with Core via KV (datasvc)" step mentioned in the Bootstrap() function design. When the common onboarding library is implemented, it can rely on these registration mechanisms:
Files Created/Modified
See detailed comment on #1909 for full file list. Key additions:
pkg/models/service_device.gopkg/models/service_registration.gopkg/core/pollers.goandpkg/core/services.gopkg/core/edge_onboarding.goRelated Work
🤖 Generated with Claude Code