Configuration Management

CfgMgr manages configuration parameters in a system, and provides functions such as loading, reading, writing, listening, persistency, snapshotting, restoration, and reloading of parameters for various APPs. The CfgMgr process is usually deployed on the management plane. Figure 1 shows the interaction between the CfgMgr process and peripheral modules.

Figure 1 CfgMgr deployment
  • When the CfgMgr is started, all configuration files are loaded at a time. The configuration files can be in YAML format. The module saves the persistent file, the initial configuration file, and the snapshot file in a private format in a universal flash storage (UFS) read/write partition.
    • Initial configuration file: By default, this file is stored in the /home/mdc/var/cfgmgr/config directory in the running environment. During the first startup or reloading, the data saved in the YAML file is loaded (equivalent to the backup of the YAML file data) to improve the startup efficiency during restart.
    • Persistent file: By default, this file is stored in the /home/mdc/var/cfgmgr/persistent_config directory in the running environment. It is used to store the data that is modified or added during the running and needs to be made persistent so that the data takes effect after restart.
    • Snapshot file: By default, this file is stored in the /home/mdc/var/cfgmgr directory in the running environment. You need to invoke the snapshot API to create a parameter snapshot at a specific time point.
  • Apps on the data plane and management plane access the CfgMgr through the identity access management (IAM) channel. Apps on the data plane can read parameters by reading shared memory files (concurrent access is supported).

    Before the IAM is complete, the original Hiva shared memory is used for communication, and the permission configuration does not take effect.

  • To configure read and write permissions, set a parameter group for each configuration parameter, start the resource service file for each parameter group, and configure the access permission for each process. Note that the applications on the data plane have permission to access all parameters.