🐳+💧
UPPING YOUR NIFI GAME WITH DOCKER
29 OCTOBER 2015
Aldrin Piri
@aldrinpiri
WHAT IS DOCKER?
A line of khakis, pants and casual clothing
It’s an obscure open source project
WHAT IS DOCKER?
“Docker is an open platform for building, shipping and
running distributed applications. It gives programmers,
development teams and operations engineers the common
toolbox they need to take advantage of the distributed and
networked nature of modern applications.”
DOCKER IS AN
ECOSYSTEM
Docker Hub https://hub.docker.com/
• A registry of available images
Tooling
• Linux provides a native experience
• Windows & OS X make use of a VM and
associated tools
People and Organizations
GLOSSARY FOR THE
TALK
Image
• Binary representation of a filesystem
Container
• Instance of an image
Copy on Write
• Images are untouched until changes are needed, at which
point a new copy is created
Volumes
• Bridge the external host world into the container
ENVIRONMENT
OS X 10.10
Docker Toolbox
• https://www.docker.com/docker-toolbox
Docker, Docker Machine, & Docker Compose
DOCKER-MACHINE
Provisions Docker environments
• Locally: Native Docker daemon, VirtualBox
• Cloud: Amazon EC2, Azure, DigitalOcean…
Establishes command line for communicating with instances
DOCKER
• Run images to create containers
• The lifespan of a container is tied to the process that originates it
• Defaults specified via ENTRYPOINT or CMD
• Specify arguments on run inclusive of providing
• Volumes
• Links to other running containers (unidirectional network mappings
via an alias)
• Environment variables
• Exposed Ports
• Alternate ENTRYPOINT/CMD
• If an image is present, it will attempt to be pulled from the Docker
Hub and locally cached
OUR BASE DOCKER
IMAGE
aldrin/apache-nifi
• Docker Hub
• https://hub.docker.com/r/aldrin/apache-nifi/
• Source
• https://github.com/apiri/dockerfile-apache-nifi
WHERE DOES IT ALL
COME FROM?
Dockerfile is our source code
WHERE DOES IT ALL
COME FROM?
An image is our compiled binary
DOCKER FOR
DEVELOPING
Volumes allow mapping libraries directly into the
environment
Links allow interacting with services at defined aliases
CLUSTERING
DOCKER NETWORK
Docker’s libnetwork makes great strides in increasing the
networking model
• Service Discovery
• Pluggable drivers
Unfortunately, it has not been released
• Coming soon: ~1.9.0
There are a few ways to handle this with the current release
inclusive of running a DNS server/service discovery, but we
are going a simple route for ease.

ENTER
AMBASSADORS
Provides service/container portability as links are hardcoded
Manager Node
Manager
Ambassador
Node
Ambassador
INTRODUCING
DOCKER COMPOSE
• Originally a project called fig
• Provides the definition and running of multi-container
applications
• YAML descriptor files
• docker-compose drives controlling the application

DOCKER-COMPOSE.YML

RESOURCES
Docker
• https://www.docker.com/
Visualizing Docker Containers and Images
• http://merrigrove.blogspot.com/2015/10/visualizing-docker-containers-
and-images.html
Jess Frazelle - Dockerize everything
• Container Hacks and Fun Images Presentation
• https://www.youtube.com/watch?v=1qlLUf7KtAw
• https://github.com/jfrazelle
Source Code and “Script”
• https://github.com/apiri/docker-with-nifi
THANKS!

Upping your NiFi Game with Docker

  • 1.
    🐳+💧 UPPING YOUR NIFIGAME WITH DOCKER 29 OCTOBER 2015 Aldrin Piri @aldrinpiri
  • 2.
    WHAT IS DOCKER? Aline of khakis, pants and casual clothing It’s an obscure open source project
  • 3.
    WHAT IS DOCKER? “Dockeris an open platform for building, shipping and running distributed applications. It gives programmers, development teams and operations engineers the common toolbox they need to take advantage of the distributed and networked nature of modern applications.”
  • 4.
    DOCKER IS AN ECOSYSTEM DockerHub https://hub.docker.com/ • A registry of available images Tooling • Linux provides a native experience • Windows & OS X make use of a VM and associated tools People and Organizations
  • 5.
    GLOSSARY FOR THE TALK Image •Binary representation of a filesystem Container • Instance of an image Copy on Write • Images are untouched until changes are needed, at which point a new copy is created Volumes • Bridge the external host world into the container
  • 6.
    ENVIRONMENT OS X 10.10 DockerToolbox • https://www.docker.com/docker-toolbox Docker, Docker Machine, & Docker Compose
  • 7.
    DOCKER-MACHINE Provisions Docker environments •Locally: Native Docker daemon, VirtualBox • Cloud: Amazon EC2, Azure, DigitalOcean… Establishes command line for communicating with instances
  • 8.
    DOCKER • Run imagesto create containers • The lifespan of a container is tied to the process that originates it • Defaults specified via ENTRYPOINT or CMD • Specify arguments on run inclusive of providing • Volumes • Links to other running containers (unidirectional network mappings via an alias) • Environment variables • Exposed Ports • Alternate ENTRYPOINT/CMD • If an image is present, it will attempt to be pulled from the Docker Hub and locally cached
  • 9.
    OUR BASE DOCKER IMAGE aldrin/apache-nifi •Docker Hub • https://hub.docker.com/r/aldrin/apache-nifi/ • Source • https://github.com/apiri/dockerfile-apache-nifi
  • 10.
    WHERE DOES ITALL COME FROM? Dockerfile is our source code
  • 11.
    WHERE DOES ITALL COME FROM? An image is our compiled binary
  • 12.
    DOCKER FOR DEVELOPING Volumes allowmapping libraries directly into the environment Links allow interacting with services at defined aliases
  • 13.
  • 14.
    DOCKER NETWORK Docker’s libnetworkmakes great strides in increasing the networking model • Service Discovery • Pluggable drivers Unfortunately, it has not been released • Coming soon: ~1.9.0 There are a few ways to handle this with the current release inclusive of running a DNS server/service discovery, but we are going a simple route for ease. 
  • 15.
    ENTER AMBASSADORS Provides service/container portabilityas links are hardcoded Manager Node Manager Ambassador Node Ambassador
  • 16.
    INTRODUCING DOCKER COMPOSE • Originallya project called fig • Provides the definition and running of multi-container applications • YAML descriptor files • docker-compose drives controlling the application 
  • 17.
  • 18.
    RESOURCES Docker • https://www.docker.com/ Visualizing DockerContainers and Images • http://merrigrove.blogspot.com/2015/10/visualizing-docker-containers- and-images.html Jess Frazelle - Dockerize everything • Container Hacks and Fun Images Presentation • https://www.youtube.com/watch?v=1qlLUf7KtAw • https://github.com/jfrazelle Source Code and “Script” • https://github.com/apiri/docker-with-nifi
  • 19.