Skip to main content

Service Manager (SM)

Introduction

Service Manager (SM) is the AosEdge unit component that allows installing, running and managing third-party services. It also provides the AosCloud with monitoring data, unit logs and info and all the management capabilities.

Packages

Service Manager includes the following packages:

ModuleDescription
configprovides configuration for all SM packages
databasestores local services, layers configuration description
smclienthandles the communication manager connection
launcherprepare resources, file system, network for service instance and trigger start/stop service instances
runnerexecutes starting instances as systems service and manages their life cycle
servicemanagerinstalls/removes AosEdge services
layermanagerinstalls/removes service's layers
networkmanagerprepare network infrastructure for the service instances
device managerprovides access to system resources such as devices, RAM and CPU to AosEdge services
monitoringmonitors system and AosEdge services resource usage
alertssends alerts to AosCloud
loggingprovides systemd and services log to the cloud
iamclientused for getting identity data, certificate for secure communications and registering service secrets

Components diagram

See the Service Manager components in the below diagram.

loading...

Startup sequence

CMCMSMmainSMmainSMServerSMServerSMClientSMClientiamclientiamclientDBDBlauncherlauncherrunnerrunnerservicemanagerservicemanagerlayermanagerlayermanagerresourcemanagerresourcemanagerGetOperationVersion()currentVersionalt[currentVersion!=OperationVersion]CleanupnodeConfigurationGetAllInstances()instancesloop[instances]StartInstance()RunInstancesStatusGetUnitConfigStatus()GetUnitConfigInfo()UnitConfigStatusUnitConfigStatusalt[new boardconfig]CheckUnitConfig(unitConfig)CheckUnitConfig(unitConfig)UnitConfigStatusUnitConfigStatusSetUnitConfig(unitConfig)UpdateUnitConfig(unitConfig, version)UnitConfigStatusUnitConfigStatusRunInstances(services, layers, instances)ProcessDesiredServices(services)ProcessDesiredLayers(layers)RunInstances(instances)start/stop(instances)RunInstancesStatus