Unit configuration
The unit configuration file describes the configuration of the system. The file should be provided by the team who is responsible for Integration AosCore to the platform. The configuration file contains the following data:
- A list of components present in the system
- A list of configurations of all node types that are present in the system
Each node configuration includes:
- A list of rules for providing access to devices for services
- A list of rules for providing resources to services
{
"formatVersion": 1, //fill by cloud
"vendorVersion": "12", //fill by cloud
"components": [
{
"id": "rootfs",
"description": "rootfs component"
},
{
"id": "boot"
}
],
"nodes": [
{
"nodeType": "nodeType",
"priority": 100,
"devices": [
{
"name": "camera0", /// name of device (alias) (device is addressed in linux way:camera0, camera1 etc.)
"sharedCount": 0, /// 0 - device can be shared with unlimited containers
"groups": [
/// SM should share these additional groups to container
"user1",
"user2"
],
"hostDevices": [
/// This node contains paths to real devices on Host system
"/dev/video0:/dev/mainvideo", /// they should be used for providing this Device Class to container
"/dev/video1:/dev/secondaryvideo", /// Path to real device descriptor on Host system. Container path can be
"/dev/video2" /// specified after `:` separator. If container path is missed, the host
/// poth will be used inside container.
]
},
{
"name": "mic0",
"sharedCount": 1, /// only one container can use this device
/// groups can be empty or isn't presented. It means that SM should not share additional groups
"hostDevices": [
"/dev/snd/controlC0",
"/dev/snd/pcmC0D0c",
"/dev/snd/timer"
]
},
{
"name": "audio0",
"sharedCount": 0, /// 0 - device can be shared with unlimited containers
"groups": [
"user1"
],
"hostDevices": [
"/dev/snd/controlC0",
"/dev/snd/pcmC0D0p",
"/dev/snd/timer"
]
}
],
"resources": [
{
"name": "some_host_resource",
"groups": [
"user1"
],
"mounts": [
// https://github.com/opencontainers/runtime-spec/blob/master/config.md#posix-platform-mounts
{
"destination": "/var/container_folder",
"source": "/usr/bin/host_folder",
"options": [
"rw"
],
"type": "tmpfs"
}
],
"env": [
"key1=value1"
],
"hosts": [
{
"ip": "10.0.0.1",
"hostname": "hostservername"
}
]
}
],
"labels": [
"node0Label"
]
}
]
}