fiware-draco icon indicating copy to clipboard operation
fiware-draco copied to clipboard

Create my own template

Open pooja1pathak opened this issue 4 years ago • 1 comments

Hi Team,

I need to create my own template in draco nifi, for that I have done below changes:

  1. created a template file as nifi-ngsi-resources/docker/templates/text.xml
  2. Added processor as nifi-ngsi-bundle/nifi-ngsi-processors/src/main/java/org/apache/nifi/processors/ngsi/test.java
  3. Added entry for test in nifi-ngsi-bundle/nifi-ngsi-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor

Now, when I create docker image using commad sudo docker build -f ./Dockerfile -t draco . and run this image, a new template for test is showing in GUI of /nifi but when I add it, an error message is shown on GUI : org.apache.nifi.processors.ngsi.test is not known to this NiFi instance.

Please guide me if I am doing anything wrong or missed anything to create and use my own template.

pooja1pathak avatar Feb 07 '22 08:02 pooja1pathak

Hello,

I think the easiest way to add a new template in Draco is:

  1. Create your flow using the GUI in a Draco instance.
  2. Save this flow as template using the Draco GUI
  3. Download the template and save it in this path nifi-ngsi-resources/docker/templates
  4. Build the image using the docker file as you show in your message.

It is important that you are using the processors with the same version of nifi that you are using for building the docker images, maybe that is why you receive the message that you mention.

anmunoz avatar Feb 21 '22 09:02 anmunoz