SlideShare una empresa de Scribd logo
1 de 11
Descargar para leer sin conexión
Introduction	to	NiFi	Registry
Bryan	Bende	&	Kevin	Doran
April	17th 2018
2 ©	Hortonworks	Inc.	2011	– 2018.	All	Rights	Reserved
Background
à Most	frequently	asked	question…
– How	do	I	deploy	my	flow?
à In	theory….
– Avoid	long	turn	around	time	of	deployments
– Quickly	modify	dataflow	via	NiFi	UI
à In	reality…
– Classic	development	lifecycle	(dev	->	int	->	prod)
– Promote	changes	after	successful	testing
– Hands-off	UI	in	production
3 ©	Hortonworks	Inc.	2011	– 2018.	All	Rights	Reserved
Previous	Deployment	Approaches
à Copy	flow.xml.gz	between	environments
– Requires	copying	entire	data	flow	for	any	change
– Can’t	tell	what	changed,	hard	to	diff	if	you	put	in	version	control
– Requires	all	environments	use	the	same	encryption	key	for	sensitive	properties
à Make	templates	of	process	groups
– Script	creation	of	template	and	deployment	to	next	environment
– Requires	stopping	flow	and	removing	components,	then	re-instantiating	template
– No	easy	way	to	see	changes,	hard	to	rollback
4 ©	Hortonworks	Inc.	2011	– 2018.	All	Rights	Reserved
Previous	Variable	Handling
à Need	to	parametrize	values	in	the	flow	per	environment
– Connection	strings,	URLs,	File	System	paths,	etc.
à Can	set	variables	in	bootstrap.conf
– -Dmy.var=foo
à Can	set	a	properties	file	in	nifi.properties
– nifi.variable.registry.properties=production.properties
à Both	require	command	line	access
à Both	require	restart	of	entire	NiFi	instance	to	pick	up	changes
5 ©	Hortonworks	Inc.	2011	– 2018.	All	Rights	Reserved
Enter	NiFi	Registry
à NiFi	Registry	- sub-project	of	Apache	NiFi
– https://github.com/apache/nifi-registry
– https://issues.apache.org/jira/projects/NIFIREG
à Complimentary	application,	central	location	for	
storage/management	of	“versioned”	resources
à Initial	capability	to	store	and	retrieve	“versioned	
flows”
à Integration	on	NiFi	side
– Start/Stop	version	control	of	a	process	group
– Change	version	(upgrade/downgrade)
– Import	new	process	group	from	a	version
6 ©	Hortonworks	Inc.	2011	– 2018.	All	Rights	Reserved
Enter	Variable	Registry
à Parameterize	configuration	like	connection	
strings,	file	paths,	etc.
à Referenced	via	Expression	language
– Kafka Brokers = ${kafka.brokers}
à Variables	associated	with	a	process	group
à Right-click	on	canvas	to	view	variables	for	
current	process	group
à Hierarchical	order	of	precedence,	resolve	
closest	reference	to	component
à Editing	variables	automatically	restarts	
any	components	referencing	the	variables!
Level	1
Level	2
Vars
Vars
7 ©	Hortonworks	Inc.	2011	– 2018.	All	Rights	Reserved
NiFi	Registry	Terminology
à Buckets
– Logical	place	to	store	versioned	items/resources
– Permissions	assigned	at	bucket	level	
• READ	- Retrieve	any	item	from	the	bucket
• WRITE	– Create	new	items	in	the	bucket
à Versioned	Flows
– Currently	the	only	type	of	item
– Each	versioned	flow	has	name,	description,	and	1	or	more	“snapshots”
à Versioned	Flow	Snapshot
– Each	snapshot	has	metadata	and	contents
– Metadata	contains	a	one-up	version	#,	commit	message,	author,		&	create	date
– Content	contains	a	Versioned	Process	Group	i.e.	snapshot	of	PG	from	NiFi
8 ©	Hortonworks	Inc.	2011	– 2018.	All	Rights	Reserved
Architecture
à Metadata	Database
– Metadata	for	each	bucket
– Knowledge	of	which	items	are	in	each	bucket
– Metadata	for	each	versions	of	an	item
– Currently	uses	embedded	H2	DB
à Flow	Persistence	Provider
– Stores/retrieves	serialized	bytes	of	a	versioned	flow
– Pluggable	extension	point
– Provided	implementation	uses	local	file	system
– NIFIREG-162	Git-based	implementation
• https://github.com/apache/nifi-registry/pull/112
Client	UI	(Angular)
Server (Spring	Boot)
REST	API	(Jersey)
Service	Layer (Spring,	Java)
Metadata	Database
Flow	Persistence	
Provider
H2 File	System
=	Extension	Point
9 ©	Hortonworks	Inc.	2011	– 2018.	All	Rights	Reserved
StagingDev
Deployment	Scenario	1	– Shared	Registry	with	Multiple	NiFi’s
NiFi	Registry
NiFi NiFi
Production
NiFi
1.	Start	version	
control	and	save
new	versions
2.	Import	flow	
from	Dev	and
Perform	testing
3.	Import	flow	
that	passed	tests	
in	staging
LDAP
10 ©	Hortonworks	Inc.	2011	– 2018.	All	Rights	Reserved
Deployment	Scenario	2	– Separate	Environments
StagingDev
NiFi	Registry
NiFi NiFi
Production
NiFi
1.	Start	version	
control	and	save
new	versions
3.	Import	flow	
version	& test 4.	Manually	
move	specific	
version	to	prod	
registry
NiFi	Registry NiFi	Registry
LDAP LDAPLDAP
2.	Manually	
move	specific	
version	to	
staging	registry
5.	Import	flow	
version	and	start
11 ©	Hortonworks	Inc.	2011	– 2018.	All	Rights	Reserved
Tools	&	Automation
à NiPyApi
– Python	wrapper	for	NiFi	&	NiFi	Registry	REST	APIs
– https://github.com/Chaffelson/nipyapi
à NiFi	CLI
– Part	of	nifi-toolkit	released	with	Apache	NiFi	1.6.0
– https://github.com/apache/nifi/tree/master/nifi-toolkit/nifi-toolkit-cli
– README	file	at	above	location	has	documentation	to	get	started

Más contenido relacionado

La actualidad más candente

Filesystem Comparison: NFS vs GFS2 vs OCFS2
Filesystem Comparison: NFS vs GFS2 vs OCFS2Filesystem Comparison: NFS vs GFS2 vs OCFS2
Filesystem Comparison: NFS vs GFS2 vs OCFS2
Giuseppe Paterno'
 

La actualidad más candente (20)

Security and Data Governance using Apache Ranger and Apache Atlas
Security and Data Governance using Apache Ranger and Apache AtlasSecurity and Data Governance using Apache Ranger and Apache Atlas
Security and Data Governance using Apache Ranger and Apache Atlas
 
Hive Does ACID
Hive Does ACIDHive Does ACID
Hive Does ACID
 
Hive Authorization
Hive AuthorizationHive Authorization
Hive Authorization
 
Tuning Apache Ambari performance for Big Data at scale with 3000 agents
Tuning Apache Ambari performance for Big Data at scale with 3000 agentsTuning Apache Ambari performance for Big Data at scale with 3000 agents
Tuning Apache Ambari performance for Big Data at scale with 3000 agents
 
Hive vs. Impala
Hive vs. ImpalaHive vs. Impala
Hive vs. Impala
 
CNIT 126 5: IDA Pro
CNIT 126 5: IDA ProCNIT 126 5: IDA Pro
CNIT 126 5: IDA Pro
 
Vmware training presentation
Vmware training presentationVmware training presentation
Vmware training presentation
 
Running Apache NiFi with Apache Spark : Integration Options
Running Apache NiFi with Apache Spark : Integration OptionsRunning Apache NiFi with Apache Spark : Integration Options
Running Apache NiFi with Apache Spark : Integration Options
 
Introduction to Linux
Introduction to Linux Introduction to Linux
Introduction to Linux
 
Nifi
NifiNifi
Nifi
 
Apache NiFi Meetup - Princeton NJ 2016
Apache NiFi Meetup - Princeton NJ 2016Apache NiFi Meetup - Princeton NJ 2016
Apache NiFi Meetup - Princeton NJ 2016
 
Introducing GitLab (June 2018)
Introducing GitLab (June 2018)Introducing GitLab (June 2018)
Introducing GitLab (June 2018)
 
14 things you need to be a successful software developer (v3)
14 things you need to be a successful software developer (v3)14 things you need to be a successful software developer (v3)
14 things you need to be a successful software developer (v3)
 
Dynamic filtering for presto join optimisation
Dynamic filtering for presto join optimisationDynamic filtering for presto join optimisation
Dynamic filtering for presto join optimisation
 
Hadoop Backup and Disaster Recovery
Hadoop Backup and Disaster RecoveryHadoop Backup and Disaster Recovery
Hadoop Backup and Disaster Recovery
 
Scaling HBase for Big Data
Scaling HBase for Big DataScaling HBase for Big Data
Scaling HBase for Big Data
 
The Google Chubby lock service for loosely-coupled distributed systems
The Google Chubby lock service for loosely-coupled distributed systemsThe Google Chubby lock service for loosely-coupled distributed systems
The Google Chubby lock service for loosely-coupled distributed systems
 
Filesystem Comparison: NFS vs GFS2 vs OCFS2
Filesystem Comparison: NFS vs GFS2 vs OCFS2Filesystem Comparison: NFS vs GFS2 vs OCFS2
Filesystem Comparison: NFS vs GFS2 vs OCFS2
 
Road to NODES - Handling Neo4j Data with Apache Hop
Road to NODES - Handling Neo4j Data with Apache HopRoad to NODES - Handling Neo4j Data with Apache Hop
Road to NODES - Handling Neo4j Data with Apache Hop
 
Meet hbase 2.0
Meet hbase 2.0Meet hbase 2.0
Meet hbase 2.0
 

Similar a Apache NiFi Meetup - Introduction to NiFi Registry

Using Spark Streaming and NiFi for the Next Generation of ETL in the Enterprise
Using Spark Streaming and NiFi for the Next Generation of ETL in the EnterpriseUsing Spark Streaming and NiFi for the Next Generation of ETL in the Enterprise
Using Spark Streaming and NiFi for the Next Generation of ETL in the Enterprise
DataWorks Summit
 
Weeks [01 02] 20100921
Weeks [01 02] 20100921Weeks [01 02] 20100921
Weeks [01 02] 20100921
Mohamed Kamel
 
Using Spark Streaming and NiFi for the next generation of ETL in the enterprise
Using Spark Streaming and NiFi for the next generation of ETL in the enterpriseUsing Spark Streaming and NiFi for the next generation of ETL in the enterprise
Using Spark Streaming and NiFi for the next generation of ETL in the enterprise
DataWorks Summit
 

Similar a Apache NiFi Meetup - Introduction to NiFi Registry (20)

Using Spark Streaming and NiFi for the Next Generation of ETL in the Enterprise
Using Spark Streaming and NiFi for the Next Generation of ETL in the EnterpriseUsing Spark Streaming and NiFi for the Next Generation of ETL in the Enterprise
Using Spark Streaming and NiFi for the Next Generation of ETL in the Enterprise
 
OOW15 - Online Patching with Oracle E-Business Suite 12.2
OOW15 - Online Patching with Oracle E-Business Suite 12.2OOW15 - Online Patching with Oracle E-Business Suite 12.2
OOW15 - Online Patching with Oracle E-Business Suite 12.2
 
The Unbearable Lightness of Ephemeral Processing
The Unbearable Lightness of Ephemeral ProcessingThe Unbearable Lightness of Ephemeral Processing
The Unbearable Lightness of Ephemeral Processing
 
Weeks [01 02] 20100921
Weeks [01 02] 20100921Weeks [01 02] 20100921
Weeks [01 02] 20100921
 
Hortonworks Data in Motion Webinar Series - Part 1
Hortonworks Data in Motion Webinar Series - Part 1Hortonworks Data in Motion Webinar Series - Part 1
Hortonworks Data in Motion Webinar Series - Part 1
 
Harnessing Data-in-Motion with HDF 2.0, introduction to Apache NIFI/MINIFI
Harnessing Data-in-Motion with HDF 2.0, introduction to Apache NIFI/MINIFIHarnessing Data-in-Motion with HDF 2.0, introduction to Apache NIFI/MINIFI
Harnessing Data-in-Motion with HDF 2.0, introduction to Apache NIFI/MINIFI
 
Using Spark Streaming and NiFi for the next generation of ETL in the enterprise
Using Spark Streaming and NiFi for the next generation of ETL in the enterpriseUsing Spark Streaming and NiFi for the next generation of ETL in the enterprise
Using Spark Streaming and NiFi for the next generation of ETL in the enterprise
 
Curing the Kafka blindness—Streams Messaging Manager
Curing the Kafka blindness—Streams Messaging ManagerCuring the Kafka blindness—Streams Messaging Manager
Curing the Kafka blindness—Streams Messaging Manager
 
Apache NiFi - Flow Based Programming Meetup
Apache NiFi - Flow Based Programming MeetupApache NiFi - Flow Based Programming Meetup
Apache NiFi - Flow Based Programming Meetup
 
Webinar Series Part 5 New Features of HDF 5
Webinar Series Part 5 New Features of HDF 5Webinar Series Part 5 New Features of HDF 5
Webinar Series Part 5 New Features of HDF 5
 
Taking DataFlow Management to the Edge with Apache NiFi/MiNiFi
Taking DataFlow Management to the Edge with Apache NiFi/MiNiFiTaking DataFlow Management to the Edge with Apache NiFi/MiNiFi
Taking DataFlow Management to the Edge with Apache NiFi/MiNiFi
 
Hadoop & Cloud Storage: Object Store Integration in Production
Hadoop & Cloud Storage: Object Store Integration in ProductionHadoop & Cloud Storage: Object Store Integration in Production
Hadoop & Cloud Storage: Object Store Integration in Production
 
OpenStack Murano
OpenStack MuranoOpenStack Murano
OpenStack Murano
 
Hadoop & cloud storage object store integration in production (final)
Hadoop & cloud storage  object store integration in production (final)Hadoop & cloud storage  object store integration in production (final)
Hadoop & cloud storage object store integration in production (final)
 
OOW16 - Online Patching with Oracle E-Business Suite 12.2 [CON6710]
OOW16 - Online Patching with Oracle E-Business Suite 12.2 [CON6710]OOW16 - Online Patching with Oracle E-Business Suite 12.2 [CON6710]
OOW16 - Online Patching with Oracle E-Business Suite 12.2 [CON6710]
 
HDF: Hortonworks DataFlow: Technical Workshop
HDF: Hortonworks DataFlow: Technical WorkshopHDF: Hortonworks DataFlow: Technical Workshop
HDF: Hortonworks DataFlow: Technical Workshop
 
Hadoop & Cloud Storage: Object Store Integration in Production
Hadoop & Cloud Storage: Object Store Integration in ProductionHadoop & Cloud Storage: Object Store Integration in Production
Hadoop & Cloud Storage: Object Store Integration in Production
 
The hourly network outage - Booking.com.pdf
The hourly network outage - Booking.com.pdfThe hourly network outage - Booking.com.pdf
The hourly network outage - Booking.com.pdf
 
Hadoop operations-2015-hadoop-summit-san-jose-v5
Hadoop operations-2015-hadoop-summit-san-jose-v5Hadoop operations-2015-hadoop-summit-san-jose-v5
Hadoop operations-2015-hadoop-summit-san-jose-v5
 
Hadoop Operations - Best Practices from the Field
Hadoop Operations - Best Practices from the FieldHadoop Operations - Best Practices from the Field
Hadoop Operations - Best Practices from the Field
 

Más de Bryan Bende

Más de Bryan Bende (10)

Devnexus 2018 - Let Your Data Flow with Apache NiFi
Devnexus 2018 - Let Your Data Flow with Apache NiFiDevnexus 2018 - Let Your Data Flow with Apache NiFi
Devnexus 2018 - Let Your Data Flow with Apache NiFi
 
You Can't Search Without Data
You Can't Search Without DataYou Can't Search Without Data
You Can't Search Without Data
 
Apache NiFi Record Processing
Apache NiFi Record ProcessingApache NiFi Record Processing
Apache NiFi Record Processing
 
NJ Hadoop Meetup - Apache NiFi Deep Dive
NJ Hadoop Meetup - Apache NiFi Deep DiveNJ Hadoop Meetup - Apache NiFi Deep Dive
NJ Hadoop Meetup - Apache NiFi Deep Dive
 
Apache NiFi in the Hadoop Ecosystem
Apache NiFi in the Hadoop EcosystemApache NiFi in the Hadoop Ecosystem
Apache NiFi in the Hadoop Ecosystem
 
Integrating NiFi and Apex
Integrating NiFi and ApexIntegrating NiFi and Apex
Integrating NiFi and Apex
 
Integrating NiFi and Flink
Integrating NiFi and FlinkIntegrating NiFi and Flink
Integrating NiFi and Flink
 
Building Data Pipelines for Solr with Apache NiFi
Building Data Pipelines for Solr with Apache NiFiBuilding Data Pipelines for Solr with Apache NiFi
Building Data Pipelines for Solr with Apache NiFi
 
Document Similarity with Cloud Computing
Document Similarity with Cloud ComputingDocument Similarity with Cloud Computing
Document Similarity with Cloud Computing
 
Real-Time Inverted Search NYC ASLUG Oct 2014
Real-Time Inverted Search NYC ASLUG Oct 2014Real-Time Inverted Search NYC ASLUG Oct 2014
Real-Time Inverted Search NYC ASLUG Oct 2014
 

Último

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 

Último (20)

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 

Apache NiFi Meetup - Introduction to NiFi Registry

  • 2. 2 © Hortonworks Inc. 2011 – 2018. All Rights Reserved Background à Most frequently asked question… – How do I deploy my flow? à In theory…. – Avoid long turn around time of deployments – Quickly modify dataflow via NiFi UI à In reality… – Classic development lifecycle (dev -> int -> prod) – Promote changes after successful testing – Hands-off UI in production
  • 3. 3 © Hortonworks Inc. 2011 – 2018. All Rights Reserved Previous Deployment Approaches à Copy flow.xml.gz between environments – Requires copying entire data flow for any change – Can’t tell what changed, hard to diff if you put in version control – Requires all environments use the same encryption key for sensitive properties à Make templates of process groups – Script creation of template and deployment to next environment – Requires stopping flow and removing components, then re-instantiating template – No easy way to see changes, hard to rollback
  • 4. 4 © Hortonworks Inc. 2011 – 2018. All Rights Reserved Previous Variable Handling à Need to parametrize values in the flow per environment – Connection strings, URLs, File System paths, etc. à Can set variables in bootstrap.conf – -Dmy.var=foo à Can set a properties file in nifi.properties – nifi.variable.registry.properties=production.properties à Both require command line access à Both require restart of entire NiFi instance to pick up changes
  • 5. 5 © Hortonworks Inc. 2011 – 2018. All Rights Reserved Enter NiFi Registry à NiFi Registry - sub-project of Apache NiFi – https://github.com/apache/nifi-registry – https://issues.apache.org/jira/projects/NIFIREG à Complimentary application, central location for storage/management of “versioned” resources à Initial capability to store and retrieve “versioned flows” à Integration on NiFi side – Start/Stop version control of a process group – Change version (upgrade/downgrade) – Import new process group from a version
  • 6. 6 © Hortonworks Inc. 2011 – 2018. All Rights Reserved Enter Variable Registry à Parameterize configuration like connection strings, file paths, etc. à Referenced via Expression language – Kafka Brokers = ${kafka.brokers} à Variables associated with a process group à Right-click on canvas to view variables for current process group à Hierarchical order of precedence, resolve closest reference to component à Editing variables automatically restarts any components referencing the variables! Level 1 Level 2 Vars Vars
  • 7. 7 © Hortonworks Inc. 2011 – 2018. All Rights Reserved NiFi Registry Terminology à Buckets – Logical place to store versioned items/resources – Permissions assigned at bucket level • READ - Retrieve any item from the bucket • WRITE – Create new items in the bucket à Versioned Flows – Currently the only type of item – Each versioned flow has name, description, and 1 or more “snapshots” à Versioned Flow Snapshot – Each snapshot has metadata and contents – Metadata contains a one-up version #, commit message, author, & create date – Content contains a Versioned Process Group i.e. snapshot of PG from NiFi
  • 8. 8 © Hortonworks Inc. 2011 – 2018. All Rights Reserved Architecture à Metadata Database – Metadata for each bucket – Knowledge of which items are in each bucket – Metadata for each versions of an item – Currently uses embedded H2 DB à Flow Persistence Provider – Stores/retrieves serialized bytes of a versioned flow – Pluggable extension point – Provided implementation uses local file system – NIFIREG-162 Git-based implementation • https://github.com/apache/nifi-registry/pull/112 Client UI (Angular) Server (Spring Boot) REST API (Jersey) Service Layer (Spring, Java) Metadata Database Flow Persistence Provider H2 File System = Extension Point
  • 9. 9 © Hortonworks Inc. 2011 – 2018. All Rights Reserved StagingDev Deployment Scenario 1 – Shared Registry with Multiple NiFi’s NiFi Registry NiFi NiFi Production NiFi 1. Start version control and save new versions 2. Import flow from Dev and Perform testing 3. Import flow that passed tests in staging LDAP
  • 10. 10 © Hortonworks Inc. 2011 – 2018. All Rights Reserved Deployment Scenario 2 – Separate Environments StagingDev NiFi Registry NiFi NiFi Production NiFi 1. Start version control and save new versions 3. Import flow version & test 4. Manually move specific version to prod registry NiFi Registry NiFi Registry LDAP LDAPLDAP 2. Manually move specific version to staging registry 5. Import flow version and start
  • 11. 11 © Hortonworks Inc. 2011 – 2018. All Rights Reserved Tools & Automation à NiPyApi – Python wrapper for NiFi & NiFi Registry REST APIs – https://github.com/Chaffelson/nipyapi à NiFi CLI – Part of nifi-toolkit released with Apache NiFi 1.6.0 – https://github.com/apache/nifi/tree/master/nifi-toolkit/nifi-toolkit-cli – README file at above location has documentation to get started