19
+ UPPING YOUR NIFI GAME WITH DOCKER 29 OCTOBER 2015 Aldrin Piri @aldrinpiri

Upping your NiFi Game with Docker

Embed Size (px)

Citation preview

Page 1: Upping your NiFi Game with Docker

šŸ³+šŸ’§UPPING YOUR NIFI GAME WITH DOCKER29 OCTOBER 2015

Aldrin Piri@aldrinpiri

Page 2: Upping your NiFi Game with Docker

WHAT IS DOCKER?A line of khakis, pants and casual clothing

Itā€™s an obscure open source project

Page 3: Upping your NiFi Game with Docker

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.ā€

Page 4: Upping your NiFi Game with Docker

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

Page 5: Upping your NiFi Game with Docker

GLOSSARY FOR THE TALKImage

ā€¢ Binary representation of a filesystemContainer

ā€¢ Instance of an imageCopy 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

Page 6: Upping your NiFi Game with Docker

ENVIRONMENTOS X 10.10Docker Toolbox

ā€¢ https://www.docker.com/docker-toolbox

Docker, Docker Machine, & Docker Compose

Page 7: Upping your NiFi Game with Docker

DOCKER-MACHINEProvisions Docker environments

ā€¢ Locally: Native Docker daemon, VirtualBox

ā€¢ Cloud: Amazon EC2, Azure, DigitalOceanā€¦

Establishes command line for communicating with instances

Page 8: Upping your NiFi Game with Docker

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

Page 9: Upping your NiFi Game with Docker

OUR BASE DOCKER IMAGEaldrin/apache-nifi

ā€¢ Docker Hubā€¢ https://hub.docker.com/r/aldrin/apache-nifi/

ā€¢ Sourceā€¢ https://github.com/apiri/dockerfile-apache-nifi

Page 10: Upping your NiFi Game with Docker

WHERE DOES IT ALL COME FROM?Dockerfile is our source code

Page 11: Upping your NiFi Game with Docker

WHERE DOES IT ALL COME FROM?An image is our compiled binary

Page 12: Upping your NiFi Game with Docker

DOCKER FOR DEVELOPINGVolumes allow mapping libraries directly into the environment

Links allow interacting with services at defined aliases

Page 13: Upping your NiFi Game with Docker

CLUSTERING

Page 14: Upping your NiFi Game with Docker

DOCKER NETWORKDockerā€™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.

Page 15: Upping your NiFi Game with Docker

ENTER AMBASSADORSProvides service/container portability as links are hardcoded

Manager Node

ManagerAmbassador

NodeAmbassador

Page 16: Upping your NiFi Game with Docker

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

Page 17: Upping your NiFi Game with Docker

DOCKER-COMPOSE.YML

Page 18: Upping your NiFi Game with Docker

RESOURCESDocker

ā€¢ 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

Page 19: Upping your NiFi Game with Docker

THANKS!