Updating agent capability using Asset Push from Edge Flow Manager

Learn how you can use Asset Push to automate the process of distributing NAR files to the agents much faster.

MiNiFi Java is released with a set of core processors and controller services. As the flow or requirements evolve, there may be a need for more niche or custom processors. In such cases, all MiNiFi agents would have to be updated independently to add the new capability. Combining property updates with asset push and manifest refresh, you can perform these updates directly from the Edge Flow Manager without accessing each agent separately.

You can watch this demo video about the process:

Or follow the below steps to update agent capabilities remotely:

  1. Gather all NAR files that are required for your processor.

    Some processors require multiple NARs. You can either create your custom processor and bundle it as NARs or you can use the Cloudera Artifactory for available NARs: https://repository.cloudera.com/artifactory/repo/org/apache/nifi/

  2. Upload the NAR file(s) to S3 or to all Edge Flow Manager nodes.

    For more information, see Using Asset Push command.

  3. Set the value of the asset directory property to the extension directory, which is ./extensions by default.
    • Java Agent property: c2.asset.directory
    • C++ Agent property: nifi.c2.asset.directory
    Using the UI:
    1. Click Monitor on the left navigation panel to open the Dashboard.
    2. Select an agent class.
    3. Click Actions > Agent Configuration.
      The Edit Agent Configuration dialog appears:
    4. Select the asset directory property (for a Java agent, it is c2.asset.directory).
    5. Add ./extensions in the Value field and click Apply.

    Using Swagger:

    Access http:/<cem-host>:<cem-port>/efm/swagger/#/Commands/createPropertyUpdateOperation.

    You can check the command status in the Agent Manager:
  4. Run an asset push.
    • For instructions, see Using Asset Push command.

    • Using Swagger:

      Access http://<cem-host>:<cem-port>/efm/swagger/#/Commands/createUpdateAssetOperation.

    • You can check the command status in the Agent Manager. You have to wait an extra heartbeat interval to complete manifest update.

  5. Refresh the agent manifest.
    • For instructions, see Refreshing the agent manifest for existing flows.

    • Using the UI:
    • Using Swagger:

      Access http://<cem-host>:<cem-port>/efm/swagger/#/Flow%20Designer/refreshFlowManifest.

Once the asset push and manifest refresh are complete, the new processors/controller services are available. You can verify the updated capabilities on the Edge Flow Manager UI.