Skip to content

Add Edge Agent Installation and Auto-Update System #4

@mihai-chiorean

Description

@mihai-chiorean

Description

Add support for installing and automatically updating the edge-agent binary from GitHub releases.

Components Needed

  1. Build-time download script - Downloads initial binary during image creation
  2. Runtime updater service - Updates binary when internet available
  3. Systemd services - Manages agent lifecycle

Recipe Structure

recipes-core/edge-agent/
├── edge-agent.bb
├── files/
│   ├── edge-agent.service
│   ├── edge-agent-running.service
│   ├── edge-agent-updater.sh
│   └── download-edge-agent.sh

Implementation Details

Build-time Download

The recipe should attempt to download the latest edge-agent during build if network is available, falling back to runtime download if not.

Runtime Update Service

[Unit]
Description=EdgeOS Agent Updater
After=network-online.target
Wants=network-online.target

[Service]
Type=oneshot
ExecStart=/opt/edgeos/bin/edge-agent-updater.sh
RemainAfterExit=true

Acceptance Criteria

  • Edge agent downloaded during build if internet available
  • Fallback to runtime download if build-time fails
  • Auto-update checks on boot when network available
  • Binary stored in /usr/local/bin with backup in /opt/edgeos/bin
  • Proper systemd service management
  • Handles both pre-releases and stable releases

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions