Configuring communication between BlueChi controller and agent
Configuring communication between BlueChi controller and agent¶
Configuration files for the bluechi-controller
and bluechi-agent
enable these components to communicate with each other. These files define
information such as the host, port, and allowed node names for these components.
Prerequisites
- A host machine that runs on CentOS Stream, Fedora, or RHEL
- A custom manifest file, such as the manifest file that you created in Configuring communication between containers in QM and root partitions
- A container in the root partition and a container in the QM partition that need to communicate with each other
Procedure
-
Create a configuration file for the BlueChi controller on the primary node:
console echo -e "[bluechi-controller]\nControllerPort=842\nAllowedNodeNames=_<root_node>_,_<QM_node>_\n" > /etc/bluechi/controller.conf
-
Create a configuration file for the BlueChi agent on the primary node:
console echo -e "[bluechi-agent]\nControllerHost=127.0.0.1\nControllerPort=842\nNodeName=_<root_node>_\n" > /etc/bluechi/agent.conf
-
Copy the
.conf
files for the root partition into the image by adding a neworg.osbuild.copy
stage to therootfs
pipeline of your manifest file:```console - type: org.osbuild.copy inputs: inlinefile6: type: org.osbuild.files origin: org.osbuild.source mpp-embed: id: controller path: ../etc/bluechi/controller.conf inlinefile7: type: org.osbuild.files origin: org.osbuild.source mpp-embed: id: agent path: ../etc/bluechi/agent.conf
options: paths: - from: mpp-format-string: input://inlinefile6/{embedded['controller']} to: tree:///etc/bluechi/controller.conf - from: mpp-format-string: input://inlinefile7/{embedded['agent']} to: tree:///etc/bluechi/agent.conf
```
-
Create a configuration file for the managed QM partition:
console echo -e "[bluechi-agent]\nControllerHost=127.0.0.1\nControllerPort=842\nNodeName=_<QM_node>_\n" > /etc/bluechi/agent.conf.d/agent.conf
-
Copy the
agent.conf
file for the QM partition into the image by adding a neworg.osbuild.copy
stage to theqm_rootfs
pipeline of your manifest file:```console - type: org.osbuild.copy inputs: qm_extra_content_3: type: org.osbuild.files origin: org.osbuild.source mpp-embed: id: agent path: ../agent.conf
options: paths: - from: mpp-format-string: input://qm_extra_content_3/{embedded['agent']} to: tree:///etc/bluechi/agent.conf.d/agent.conf ```