Updating agent capability using Asset Push from EFM

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, it can happen that a more niche or a custom processor is required. In this case all MiNiFi agents would have to be updated independently to add the new capability. Combining property update with asset push and manifest refresh, everything can be done directly from EFM without accessing each agent separately.

You can watch this demo video about the process:

Or just 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 all EFM 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
    On the UI:
    1. Click Monitor on the left navigation panel to open the Dashboard.
    2. Select an agent class.
    3. Click Actions > Edit 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.

    Through Swagger:

    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.

    • Through Swagger: use

      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.

    • On the UI:
    • Through Swagger: use

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

The new processors/controller services are now available. You can check them on the EFM UI.