Manager configuration

Customize the container manager components.

Properties

To control all aspects of the container manager behavior.

PropertyTypeDefaultDescription
home_dirstring/var/lib/container-managementHome directory for the container manager data
exec_root_dirstring/var/run/container-managementRoot directory for the container manager’s executable artifacts
container_client_sidstringcontainer-management.service.local.v1.service-containerd-clientUnique identifier that is used for an interaction with the runtime
network_manager_sidstringcontainer-management.service.local.v1.service-libnetwork-managerUnique identifier that is used for networking
default_ctrs_stop_timeoutint30Timeout in seconds for a container to stop gracefully, otherwise its root process will be force stopped
Runtime
default_nsstringkanto-cmNamespace that is used by the runtime for isolation
address_pathstring/run/containerd/containerd.sockPath to the runtime’s communication endpoint
home_dirstring/var/lib/container-managementHome directory for the runtime data
exec_root_dirstring/var/run/container-managementRoot directory for the runtime’s executable artifacts
image_dec_keysstring[]Private keys (GPG private key ring, JWE or PKCS7) used for decrypting container images, the format is: filepath_private_key[:password]
image_dec_recipientsstring[]Recipients (only for PKCS7 and must be an x509) used for decrypting container images, the format is: pkcs7:filepath_x509_certificate
runc_runtimestringio.containerd.runc.v2Runc communication mode, the possible values are: io.containerd.runtime.v1.linux, io.containerd.runc.v1 and io.containerd.runc.v2
image_expirystring744hTime period for the cached images and content to be kept in the form of e.g. 72h3m0.5s
image_expiry_disableboolfalseDisable expiry management of cached images and content, must be used with caution as it may lead to large memory volumes being persistently allocated
lease_idstringkanto-cm.leaseLease identifier to be used for container resources persistence
Registry access - secure
user_idstringUser unique identifier to authenticate to the image registry
passwordstringPassword to authenticate to the image registry
root_castringPEM encoded CA certificates file
client_certstringPEM encoded certificate file to authenticate to the image registry
client_keystringPEM encoded unencrypted private key file to authenticate to the image registry
Registry access - insecure
insecure_registriesstring[]localhostImage registries that do not use valid certificates or do not require a HTTPS connection, the format is: host[:port]
Networking
home_dirstring/var/lib/container-managementHome directory for the network manager data
exec_root_dirstring/var/run/container-managementRoot directory for the network manager’s executable artifacts
Networking - bridge
namestringkanto-cm0Bridge name
ip4stringBridge IPv4 address
fcidr4stringIPv4 address range for the bridge, using the standard CIDR notation
gwip4stringBridge gateway IPv4 address
enable_ip6boolfalsePermit the bridge IPv6 support
mtuint1500Bridge maximum transmission unit in bytes
iccbooltruePermit the inter-container communication
ip_tablesbooltruePermit the IP tables rules
ip_forwardbooltruePermit the IP forwarding
ip_masqbooltruePermit the IP masquerading
userland_proxyboolfalseForbid the userland proxy for the loopback traffic
Local communication
protocolstringunixCommunication protocol used for accessing the gRPC server, the possible values are: tcp, tcp4, tcp6, unix or unixpacket
address_pathstring/run/container-management/container-management.sockPath to the gRPC server’s communication endpoint
Digital twin
enablebooltruePermit the container manager digital twin representation
home_dirstring/var/lib/container-managementHome directory for the digital twin data
featuresstring[]ContainerFactory, SoftwareUpdatable, MetricsFeatures that will be registered for the container manager digital twin, the possible values are: ContainerFactory, SoftwareUpdatable and Metrics
Digital twin - connectivity
broker_urlstringtcp://localhost:1883Address of the MQTT server/broker that the container manager will connect for the local communication, the format is: scheme://host:port
keep_aliveint20000Keep alive duration in milliseconds for the MQTT requests
disconnect_timeoutint250Disconnect timeout in milliseconds for the MQTT server/broker
client_usernamestringUsername that is a part of the credentials
client_passwordstringPassword that is a part of the credentials
connect_timeoutint30000Connect timeout in milliseconds for the MQTT server/broker
acknowledge_timeoutint15000Acknowledge timeout in milliseconds for the MQTT requests
subscribe_timeoutint15000Subscribe timeout in milliseconds for the MQTT requests
unsubscribe_timeoutint5000Unsubscribe timeout in milliseconds for the MQTT requests
Digital twin - connectivity - TLS
root_castringPEM encoded CA certificates file
client_certstringPEM encoded certificate file to authenticate to the MQTT server/broker
client_keystringPEM encoded unencrypted private key file to authenticate to the MQTT server/broker
Logging
log_filestringlog/container-management.logPath to the file where the container manager’s log messages are written
log_levelstringINFOAll log messages at this or a higher level will be logged, the log levels in descending order are: ERROR, WARN, INFO, DEBUG and TRACE
log_file_countint5Log file maximum rotations count
log_file_max_ageint28Log file rotations maximum age in days, use 0 to not remove old log files
log_file_sizeint2Log file size in MB before it gets rotated
syslogboolfalseRoute logs to the local syslog
Deployment
enablebooltruePermit the deployment manager service providing installation/update of containers via the container descriptor files
modestringupdateDeployment manager mode, the possible values are: init (container descriptors are processed only on first start, new containers are deployed and started), update (container descriptors are processed on each restart, new containers can be deployed and started, existing containers may be updated, no container removals)
home_dirstring/var/lib/container-managementHome directory for the deployment manager data
ctr_dirstring/etc/container-management/containersDirectory containing descriptors of containers that will be automatically deployed on first start or updated on restart

Example

The minimal required configuration that sets a timeout period of 5 seconds for the managed containers to stop gracefully.

{
    "manager": {
        "default_ctrs_stop_timeout": 5
    },
    "log": {
        "log_file": "/var/log/container-management/container-management.log"
    }
}

Template

The configuration can be further adjusted according to the use case. The following template illustrates all possible properties with their default values.

{
    "manager": {
        "home_dir": "/var/lib/container-management",
        "exec_root_dir": "/var/run/container-management",
        "container_client_sid": "container-management.service.local.v1.service-containerd-client",
        "network_manager_sid": "container-management.service.local.v1.service-libnetwork-manager",
        "default_ctrs_stop_timeout": 30
    },
    "containers": {
        "default_ns": "kanto-cm",
        "address_path": "/run/containerd/containerd.sock",
        "exec_root_dir": "/var/run/container-management",
        "home_dir": "/var/lib/container-management",
        "image_dec_keys": [],
        "image_dec_recipients": [],
        "runc_runtime": "io.containerd.runc.v2",
        "image_expiry": "744h",
        "image_expiry_disable": false,
        "lease_id": "kanto-cm.lease",
        "registry_configurations": {
            "": {
                "credentials": {
                    "user_id": "",
                    "password": ""
                },
                "transport": {
                    "root_ca": "",
                    "client_cert": "",
                    "client_key": ""
                }
            }
        },
        "insecure_registries": [
            "localhost"
        ]
    },
    "network": {
        "home_dir": "/var/lib/container-management",
        "exec_root_dir": "/var/run/container-management",
        "default_bridge": {
            "name": "kanto-cm0",
            "ip4": "",
            "fcidr4": "",
            "enable_ip6": false,
            "mtu": 1500,
            "icc": true,
            "ip_tables": true,
            "ip_forward": true,
            "ip_masq": true,
            "userland_proxy": false
        }
    },
    "grpc_server": {
        "protocol": "unix",
        "address_path": "/run/container-management/container-management.sock"
    },
    "things": {
        "enable": true,
        "home_dir": "/var/lib/container-management",
        "features": [
            "ContainerFactory",
            "SoftwareUpdatable",
            "Metrics"
        ],
        "connection": {
            "broker_url": "tcp://localhost:1883",
            "keep_alive": 20000,
            "disconnect_timeout": 250,
            "client_username": "",
            "client_password": "",
            "connect_timeout": 30000,
            "acknowledge_timeout": 15000,
            "subscribe_timeout": 15000,
            "unsubscribe_timeout": 5000,
            "transport": {
                "root_ca": "",
                "client_cert": "",
                "client_key": ""
            }
        }
    },
    "log": {
        "log_file": "log/container-management.log",
        "log_level": "INFO",
        "log_file_count": 5,
        "log_file_size": 2,
        "log_file_max_age": 28,
        "syslog": false
    },
    "deployment": {
        "enable": true,
        "mode": "update",
        "home_dir": "/var/lib/container-management",
        "ctr_dir": "/etc/container-management/containers"
    }
}
Last modified September 1, 2023