Configuring the Resource Manager¶
After installation, you can enable or disable the Resource Manager as a whole or enable or disable individual resource classes.
This complements the settings in /etc/capabilities.json and controls the actual state of the Resource Manager components.
Keep the runtime state and the entries in /etc/capabilities.json synchronized.
Use /usr/lib/ie-resource-manager/ie-resource-manager-control.sh to
- check the status of the Resource Manager,
- completely enable or disable the Resource Manager, and
- enable or disable individual resource classes.
Usage¶
Use the script as follows:
/usr/lib/ie-resource-manager/ie-resource-manager-control.sh {status|enable|disable|enable-and-start|enable-swagger-ui|disable-swagger-ui} [resource-class-name]
The following options are available:
status: Displays the status of the Resource Manager and each resource class. When invoked with root privileges, it also shows the status of the Docker runtime.-
enable: Enables the Resource Manager or one of the resource classes.NOTICE
This option enables the services but does not start them. Use it during early boot, before
systemdstarts, or before a scheduled reboot. The setting persists across reboots and requires root privileges. -
disable: Disables the Resource Manager or one of its resource classes. This stops and disables all related services. The setting persists across reboots and requires root privileges. enable-and-start: Same asenable, but also starts the services.
This option is intended for developer use in the terminal to avoid circular dependencies or deadlocks. It requires root privileges.enable-swagger-uianddisable-swagger-ui: Enables or disables the Resource Manager debug interface.
If enabled, the debug interface is available on port8123. This interface is disabled by default. Do not use it in production systems for security reasons. Root privileges are required.
NOTICE
Run the script during system configuration, not during normal operation. Dynamic enablement or disablement of the Resource Manager or individual resource classes during runtime is not supported. Valid use cases include image building, first-boot configuration, pre-reboot configuration, and developer-side maintenance tasks.
NOTICE
Enabling services during an active systemd boot is not supported.
systemd, which the script uses internally, does not enable services during active boot. Enabling an already enabled service can also disturb the service start order.
Because all Resource Manager services are enabled by default, disable selected services during first boot if needed.
Do this very early in boot, before the Resource Manager services and containerd start. ie-cpu-partition.service is the first Resource Manager service that runs in basic.target.
Examples¶
Example
$ sudo /usr/lib/ie-resource-manager/ie-resource-manager-control.sh status
Resource Manager Core:
enabled and running
Docker Runtime 'iedge':
enabled and running
Resource Class "siemens.com/isolated_core":
enabled and running
Resource Class "siemens.com/isolated_network":
enabled and running
NOTICE
You do not have to run the script with sudo, but without root privileges it can omit parts of the Docker runtime status.
Example
$ sudo /usr/lib/ie-resource-manager/ie-resource-manager-control.sh disable
Resource Class "siemens.com/isolated_core": disabling "ie-cpu-resource-plugin.service"
Resource Class "siemens.com/isolated_core": disabling "ie-cpu-partition.service"
Resource Class "siemens.com/isolated_network": disabling "ie-network-resource-plugin.service"
Resource Class "siemens.com/isolated_network": disabling "ie-docker-network-plugin.service"
Resource Manager Core: disabling "ie-resource-manager.service"
Resource Manager Core: disabling "ie-resource-discovery.service"
$ sudo /usr/lib/ie-resource-manager/ie-resource-manager-control.sh status
Resource Manager Core:
disabled and stopped
Docker Runtime 'iedge':
disabled, but running
Resource Class "siemens.com/isolated_core":
disabled and stopped
Resource Class "siemens.com/isolated_network":
disabled and stopped
Docker is not restarted for performance reasons.
To refresh the Docker runtime status, run sudo systemctl restart docker.service or wait until the next boot.
You can run /usr/lib/ie-resource-manager/ie-resource-manager-control.sh disable from a systemd service if you do so before the Resource Manager services and containerd.service start.
Example
$ sudo /usr/lib/ie-resource-manager/ie-resource-manager-control.sh enable
Resource Manager Core: enabling "ie-resource-discovery.service"
Resource Manager Core: enabling "ie-resource-manager.service"
Resource Class "siemens.com/isolated_core": enabling "ie-cpu-resource-plugin.service"
Resource Class "siemens.com/isolated_core": enabling "ie-cpu-partition.service"
Resource Class "siemens.com/isolated_network": enabling "ie-network-resource-plugin.service"
Resource Class "siemens.com/isolated_network": enabling "ie-docker-network-plugin.service"
$ sudo /usr/lib/ie-resource-manager/ie-resource-manager-control.sh status
Resource Manager Core:
enabled but stopped (start required)
Docker Runtime 'iedge':
enabled and running
Resource Class "siemens.com/isolated_core":
enabled but stopped (start required)
Resource Class "siemens.com/isolated_network":
enabled but stopped (start required)
The services are enabled but not started.
After a reboot, the configuration is complete.
Alternatively, start the services immediately with enable-and-start instead of waiting for a reboot:
$ sudo /usr/lib/ie-resource-manager/ie-resource-manager-control.sh enable-and-start
Resource Manager Core: enabling and starting "ie-resource-discovery.service"
Resource Manager Core: enabling and starting "ie-resource-manager.service"
Resource Class "siemens.com/isolated_core": enabling and starting "ie-cpu-resource-plugin.service"
Resource Class "siemens.com/isolated_core": enabling and starting "ie-cpu-partition.service"
Resource Class "siemens.com/isolated_network": enabling and starting "ie-network-resource-plugin.service"
Resource Class "siemens.com/isolated_network": enabling and starting "ie-docker-network-plugin.service"
$ sudo /usr/lib/ie-resource-manager/ie-resource-manager-control.sh status
Resource Manager Core:
enabled and running
Docker Runtime 'iedge':
enabled and running
Resource Class "siemens.com/isolated_core":
enabled and running
Resource Class "siemens.com/isolated_network":
enabled and running
This enables the relevant services permanently and starts them immediately. If you enable the Resource Manager as a whole, Docker and all running containers are restarted as well.
To disable one resource class, run the following commands:
Example
$ sudo /usr/lib/ie-resource-manager/ie-resource-manager-control.sh disable siemens.com/isolated_core
Resource Class "siemens.com/isolated_core": disabling "ie-cpu-resource-plugin.service"
Resource Class "siemens.com/isolated_core": disabling "ie-cpu-partition.service"
$ sudo /usr/lib/ie-resource-manager/ie-resource-manager-control.sh status
Resource Manager Core:
enabled and running
Docker Runtime 'iedge':
enabled and running
Resource Class "siemens.com/isolated_core":
disabled and stopped
Resource Class "siemens.com/isolated_network":
enabled and running
You can run /usr/lib/ie-resource-manager/ie-resource-manager-control.sh disable <resource-name> from a systemd service if you do so before the Resource Manager services and containerd.service start.
Enabling the Resource Manager, or individual parts of it, is not supported from a systemd service.