Apache NiFi
Go to file
Peter Turcsanyi de11b6c43e
NIFI-13287: Added note to msal4j dependency in Azure bundle's pom
This closes #8869.

Signed-off-by: Joseph Witt <joewitt@apache.org>
2024-05-25 12:20:28 -07:00
.github NIFI-13211: Decoupling other UIs from exiting NiFi UI (#8828) 2024-05-14 15:54:23 -04:00
.mvn/wrapper NIFI-12600 Upgraded Apache Maven from 3.9.5 to 3.9.6 2024-01-12 08:49:45 -06:00
c2 NIFI-13238 Added Checkstyle rules for whitespace 2024-05-15 06:41:19 -05:00
minifi NIFI-13263 - Bump ParCEFone version (#8851) 2024-05-19 08:34:22 -04:00
nifi-api NIFI-13238 Added Checkstyle rules for whitespace 2024-05-15 06:41:19 -05:00
nifi-assembly NIFI-13263 - Bump ParCEFone version (#8851) 2024-05-19 08:34:22 -04:00
nifi-bom NIFI-13108 Updated common and framework dependencies 2024-05-03 09:35:23 -05:00
nifi-bootstrap NIFI-13238 Added Checkstyle rules for whitespace 2024-05-15 06:41:19 -05:00
nifi-code-coverage NIFI-13227 Upgraded Spring and various dependencies 2024-05-20 15:36:05 -05:00
nifi-commons NIFI-13238 Added Checkstyle rules for whitespace 2024-05-15 06:41:19 -05:00
nifi-dependency-check-maven NIFI-13148 Excluded unused xmlunit dependency from nifi-registry-test 2024-05-06 09:40:13 -07:00
nifi-docker NIFI-12590 Added Prefix Properties for Kubernetes Leases and ConfigMaps 2024-01-17 11:34:52 -06:00
nifi-docs NIFI-13256 Corrected Example WriteHelloWorld Processor Attributes 2024-05-16 21:54:29 +02:00
nifi-extension-bom NIFI-13144 improved depependency update config and various dependencies 2024-05-06 15:13:18 +01:00
nifi-extension-bundles NIFI-13287: Added note to msal4j dependency in Azure bundle's pom 2024-05-25 12:20:28 -07:00
nifi-framework-api NIFI-13238 Added Checkstyle rules for whitespace 2024-05-15 06:41:19 -05:00
nifi-framework-bundle [NIFI-13245] address component name overflow in provenance details di… (#8845) 2024-05-23 13:34:30 -04:00
nifi-manifest NIFI-13238 Added Checkstyle rules for whitespace 2024-05-15 06:41:19 -05:00
nifi-maven-archetypes NIFI-13187 - Modernize Archetypes 2024-05-09 08:41:30 -07:00
nifi-mock NIFI-13238 Added Checkstyle rules for whitespace 2024-05-15 06:41:19 -05:00
nifi-python-extensions NIFI-13219 Corrected phase for python-extensions-bundle plugins 2024-05-13 16:58:50 -05:00
nifi-registry NIFI-13227 Upgraded Spring and various dependencies 2024-05-20 15:36:05 -05:00
nifi-server-api NIFI-12998 Restructured framework and extension modules 2024-04-26 12:12:48 -05:00
nifi-stateless NIFI-13259 Enabled publishing nifi-stateless-assembly to Maven 2024-05-21 10:16:43 -05:00
nifi-system-tests NIFI-13238 Added Checkstyle rules for whitespace 2024-05-15 06:41:19 -05:00
nifi-toolkit NIFI-13238 Added Checkstyle rules for whitespace 2024-05-15 06:41:19 -05:00
.asf.yaml Add hacktoberfest label to repo 2020-10-05 16:23:01 -04:00
.gitignore NIFI-12616 Added Processor Documentation Support for Python 2024-01-18 19:12:05 -06:00
KEYS NIFI-11832 Added OpenPGP Public Key for David Handermann 2023-07-19 16:57:42 -05:00
LICENSE NIFI-8528 Migrate NiFi Registry into NiFi codebase (#5065) 2021-05-26 09:34:55 -04:00
NOTICE NIFI-13253 Corrected the discrepancies in the top level NOTICE file 2024-05-20 15:28:52 -05:00
README.md NIFI-13193 Set Minimum Maven Version to 3.9.6 2024-05-10 08:05:14 -05:00
SECURITY.md NIFI-12081 Removed HackerOne from Security Reporting Methods 2023-09-18 16:01:29 -05:00
checkstyle.xml NIFI-13238 Added Checkstyle rules for whitespace 2024-05-15 06:41:19 -05:00
codecov.yml NIFI-12192 Added Codecov Reporting with JaCoCo 2023-11-08 19:49:51 +00:00
doap.rdf ASF required doap file entry 2023-09-05 09:56:29 -07:00
mvnw NIFI-11689 Added Maven Wrapper with Maven 3.9.2 (#7378) 2023-06-14 15:42:27 -04:00
mvnw.cmd NIFI-11689 Added Maven Wrapper with Maven 3.9.2 (#7378) 2023-06-14 15:42:27 -04:00
pom.xml NIFI-13293 Upgraded Spring Security from 6.2.4 to 6.3.0 2024-05-25 12:18:39 -07:00

README.md

Apache NiFi

ci-workflow system-tests integration-tests docker-tests dependency-check codecov Docker pulls Version Slack

Apache NiFi is an easy to use, powerful, and reliable system to process and distribute data.

Table of Contents

Features

Apache NiFi was made for dataflow. It supports highly configurable directed graphs of data routing, transformation, and system mediation logic. Some of its key features include:

  • Web-based user interface
    • Seamless experience for design, control, and monitoring
    • Multi-tenant user experience
  • Highly configurable
    • Loss tolerant vs guaranteed delivery
    • Low latency vs high throughput
    • Dynamic prioritization
    • Flows can be modified at runtime
    • Back pressure
    • Scales up to leverage full machine capability
    • Scales out with zero-leader clustering model
  • Data Provenance
    • Track dataflow from beginning to end
  • Designed for extension
    • Build your own processors and more
    • Enables rapid development and effective testing
  • Secure
    • SSL, SSH, HTTPS, encrypted content, etc...
    • Pluggable fine-grained role-based authentication/authorization
    • Multiple teams can manage and share specific portions of the flow

Minimum Requirements

  • JDK 21
  • Apache Maven 3.9.6

Getting Started

Read through the quickstart guide for development. It will include information on getting a local copy of the source, give pointers on issue tracking, and provide some warnings about common problems with development environments.

For a more comprehensive guide to development and information about contributing to the project read through the NiFi Developer's Guide.

Building

Run the following Maven command to build standard project modules using parallel execution:

./mvnw clean install -T2C

Run the following Maven command to build project modules with static analysis to confirm compliance with code and licensing requirements:

./mvnw clean install -T2C -P contrib-check

Building on Microsoft Windows requires using mvnw.cmd instead of mwnw to run the Maven Wrapper.

Deploying

Change directories to nifi-assembly. The target directory contains binary archives.

laptop:nifi myuser$ cd nifi-assembly
laptop:nifi-assembly myuser$ ls -lhd target/nifi*
drwxr-xr-x  3 myuser  mygroup   102B Apr 30 00:29 target/nifi-1.0.0-SNAPSHOT-bin
-rw-r--r--  1 myuser  mygroup   144M Apr 30 00:30 target/nifi-1.0.0-SNAPSHOT-bin.tar.gz
-rw-r--r--  1 myuser  mygroup   144M Apr 30 00:30 target/nifi-1.0.0-SNAPSHOT-bin.zip

Copy the nifi-VERSION-bin.tar.gz or nifi-VERSION-bin.zip to a separate deployment directory. Extracting the distribution will create a new directory named for the version.

laptop:nifi-assembly myuser$ mkdir ~/example-nifi-deploy
laptop:nifi-assembly myuser$ tar xzf target/nifi-*-bin.tar.gz -C ~/example-nifi-deploy
laptop:nifi-assembly myuser$ ls -lh ~/example-nifi-deploy/
total 0
drwxr-xr-x  10 myuser  mygroup   340B Apr 30 01:06 nifi-1.0.0-SNAPSHOT

Starting

Change directories to the deployment location and run the following command to start NiFi.

laptop:~ myuser$ cd ~/example-nifi-deploy/nifi-*
laptop:nifi-1.0.0-SNAPSHOT myuser$ ./bin/nifi.sh start

Running bin/nifi.sh start starts NiFi in the background and exits. Use --wait-for-init with an optional timeout in seconds to wait for a complete startup before exiting.

laptop:nifi-1.0.0-SNAPSHOT myuser$ ./bin/nifi.sh start --wait-for-init 120

Authenticating

The default configuration generates a random username and password on startup. NiFi writes the generated credentials to the application log located in logs/nifi-app.log under the NiFi installation directory.

The following command can be used to find the generated credentials on operating systems with grep installed:

laptop:nifi-1.0.0-SNAPSHOT myuser$ grep Generated logs/nifi-app*log

NiFi logs the generated credentials as follows:

Generated Username [USERNAME]
Generated Password [PASSWORD]

The USERNAME will be a random UUID composed of 36 characters. The PASSWORD will be a random string composed of 32 characters. The generated credentials will be stored in conf/login-identity-providers.xml with the password stored using bcrypt hashing. Record these credentials in a secure location for access to NiFi.

The random username and password can be replaced with custom credentials using the following command:

./bin/nifi.sh set-single-user-credentials <username> <password>

Running

Open the following link in a web browser to access NiFi: https://localhost:8443/nifi

The web browser will display a warning message indicating a potential security risk due to the self-signed certificate NiFi generated during initialization. Accepting the potential security risk and continuing to load the interface is an option for initial development installations. Production deployments should provision a certificate from a trusted certificate authority and update the NiFi keystore and truststore configuration.

Accessing NiFi after accepting the self-signed certificate will display the login screen. NiFi Login Screen

Using the generated credentials, enter the generated username in the User field and the generated password in the Password field, then select LOG IN to access the system. NiFi Flow Authenticated Screen

Configuring

The NiFi User Guide describes how to build a data flow.

Stopping

Run the following command to stop NiFi:

laptop:~ myuser$ cd ~/example-nifi-deploy/nifi-*
laptop:nifi-1.0.0-SNAPSHOT myuser$ ./bin/nifi.sh stop

MiNiFi subproject

MiNiFi is a child project effort of Apache NiFi. It is a complementary data collection approach that supplements the core tenets of NiFi in dataflow management, focusing on the collection of data at the source of its creation.

Specific goals for MiNiFi are comprised of:

  • small and lightweight footprint
  • central management of agents
  • generation of data provenance
  • integration with NiFi for follow-on dataflow management and full chain of custody of information

Perspectives of the role of MiNiFi should be from the perspective of the agent acting immediately at, or directly adjacent to, source sensors, systems, or servers.

To run:

  • Change directory to 'minifi-assembly'. In the target directory, there should be a build of minifi.

      $ cd minifi-assembly
      $ ls -lhd target/minifi*
      drwxr-xr-x  3 user  staff   102B Jul  6 13:07 minifi-1.14.0-SNAPSHOT-bin
      -rw-r--r--  1 user  staff    39M Jul  6 13:07 minifi-1.14.0-SNAPSHOT-bin.tar.gz
      -rw-r--r--  1 user  staff    39M Jul  6 13:07 minifi-1.14.0-SNAPSHOT-bin.zip
    
  • For testing ongoing development you could use the already unpacked build present in the directory named "minifi-version-bin", where version is the current project version. To deploy in another location make use of either the tarball or zipfile and unpack them wherever you like. The distribution will be within a common parent directory named for the version.

      $ mkdir ~/example-minifi-deploy
      $ tar xzf target/minifi-*-bin.tar.gz -C ~/example-minifi-deploy
      $ ls -lh ~/example-minifi-deploy/
      total 0
      drwxr-xr-x  10 user  staff   340B Jul 6 01:06 minifi-1.14.0-SNAPSHOT
    

To run MiNiFi:

  • Change directory to the location where you installed MiNiFi and run it.

      $ cd ~/example-minifi-deploy/minifi-*
      $ ./bin/minifi.sh start
    
  • View the logs located in the logs folder $ tail -F ~/example-minifi-deploy/logs/minifi-app.log

  • For help building your first data flow and sending data to a NiFi instance see the System Admin Guide located in the docs folder or making use of the minifi-toolkit.

  • If you are testing ongoing development, you will likely want to stop your instance.

      $ cd ~/example-minifi-deploy/minifi-*
      $ ./bin/minifi.sh stop
    

Docker Build

To build:

  • Run a full NiFi build (see above for instructions). Then from the minifi/ subdirectory, execute mvn -P docker clean install. This will run the full build, create a docker image based on it, and run docker-compose integration tests. After it completes successfully, you should have an apacheminifi:{minifi.version} image that can be started with the following command (replacing {minifi.version} with the current maven version of your branch):
docker run -d -v YOUR_CONFIG.YML:/opt/minifi/minifi-${minifi.version}/conf/config.yml apacheminifi:${minifi.version}

Registry subproject

Registry—a subproject of Apache NiFi—is a complementary application that provides a central location for storage and management of shared resources across one or more instances of NiFi and/or MiNiFi.

Getting Registry Started

  1. Build NiFi (see Getting Started for NiFi )

or

Build only the Registry subproject:

cd nifi/nifi-registry
mvn clean install

If you wish to enable style and license checks, specify the contrib-check profile:

mvn clean install -Pcontrib-check
  1. Start Registry

    cd nifi-registry/nifi-registry-assembly/target/nifi-registry--bin/nifi-registry-/ ./bin/nifi-registry.sh start

Note that the application web server can take a while to load before it is accessible.

  1. Accessing the application web UI

With the default settings, the application UI will be available at http://localhost:18080/nifi-registry

  1. Accessing the application REST API

If you wish to test against the application REST API, you can access the REST API directly. With the default settings, the base URL of the REST API will be at http://localhost:18080/nifi-registry-api. A UI for testing the REST API will be available at http://localhost:18080/nifi-registry-api/swagger/ui.html

  1. Accessing the application logs

Logs will be available in logs/nifi-registry-app.log

Database Testing

In order to ensure that NiFi Registry works correctly against different relational databases, the existing integration tests can be run against different databases by leveraging the Testcontainers framework.

Spring profiles are used to control the DataSource factory that will be made available to the Spring application context. DataSource factories are provided that use the Testcontainers framework to start a Docker container for a given database and create a corresponding DataSource. If no profile is specified then an H2 DataSource will be used by default and no Docker containers are required.

Assuming Docker is running on the system where the build is running, then the following commands can be run:

Target Database Build Command
All supported mvn verify -Ptest-all-dbs
H2 (default) mvn verify
MariaDB 10.3 mvn verify -Pcontrib-check -Dspring.profiles.active=mariadb-10-3
MySQL 8 mvn verify -Pcontrib-check -Dspring.profiles.active=mysql-8
PostgreSQL 10 mvn verify -Dspring.profiles.active=postgres-10

For a full list of the available DataSource factories, consult the nifi-registry-test module.

Getting Help

If you have questions, you can reach out to our mailing list: dev@nifi.apache.org (archive). For more interactive discussions, community members can often be found in the following locations:

To submit a feature request or bug report, please file a Jira at https://issues.apache.org/jira/projects/NIFI/issues. If this is a security vulnerability report, please email security@nifi.apache.org directly and review the Apache NiFi Security Vulnerability Disclosure and Apache Software Foundation Security processes first.

Documentation

See https://nifi.apache.org/ for the latest NiFi documentation.

See https://nifi.apache.org/minifi and https://cwiki.apache.org/confluence/display/MINIFI for the latest MiNiFi-specific documentation.

See https://nifi.apache.org/registry for the latest Registry-specific documentation.

License

Except as otherwise noted this software is licensed under the Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Export Control

This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See https://www.wassenaar.org/ for more information.

The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this Apache Software Foundation distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.

The following provides more details on the included cryptographic software:

Apache NiFi uses BouncyCastle, JCraft Inc., and the built-in Java cryptography libraries for SSL, SSH, and the protection of sensitive configuration parameters. See

for more details on each of these libraries cryptography features.