Community Articles

Find and share helpful community-sourced technical articles.
Labels (1)
avatar
Super Guru

The NiFi community maintains a NiFi Docker image that comes very handy when you want to play with NiFi on your laptop. When you develop flows to run in a NiFi cluster with 2 or more nodes, though, there are things that you need to check and test differently from a single-node NiFi cluster.

 

Recently, @Arqui shared a docker-compose configuration in this forum question that creates a 2-node NiFi cluster on Docker. The compose configuration still had a few issues to be ironed, though, and there were some manual steps you still had to perform before launching the cluster, like creating the TLS certificates for it.

 

I found the idea interesting and spent some time working out the missing details. I also automated the TLS certificate creation and added a load-balancer to the compose configuration. Now, to use your own NiFi sanbox cluster, all you need to do is this:

 

  1. Download the docker-compose.yml file (see repo link below)
  2. Run "docker compose up -d"
  3. Connect to your own local 2-node cluster on http://localhost:8443/nifi.

 

I've been pretty happy with the result and that's what I now use on my laptop when I want to test something out quickly.

 

I hope this can be useful for others too: https://github.com/asdaraujo/nifi-stuff/tree/main/nifi-docker-compose

 

Cheers,

André

 

7,084 Views
Comments
avatar
Contributor

Thanks for this.