Skip to main content
Version: v1.1

Configuration Reference

Introduction

This section documents the configuration system used by AosCore components. Configuration controls component behavior (timeouts, paths, server URLs), defines per-Node resource policies and alert thresholds, and specifies network and storage parameters. Understanding the configuration hierarchy is essential for deploying and operating AosEdge Units.

AosCore uses two distinct configuration mechanisms:

  1. Component configuration files — local JSON files that configure each AosCore component at startup (paths, server URLs, timeouts, runtime definitions)
  2. Cloud-managed configuration — JSON documents pushed from AosCloud that define per-Node operational policies (alert rules, resource ratios, labels, scheduling priority)

Configuration Hierarchy

The configuration system operates at three levels:

┌─────────────────────────────────────────────────────┐
│ AosCloud │
│ (pushes unit configuration via desired-state) │
└──────────────────────────┬──────────────────────────┘


┌─────────────────────────────────────────────────────┐
│ Unit Configuration │
│ (per-Unit policies: alert rules, resource ratios, │
│ labels, priority — distributed to all Nodes) │
└──────────────────────────┬──────────────────────────┘

┌────────────┼────────────┐
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ Node 1 │ │ Node 2 │ │ Node N │
│ │ │ │ │ │
│ • CM config │ │ • SM config │ │ • SM config │
│ • SM config │ │ • Node config │ │ • Node config │
│ • Node config │ │ • Resources │ │ • Resources │
└───────────────┘ └───────────────┘ └───────────────┘

Unit-Level (Cloud-Managed)

The Unit configuration is a versioned JSON document managed by AosCloud and delivered to the Communication Manager as part of the desired-state flow. It defines per-Node policies including alert thresholds, resource allocation ratios, labels, and scheduling priority. The CM distributes the relevant portion of this configuration to each Node's Service Manager.

Node-Level (Local)

Each Node has local configuration files that define how its AosCore components operate:

FileDefault PathPurpose
CM configaos_communicationmanager.jsonCommunication Manager settings (server URLs, timeouts, image management, monitoring)
SM configaos_servicemanager.jsonService Manager settings (IAM connection, runtimes, image storage, logging)
Node configaos_node.cfgNode identity and static properties
Resources config/etc/aos/resources.cfgHardware resource definitions for the Node

Component Configuration Files

Each AosCore component reads its configuration from a JSON file at startup. These files are typically placed on the filesystem during provisioning and are not modified at runtime.

Communication Manager Configuration

The CM configuration file (aos_communicationmanager.json) defines:

  • Server URLs — service discovery endpoint, IAM server addresses, CM server address, file server URL
  • Working directories — paths for storage, state, and working data
  • Timeouts — cloud response wait timeout, unit status send interval, SM connection timeout
  • Monitoring — metric send period
  • Alerts — alert send period
  • Image management — install/download paths, item TTL, outdated item removal period
  • Launcher — node connection timeout, instance TTL, environment variable check period
  • DNS — DNS storage path and IP address
  • Security — CA certificate path, certificate storage path
  • Unit config file — path to the persisted unit configuration (default: {workingDir}/aos_unit.cfg)

Service Manager Configuration

The SM configuration file (aos_servicemanager.json) defines:

  • IAM connection — IAM public server URL, CA certificate
  • CM connection — CM server URL, certificate storage, reconnect timeout
  • Working directory — base path for SM data
  • Image management — image storage path, partition limit, item TTL
  • Runtimes — array of runtime definitions (plugin type, runtime type, component flag)
  • Monitoring — poll period, average window
  • Logging — max log part size and count
  • Journal alerts — filter patterns, alert priority levels
  • Node config file — path to the node configuration (default: {workingDir}/aos_node.cfg)
  • Resources config file — path to hardware resource definitions (default: /etc/aos/resources.cfg)

Configuration Format

All component configuration files use JSON format with case-insensitive field names. Duration values use a string format supporting days, hours, minutes, and seconds (e.g., "30d", "1h", "10m", "5s", or combinations like "1h30m").

Fields that are not specified in the configuration file fall back to built-in defaults, allowing minimal configurations that only specify required fields (server URLs, working directory, CA certificate).

Cloud-Managed Configuration

The Unit configuration delivered from AosCloud follows a versioned schema:

{
"formatVersion": "7",
"version": "2.0.0",
"nodes": [
{
"node": { "codename": "node-1" },
"nodeGroupSubject": { "codename": "mainType" },
"alertRules": { /* ... */ },
"resourceRatios": { "cpu": 50, "ram": 51, "storage": 52, "state": 53 },
"labels": ["mainNode"],
"priority": 1
}
]
}

This configuration is:

  • Versioned — uses semantic versioning; updates must have a strictly higher version
  • Persisted — stored locally as aos_unit.cfg so it survives restarts
  • Distributed — the CM resolves per-Node configuration and pushes it to each Node's SM
  • Reactive — when a Node reconnects, it automatically receives the latest configuration

In This Section

  • Unit Configuration — cloud-managed per-Unit policies (alert rules, resource ratios, labels, priority)