-
Notifications
You must be signed in to change notification settings - Fork 38
Advanced Deployment Spec Syntax
Andrew Grande edited this page Apr 28, 2016
·
1 revision
Consider the following deployment specification:
-
Postgres Poolis a controller service defined in thedbtest.xmltemplate. Pro Tip: use NiFi Template Inspector to generate these for you and adjust only what needs to change! -
Note how we override the DB url and driver location to match our deployment environment (instead of what was put in the template).
-
Finally, the
Execute SQLcomponent needs a DB connection pool service to operate, which we provide as a reference${Postgres Pool}. This is the name of the controller service we have just reconfigured.
nifi:
templateUri: file:./dbtest.xml
templateName: dbtest
url: http://localhost:8080
undeploy:
templates:
- dbtest
processGroups:
- db service
controllerServices:
- Postgres Pool
controllerServices:
Postgres Pool:
state: ENABLED
config:
Database Connection URL: jdbc:postgresql://postgres/postgres
Database Driver Jar Url: file:///opt/postgresql-9.4.1208.jre7.jar
processGroups:
db service:
processors:
ExecuteSQL:
config:
Database Connection Pooling Service: ${Postgres Pool}