mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-04 02:56:52 +00:00
ACRN: Add runC container sample config file
This patch adds the runC container config file, we will run acrn-dm in runC container, and set acrn QoS parameters based on runC. In the config file we mount SOS root directory to the container and disable network/mount/ipc namespace. Tracked-On: projectacrn/acrn-hypervisor#2020 Signed-off-by: Long Liu <long.liu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
parent
da0cf3af71
commit
c5d827ab1f
98
devicemodel/samples/apl-mrb/runC.json
Normal file
98
devicemodel/samples/apl-mrb/runC.json
Normal file
@ -0,0 +1,98 @@
|
||||
{
|
||||
"ociVersion": "1.0.1-dev",
|
||||
"process": {
|
||||
"terminal": false,
|
||||
"user": {
|
||||
"uid": 0,
|
||||
"gid": 0
|
||||
},
|
||||
"args": [
|
||||
"/usr/share/acrn/samples/apl-mrb/launch_uos.sh",
|
||||
"-V",
|
||||
"2"
|
||||
],
|
||||
"env": [
|
||||
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
"TERM=xterm"
|
||||
],
|
||||
"cwd": "/",
|
||||
"capabilities": {
|
||||
"bounding": [
|
||||
"CAP_SYS_ADMIN",
|
||||
"CAP_SYS_RESOURCE",
|
||||
"CAP_WAKE_ALARM",
|
||||
"CAP_SYS_MODULE"
|
||||
|
||||
],
|
||||
"effective": [
|
||||
"CAP_SYS_ADMIN",
|
||||
"CAP_SYS_RESOURCE",
|
||||
"CAP_WAKE_ALARM",
|
||||
"CAP_SYS_MODULE"
|
||||
],
|
||||
"inheritable": [
|
||||
"CAP_SYS_ADMIN",
|
||||
"CAP_SYS_RESOURCE",
|
||||
"CAP_WAKE_ALARM",
|
||||
"CAP_SYS_MODULE"
|
||||
],
|
||||
"permitted": [
|
||||
"CAP_SYS_ADMIN",
|
||||
"CAP_SYS_RESOURCE",
|
||||
"CAP_WAKE_ALARM",
|
||||
"CAP_SYS_MODULE"
|
||||
],
|
||||
"ambient": [
|
||||
"CAP_SYS_ADMIN",
|
||||
"CAP_SYS_RESOURCE",
|
||||
"CAP_WAKE_ALARM",
|
||||
"CAP_SYS_MODULE"
|
||||
]
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"path": "rootfs",
|
||||
"readonly": false
|
||||
},
|
||||
"hostname": "runc",
|
||||
"mounts": [
|
||||
{
|
||||
"destination": "/",
|
||||
"type": "none",
|
||||
"source": "/",
|
||||
"options": ["rbind","rw"]
|
||||
}
|
||||
],
|
||||
"linux": {
|
||||
"resources": {
|
||||
"devices": [
|
||||
{
|
||||
"allow": true,
|
||||
"access": "rwm"
|
||||
}
|
||||
]
|
||||
},
|
||||
"uidMappings": [
|
||||
{
|
||||
"hostID": 0,
|
||||
"containerID": 0,
|
||||
"size": 1
|
||||
}
|
||||
],
|
||||
"gidMappings": [
|
||||
{
|
||||
"hostID": 0,
|
||||
"containerID": 0,
|
||||
"size": 1
|
||||
}
|
||||
],
|
||||
"namespaces": [
|
||||
{
|
||||
"type": "pid"
|
||||
},
|
||||
{
|
||||
"type": "uts"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
98
devicemodel/samples/nuc/runC.json
Normal file
98
devicemodel/samples/nuc/runC.json
Normal file
@ -0,0 +1,98 @@
|
||||
{
|
||||
"ociVersion": "1.0.1-dev",
|
||||
"process": {
|
||||
"terminal": false,
|
||||
"user": {
|
||||
"uid": 0,
|
||||
"gid": 0
|
||||
},
|
||||
"args": [
|
||||
"/usr/share/acrn/samples/apl-mrb/launch_uos.sh",
|
||||
"-V",
|
||||
"2"
|
||||
],
|
||||
"env": [
|
||||
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
"TERM=xterm"
|
||||
],
|
||||
"cwd": "/",
|
||||
"capabilities": {
|
||||
"bounding": [
|
||||
"CAP_SYS_ADMIN",
|
||||
"CAP_SYS_RESOURCE",
|
||||
"CAP_WAKE_ALARM",
|
||||
"CAP_SYS_MODULE"
|
||||
|
||||
],
|
||||
"effective": [
|
||||
"CAP_SYS_ADMIN",
|
||||
"CAP_SYS_RESOURCE",
|
||||
"CAP_WAKE_ALARM",
|
||||
"CAP_SYS_MODULE"
|
||||
],
|
||||
"inheritable": [
|
||||
"CAP_SYS_ADMIN",
|
||||
"CAP_SYS_RESOURCE",
|
||||
"CAP_WAKE_ALARM",
|
||||
"CAP_SYS_MODULE"
|
||||
],
|
||||
"permitted": [
|
||||
"CAP_SYS_ADMIN",
|
||||
"CAP_SYS_RESOURCE",
|
||||
"CAP_WAKE_ALARM",
|
||||
"CAP_SYS_MODULE"
|
||||
],
|
||||
"ambient": [
|
||||
"CAP_SYS_ADMIN",
|
||||
"CAP_SYS_RESOURCE",
|
||||
"CAP_WAKE_ALARM",
|
||||
"CAP_SYS_MODULE"
|
||||
]
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"path": "rootfs",
|
||||
"readonly": false
|
||||
},
|
||||
"hostname": "runc",
|
||||
"mounts": [
|
||||
{
|
||||
"destination": "/",
|
||||
"type": "none",
|
||||
"source": "/",
|
||||
"options": ["rbind","rw"]
|
||||
}
|
||||
],
|
||||
"linux": {
|
||||
"resources": {
|
||||
"devices": [
|
||||
{
|
||||
"allow": true,
|
||||
"access": "rwm"
|
||||
}
|
||||
]
|
||||
},
|
||||
"uidMappings": [
|
||||
{
|
||||
"hostID": 0,
|
||||
"containerID": 0,
|
||||
"size": 1
|
||||
}
|
||||
],
|
||||
"gidMappings": [
|
||||
{
|
||||
"hostID": 0,
|
||||
"containerID": 0,
|
||||
"size": 1
|
||||
}
|
||||
],
|
||||
"namespaces": [
|
||||
{
|
||||
"type": "pid"
|
||||
},
|
||||
{
|
||||
"type": "uts"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user