Skip to content

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

Procedure

  1. 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

  2. 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

  3. Copy the .conf files for the root partition into the image by adding a new org.osbuild.copy stage to the rootfs 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
    

    ```

  4. 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

  5. Copy the agent.conf file for the QM partition into the image by adding a new org.osbuild.copy stage to the qm_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 ```