-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-apache-nifi.xml
137 lines (73 loc) · 3.7 KB
/
install-apache-nifi.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<project name="install-apache-nifi" basedir="." default="install-apache-nifi">
<property name="nifi.sensitive.props.key" value="nifi-starter"/>
<condition property="isWindows">
<os family="windows" />
</condition>
<condition property="isUnix">
<os family="unix" />
</condition>
<target name="install-apache-nifi">
<echo message="Deleting Previous Nifi Installation - if applicable"/>
<delete dir="nifi-deployed/nifi-1.15.3" failonerror="false"/>
<echo message="Extracting Nifi Installation"/>
<untar dest="nifi-deployed"
compression="gzip"
src="nifi-starter-binaries/nifi/nifi-1.15.3-bin.tar.gz"/>
<echo message="Setting Up the Python Execution Space"/>
<mkdir dir="nifi-deployed/nifi-1.15.3/python"/>
<copy todir="nifi-deployed/nifi-1.15.3/python">
<fileset dir="nifi-starter-python" includes="*.py"/>
</copy>
<echo message="Setting Up the Working Directory"/>
<mkdir dir="nifi-deployed/nifi-1.15.3/nifi-starter-workdir"/>
<echo message="Setting up the Custom Accumulator NAR File"/>
<copy todir="nifi-deployed/nifi-1.15.3/lib"
file="nifi-starter-processor/nifi-dboerse-accumulator-nar/target/nifi-dboerse-accumulator-nar-1.0.2.nar"/>
<echo message="Dropping in the Example Flow File"/>
<gzip src="nifi-starter-example-flow/flow.xml"
destfile="nifi-deployed/nifi-1.15.3/conf/flow.xml.gz"
/>
<echo message="Update the Nifi Properties File with a properties key - ${nifi.sensitive.props.key}"/>
<replace file="nifi-deployed/nifi-1.15.3/conf/nifi.properties" token="nifi.sensitive.props.key=${nifi.sensitive.props.key}" value="nifi.sensitive.props.key="/>
<replace file="nifi-deployed/nifi-1.15.3/conf/nifi.properties" token="nifi.sensitive.props.key=" value="nifi.sensitive.props.key=${nifi.sensitive.props.key}"/>
<!--
<replace file="nifi-deployed/nifi-1.15.3/conf/nifi.properties" token="nifi.web.http.host=" value="nifi.web.http.host=127.0.0.1"/>
<replace file="nifi-deployed/nifi-1.15.3/conf/nifi.properties" token="nifi.web.http.port=" value="nifi.web.http.port=8080"/>
<replace file="nifi-deployed/nifi-1.15.3/conf/nifi.properties" token="nifi.web.https.host=127.0.0.1" value="nifi.web.https.host="/>
<replace file="nifi-deployed/nifi-1.15.3/conf/nifi.properties" token="nifi.web.https.port=8443" value="nifi.web.https.port="/>
-->
<echo message="Starting Up The Nifi Instance - give it a few minutes and you should be able to go to the URL https://localhost:8080"/>
<antcall target="run-nifi-win32"/>
<antcall target="run-nifi-nix"/>
</target>
<target name="run-nifi-win32" if="isWindows">
<echo message="Setting Default Username and Password as : admin / ${nifi.sensitive.props.key}"/>
<exec dir="nifi-deployed/nifi-1.15.3/bin"
executable="nifi.sh">
<arg value="set-single-user-credentials"/>
<arg value="admin"/>
<arg value="${nifi.sensitive.props.key}"/>
</exec>
<echo message="Starting up Nifi"/>
<exec dir="nifi-deployed/nifi-1.15.3/bin"
executable="run-nifi.bat">
</exec>
</target>
<target name="run-nifi-nix" if="isUnix">
<chmod dir="nifi-deployed/nifi-1.15.3/bin" perm="744" includes="**/*.sh"/>
<echo message="Setting Default Username and Password as : admin / ${nifi.sensitive.props.key}"/>
<exec dir="nifi-deployed/nifi-1.15.3/bin"
executable="sh">
<arg value="nifi.sh"/>
<arg value="set-single-user-credentials"/>
<arg value="admin"/>
<arg value="${nifi.sensitive.props.key}"/>
</exec>
<echo message="Starting up Nifi"/>
<exec dir="nifi-deployed/nifi-1.15.3/bin"
executable="sh" spawn="true">
<arg value="nifi.sh"/>
<arg value="start"/>
</exec>
</target>
</project>