Without a manager, a container image is merely an artifact that the user must deploy and run manually using a container runtime. That leaves the user responsible for tasks such as:
-
Starting and stopping the different containers
-
Monitoring containers health
-
Relaunching containers on unexpected stop/crash
-
Collecting logs
-
Handling different types of containers (LXC, Podman/Docker)
The ConnectCore Container Manager centralizes all these tasks in a single service.
The Container Manager supports:
-
LXC containers, managed with runtime
lxc -
OCI-type containers (Podman/Docker) managed with runtime
podman -
Digi Container Package (DCP), which is a tarball containing an LXC or OCI-type container with a manifest
Evaluate the Container Manager
Refer to Get started with containers to install a pre-built image on your device where you can exercise the ConnectCore Container Manager.
Add the Container Manager to your custom image
To add the ConnectCore Container Manager to your custom image add this to your project’s conf/local.conf:
conf/local.confIMAGE_INSTALL:append = " cc-container-mng"
Components
| File | Description |
|---|---|
|
Container Manager daemon |
|
Container Manager configuration file |
|
Command-line interface application to interact with the daemon |
|
Contains the configuration for all containers being managed by the Container Manager |
|
Contains the status and statistics for all containers being managed by the Container Manager |
Daemon configuration file
The daemon configuration file is /etc/cc-container-mng.conf.
{
"version": 1,
"service": {
"working_path": "/root/cc-container",
"monitor_interval": 10,
"command_timeout": 30,
"podman_load_timeout": 600
},
"logging": {
"level": "ERROR",
"syslog": {
"enabled": true,
"level": "INFO"
},
"console": {
"enabled": true
},
"file": {
"enabled": true,
"path": "/var/log/cc-containerd.log",
"level": "INFO",
"max_size": 10485760
}
}
}
| Section | Field | Description |
|---|---|---|
service |
|
Working path for containers managed by the Container Manager. |
|
Period (in seconds) to query the status and statistics of containers. |
|
|
Timeout (in seconds) to consider that a command failed. |
|
|
Timeout (in seconds) to consider a load command failed, for OCI-type (Podman/Docker) containers. |
|
logging |
|
Default log level for syslog, console, file.
Can be overridden by more specific |
|
For every logging method (syslog, console, file), defines whether log is enabled. |
|
|
For the file log method, path to the log file. |
|
|
For the file log method, max size (in bytes) of the log file. |
Containers configuration file
The containers configuration file is /root/cc-container/cc-containers.conf.
This file has one entry for every container managed by the Container Manager.
{
"containers": [
{
"id": "lvgl-demo",
"friendly_name": "LVGL Demo",
"version": 1,
"runtime": "podman",
"create_args": "--privileged --network host --tty",
"autostart": false,
"monitor": true,
"restart": {
"enabled": true,
"max_retries": 3,
"retry_delay": 3,
"window": 60
}
}
]
}
| Field | Description |
|---|---|
|
Unique identifier for the container |
|
Descriptive name of the container |
|
Version number of the container |
|
Runtime to use for this container:
|
|
Arguments for podman runtime (Podman/Docker) containers |
|
Defines whether or not the container will start automatically after boot (or container installation) |
|
Defines whether the daemon must periodically query the container for status |
|
Set of restart parameters |
|
Defines whether the daemon must restart the container in case it stops |
|
Number of times the daemon should try to restart the container before giving up |
|
Seconds to wait between restart retries |
|
Time window (in seconds) to consider the daemon is doing a restart retry of this container |