pom.xml 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Licensed to the Apache Software Foundation (ASF) under one
  4. ~ or more contributor license agreements. See the NOTICE file
  5. ~ distributed with this work for additional information
  6. ~ regarding copyright ownership. The ASF licenses this file
  7. ~ to you under the Apache License, Version 2.0 (the
  8. ~ "License"); you may not use this file except in compliance
  9. ~ with the License. You may obtain a copy of the License at
  10. ~
  11. ~ http://www.apache.org/licenses/LICENSE-2.0
  12. ~
  13. ~ Unless required by applicable law or agreed to in writing, software
  14. ~ distributed under the License is distributed on an "AS IS" BASIS,
  15. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. ~ See the License for the specific language governing permissions and
  17. ~ limitations under the License.
  18. -->
  19. <project xmlns="http://maven.apache.org/POM/4.0.0"
  20. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  21. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  22. <parent>
  23. <artifactId>ambari-metrics</artifactId>
  24. <groupId>org.apache.ambari</groupId>
  25. <version>2.0.0-SNAPSHOT</version>
  26. </parent>
  27. <modelVersion>4.0.0</modelVersion>
  28. <artifactId>ambari-metrics-assembly</artifactId>
  29. <name>Ambari Metrics Assembly</name>
  30. <packaging>pom</packaging>
  31. <version>2.0.0-SNAPSHOT</version>
  32. <properties>
  33. <collector.dir>${project.basedir}/../ambari-metrics-timelineservice</collector.dir>
  34. <monitor.dir>${project.basedir}/../ambari-metrics-host-monitoring</monitor.dir>
  35. <hadoop-sink.dir>${project.basedir}/../ambari-metrics-hadoop-sink</hadoop-sink.dir>
  36. <storm-sink.dir>${project.basedir}/../ambari-metrics-storm-sink</storm-sink.dir>
  37. <flume-sink.dir>${project.basedir}/../ambari-metrics-flume-sink</flume-sink.dir>
  38. <kafka-sink.dir>${project.basedir}/../ambari-metrics-kafka-sink</kafka-sink.dir>
  39. <python.ver>python &gt;= 2.6</python.ver>
  40. <python.devel>python-devel</python.devel>
  41. <deb.python.ver>python (&gt;= 2.6)</deb.python.ver>
  42. <deb.architecture>amd64</deb.architecture>
  43. <deb.dependency.list>${deb.python.ver},python-dev,gcc</deb.dependency.list>
  44. <hadoop.sink.jar>ambari-metrics-hadoop-sink-with-common-${project.version}.jar</hadoop.sink.jar>
  45. <storm.sink.jar>ambari-metrics-storm-sink-with-common-${project.version}.jar</storm.sink.jar>
  46. <flume.sink.jar>ambari-metrics-flume-sink-with-common-${project.version}.jar</flume.sink.jar>
  47. <kafka.sink.jar>ambari-metrics-kafka-sink-with-common-${project.version}.jar</kafka.sink.jar>
  48. </properties>
  49. <build>
  50. <plugins>
  51. <plugin>
  52. <groupId>org.codehaus.mojo</groupId>
  53. <artifactId>build-helper-maven-plugin</artifactId>
  54. <version>1.8</version>
  55. <executions>
  56. <execution>
  57. <id>parse-version</id>
  58. <phase>validate</phase>
  59. <goals>
  60. <goal>parse-version</goal>
  61. </goals>
  62. </execution>
  63. <execution>
  64. <id>regex-property</id>
  65. <goals>
  66. <goal>regex-property</goal>
  67. </goals>
  68. <configuration>
  69. <name>ambariVersion</name>
  70. <value>${project.version}</value>
  71. <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
  72. <replacement>$1.$2.$3</replacement>
  73. <failIfNoMatch>false</failIfNoMatch>
  74. </configuration>
  75. </execution>
  76. </executions>
  77. </plugin>
  78. <plugin>
  79. <artifactId>maven-assembly-plugin</artifactId>
  80. <executions>
  81. <execution>
  82. <id>collector</id>
  83. <phase>package</phase>
  84. <goals>
  85. <goal>single</goal>
  86. </goals>
  87. <configuration>
  88. <attach>false</attach>
  89. <finalName>ambari-metrics-collector-${project.version}</finalName>
  90. <appendAssemblyId>false</appendAssemblyId>
  91. <descriptors>
  92. <descriptor>${assemblydescriptor.collector}</descriptor>
  93. </descriptors>
  94. <tarLongFileMode>gnu</tarLongFileMode>
  95. </configuration>
  96. </execution>
  97. <execution>
  98. <id>monitor</id>
  99. <phase>package</phase>
  100. <goals>
  101. <goal>single</goal>
  102. </goals>
  103. <configuration>
  104. <attach>false</attach>
  105. <finalName>ambari-metrics-monitor-${project.version}</finalName>
  106. <appendAssemblyId>false</appendAssemblyId>
  107. <descriptors>
  108. <descriptor>${assemblydescriptor.monitor}</descriptor>
  109. </descriptors>
  110. <tarLongFileMode>gnu</tarLongFileMode>
  111. </configuration>
  112. </execution>
  113. <execution>
  114. <id>hadoop-sink</id>
  115. <phase>package</phase>
  116. <goals>
  117. <goal>single</goal>
  118. </goals>
  119. <configuration>
  120. <attach>false</attach>
  121. <finalName>ambari-metrics-hadoop-sink-${project.version}</finalName>
  122. <appendAssemblyId>false</appendAssemblyId>
  123. <descriptors>
  124. <descriptor>${assemblydescriptor.sink}</descriptor>
  125. </descriptors>
  126. <tarLongFileMode>gnu</tarLongFileMode>
  127. </configuration>
  128. </execution>
  129. </executions>
  130. </plugin>
  131. <plugin>
  132. <groupId>org.apache.maven.plugins</groupId>
  133. <artifactId>maven-antrun-plugin</artifactId>
  134. <version>1.7</version>
  135. <executions>
  136. <execution>
  137. <id>download-hadoop</id>
  138. <phase>generate-resources</phase>
  139. <goals>
  140. <goal>run</goal>
  141. </goals>
  142. <configuration>
  143. <target name="Downloading Hadoop">
  144. <mkdir dir="${project.build.directory}/embedded" />
  145. <get
  146. src="${hadoop.tar}"
  147. dest="${project.build.directory}/embedded/hadoop.tar.gz"
  148. usetimestamp="true"
  149. />
  150. <untar
  151. src="${project.build.directory}/embedded/hadoop.tar.gz"
  152. dest="${project.build.directory}/embedded"
  153. compression="gzip"
  154. />
  155. <!-- Resolving symlinks-->
  156. <move todir="${project.build.directory}/embedded/${hadoop.folder}/lib/native/">
  157. <fileset dir="${project.build.directory}/embedded/${hadoop.folder}/lib/native/"/>
  158. <mapper type="regexp" from="libsnappy.so.1.1.*" to="libsnappy.so.1"/>
  159. </move>
  160. <move
  161. file="${project.build.directory}/embedded/${hadoop.folder}/lib/native/libhdfs.so.0.0.0"
  162. tofile="${project.build.directory}/embedded/${hadoop.folder}/lib/native/libhdfs.so"
  163. />
  164. <move
  165. file="${project.build.directory}/embedded/${hadoop.folder}/lib/native/libhadoop.so.1.0.0"
  166. tofile="${project.build.directory}/embedded/${hadoop.folder}/lib/native/libhadoop.so"
  167. />
  168. <delete file="${project.build.directory}/embedded/${hadoop.folder}/lib/native/libsnappy.so"/>
  169. </target>
  170. </configuration>
  171. </execution>
  172. </executions>
  173. </plugin>
  174. </plugins>
  175. </build>
  176. <profiles>
  177. <profile>
  178. <id>rpm</id>
  179. <activation>
  180. <property>
  181. <name>build-rpm</name>
  182. </property>
  183. </activation>
  184. <build>
  185. <plugins>
  186. <plugin>
  187. <artifactId>maven-resources-plugin</artifactId>
  188. <version>2.7</version>
  189. <executions>
  190. <execution>
  191. <id>copy-resources</id>
  192. <phase>prepare-package</phase>
  193. <goals>
  194. <goal>copy-resources</goal>
  195. </goals>
  196. <configuration>
  197. <outputDirectory>${project.build.directory}/resources/rpm</outputDirectory>
  198. <resources>
  199. <resource>
  200. <directory>${project.basedir}/src/main/package/rpm</directory>
  201. <filtering>true</filtering>
  202. </resource>
  203. </resources>
  204. </configuration>
  205. </execution>
  206. </executions>
  207. </plugin>
  208. <plugin>
  209. <groupId>org.codehaus.mojo</groupId>
  210. <artifactId>rpm-maven-plugin</artifactId>
  211. <version>2.0.1</version>
  212. <configuration>
  213. <group>Development</group>
  214. <needarch>x86_64</needarch>
  215. <copyright>2012, Apache Software Foundation</copyright>
  216. <version>${package-version}</version>
  217. <release>${package-release}</release>
  218. <defaultFilemode>644</defaultFilemode>
  219. <defaultDirmode>755</defaultDirmode>
  220. <defaultUsername>root</defaultUsername>
  221. <defaultGroupname>root</defaultGroupname>
  222. </configuration>
  223. <executions>
  224. <!--ambari-metrics-monitor-->
  225. <execution>
  226. <id>ambari-metrics-monitor</id>
  227. <!-- unbinds rpm creation from maven lifecycle -->
  228. <phase>package</phase>
  229. <goals>
  230. <goal>rpm</goal>
  231. </goals>
  232. <configuration>
  233. <name>ambari-metrics-monitor</name>
  234. <group>Development</group>
  235. <needarch>x86_64</needarch>
  236. <autoRequires>false</autoRequires>
  237. <requires>
  238. <require>${python.ver}</require>
  239. <require>gcc</require>
  240. <require>${python.devel}</require>
  241. </requires>
  242. <preremoveScriptlet>
  243. <scriptFile>src/main/package/rpm/preremove.sh</scriptFile>
  244. <fileEncoding>utf-8</fileEncoding>
  245. </preremoveScriptlet>
  246. <mappings>
  247. <mapping>
  248. <directory>${resmonitor.install.dir}</directory>
  249. <username>root</username>
  250. <groupname>root</groupname>
  251. <sources>
  252. <source>
  253. <location>
  254. ${monitor.dir}/src/main/python/__init__.py
  255. </location>
  256. </source>
  257. <source>
  258. <location>
  259. ${monitor.dir}/src/main/python/main.py
  260. </location>
  261. </source>
  262. </sources>
  263. </mapping>
  264. <mapping>
  265. <directory>${resmonitor.install.dir}/core</directory>
  266. <sources>
  267. <source>
  268. <location>
  269. ${monitor.dir}/src/main/python/core
  270. </location>
  271. </source>
  272. </sources>
  273. </mapping>
  274. <mapping>
  275. <directory>${resmonitor.install.dir}/psutil</directory>
  276. <sources>
  277. <source>
  278. <location>
  279. ${monitor.dir}/src/main/python/psutil
  280. </location>
  281. <excludes>
  282. <exclude>build/**</exclude>
  283. <exclude>build/*</exclude>
  284. </excludes>
  285. </source>
  286. </sources>
  287. </mapping>
  288. <mapping>
  289. <directory>${resmonitor.install.dir}/ambari_commons</directory>
  290. <sources>
  291. <source>
  292. <location>
  293. ${project.basedir}/../../ambari-common/src/main/python/ambari_commons
  294. </location>
  295. </source>
  296. </sources>
  297. </mapping>
  298. <mapping>
  299. <directory>/etc/ambari-metrics-monitor/conf</directory>
  300. <configuration>true</configuration>
  301. </mapping>
  302. <mapping>
  303. <directory>/usr/sbin</directory>
  304. <filemode>755</filemode>
  305. <username>root</username>
  306. <groupname>root</groupname>
  307. <directoryIncluded>false</directoryIncluded>
  308. <sources>
  309. <source>
  310. <location>
  311. ${monitor.dir}/conf/unix/ambari-metrics-monitor
  312. </location>
  313. <filter>true</filter>
  314. </source>
  315. </sources>
  316. </mapping>
  317. </mappings>
  318. </configuration>
  319. </execution>
  320. <!--ambari-metrics-collector-->
  321. <execution>
  322. <id>ambari-metrics-collector</id>
  323. <phase>package</phase>
  324. <goals>
  325. <goal>rpm</goal>
  326. </goals>
  327. <configuration>
  328. <name>ambari-metrics-collector</name>
  329. <copyright>2012, Apache Software Foundation</copyright>
  330. <group>Development</group>
  331. <description>Maven Recipe: RPM Package.</description>
  332. <autoRequires>false</autoRequires>
  333. <requires>
  334. <require>${python.ver}</require>
  335. </requires>
  336. <defaultFilemode>644</defaultFilemode>
  337. <defaultDirmode>755</defaultDirmode>
  338. <defaultUsername>root</defaultUsername>
  339. <defaultGroupname>root</defaultGroupname>
  340. <mappings>
  341. <mapping>
  342. <!--jars-->
  343. <directory>/usr/lib/ambari-metrics-collector/</directory>
  344. <sources>
  345. <source>
  346. <location>${collector.dir}/target/lib</location>
  347. </source>
  348. <source>
  349. <location>
  350. ${collector.dir}/target/ambari-metrics-timelineservice-${project.version}.jar
  351. </location>
  352. </source>
  353. </sources>
  354. </mapping>
  355. <mapping>
  356. <!--embedded applications-->
  357. <directory>/usr/lib/ams-hbase/</directory>
  358. <sources>
  359. <source>
  360. <location>${collector.dir}/target/embedded/${hbase.folder}</location>
  361. <excludes>
  362. <exclude>bin/**</exclude>
  363. <exclude>bin/*</exclude>
  364. </excludes>
  365. </source>
  366. </sources>
  367. </mapping>
  368. <mapping>
  369. <directory>/usr/lib/ams-hbase/bin</directory>
  370. <filemode>755</filemode>
  371. <sources>
  372. <source>
  373. <location>${collector.dir}/target/embedded/${hbase.folder}/bin</location>
  374. </source>
  375. </sources>
  376. </mapping>
  377. <mapping>
  378. <directory>/usr/lib/ams-hbase/lib/</directory>
  379. <sources>
  380. <source>
  381. <location>${collector.dir}/target/lib</location>
  382. <includes>
  383. <include>phoenix*.jar</include>
  384. <include>antlr*.jar</include>
  385. </includes>
  386. </source>
  387. </sources>
  388. </mapping>
  389. <mapping>
  390. <directory>/usr/lib/ams-hbase/lib/hadoop-native/</directory>
  391. <sources>
  392. <source>
  393. <location>${project.build.directory}/ambari-metrics-collector-${project.version}/ambari-metrics-collector-${project.version}/hbase/lib/hadoop-native</location>
  394. </source>
  395. </sources>
  396. </mapping>
  397. <mapping>
  398. <directory>/usr/sbin</directory>
  399. <filemode>755</filemode>
  400. <username>root</username>
  401. <groupname>root</groupname>
  402. <directoryIncluded>false</directoryIncluded>
  403. <sources>
  404. <source>
  405. <location>${collector.dir}/conf/unix/ambari-metrics-collector</location>
  406. <filter>false</filter>
  407. </source>
  408. </sources>
  409. </mapping>
  410. <mapping>
  411. <directory>/etc/ambari-metrics-collector/conf</directory>
  412. <configuration>true</configuration>
  413. <sources>
  414. <source>
  415. <location>${collector.dir}/conf/unix/ams-env.sh</location>
  416. </source>
  417. <source>
  418. <location>${collector.dir}/conf/unix/ams-site.xml</location>
  419. </source>
  420. <source>
  421. <location>${collector.dir}/conf/unix/log4j.properties</location>
  422. </source>
  423. <source>
  424. <location>${collector.dir}/target/embedded/${hbase.folder}/conf/hbase-site.xml</location>
  425. </source>
  426. </sources>
  427. </mapping>
  428. <mapping>
  429. <directory>/etc/ams-hbase/conf</directory>
  430. <configuration>true</configuration>
  431. <sources>
  432. <source>
  433. <location>${collector.dir}/target/embedded/${hbase.folder}/conf</location>
  434. <includes>
  435. <include>*.*</include>
  436. </includes>
  437. </source>
  438. </sources>
  439. </mapping>
  440. <mapping>
  441. <directory>/var/run/ams-hbase</directory>
  442. </mapping>
  443. <mapping>
  444. <directory>/var/lib/ambari-metrics-collector</directory>
  445. </mapping>
  446. </mappings>
  447. </configuration>
  448. </execution>
  449. <!--hadoop-sink-->
  450. <execution>
  451. <id>ambari-metrics-hadoop-sink</id>
  452. <phase>package</phase>
  453. <goals>
  454. <goal>rpm</goal>
  455. </goals>
  456. <configuration>
  457. <name>ambari-metrics-hadoop-sink</name>
  458. <copyright>2012, Apache Software Foundation</copyright>
  459. <group>Development</group>
  460. <description>Maven Recipe: RPM Package.</description>
  461. <defaultDirmode>755</defaultDirmode>
  462. <defaultFilemode>644</defaultFilemode>
  463. <defaultUsername>root</defaultUsername>
  464. <defaultGroupname>root</defaultGroupname>
  465. <postinstallScriptlet>
  466. <scriptFile>${project.build.directory}/resources/rpm/sink/postinstall.sh</scriptFile>
  467. <fileEncoding>utf-8</fileEncoding>
  468. </postinstallScriptlet>
  469. <mappings>
  470. <mapping>
  471. <directory>/usr/lib/ambari-metrics-hadoop-sink</directory>
  472. <sources>
  473. <source>
  474. <location>${hadoop-sink.dir}/target/ambari-metrics-hadoop-sink-with-common-${project.version}.jar</location>
  475. </source>
  476. </sources>
  477. </mapping>
  478. <mapping>
  479. <directory>/usr/lib/flume/lib</directory>
  480. <sources>
  481. <source>
  482. <location>${flume-sink.dir}/target/ambari-metrics-flume-sink-with-common-${project.version}.jar</location>
  483. </source>
  484. </sources>
  485. </mapping>
  486. <mapping>
  487. <directory>/usr/lib/storm/lib</directory>
  488. <sources>
  489. <source>
  490. <location>${storm-sink.dir}/target/ambari-metrics-storm-sink-with-common-${project.version}.jar</location>
  491. </source>
  492. </sources>
  493. </mapping>
  494. <mapping>
  495. <directory>/usr/lib/ambari-metrics-kafka-sink</directory>
  496. <sources>
  497. <source>
  498. <location>${kafka-sink.dir}/target/${kafka.sink.jar}</location>
  499. </source>
  500. </sources>
  501. </mapping>
  502. <mapping>
  503. <directory>/usr/lib/ambari-metrics-kafka-sink/lib</directory>
  504. <sources>
  505. <source>
  506. <location>${kafka-sink.dir}/target/lib</location>
  507. </source>
  508. </sources>
  509. </mapping>
  510. </mappings>
  511. </configuration>
  512. </execution>
  513. </executions>
  514. </plugin>
  515. </plugins>
  516. </build>
  517. </profile>
  518. <profile>
  519. <id>deb</id>
  520. <activation>
  521. <property>
  522. <name>build-deb</name>
  523. </property>
  524. </activation>
  525. <build>
  526. <plugins>
  527. <plugin>
  528. <artifactId>maven-resources-plugin</artifactId>
  529. <version>2.7</version>
  530. <executions>
  531. <execution>
  532. <id>copy-resources</id>
  533. <phase>prepare-package</phase>
  534. <goals>
  535. <goal>copy-resources</goal>
  536. </goals>
  537. <configuration>
  538. <outputDirectory>${project.build.directory}/resources/deb/control</outputDirectory>
  539. <resources>
  540. <resource>
  541. <directory>${project.basedir}/src/main/package/deb/control</directory>
  542. <excludes>
  543. <exclude>postinst</exclude>
  544. </excludes>
  545. <filtering>false</filtering>
  546. </resource>
  547. <resource>
  548. <directory>${project.basedir}/src/main/package/deb/control</directory>
  549. <includes>
  550. <include>postinst</include>
  551. </includes>
  552. <filtering>true</filtering>
  553. </resource>
  554. </resources>
  555. </configuration>
  556. </execution>
  557. </executions>
  558. </plugin>
  559. <plugin>
  560. <artifactId>jdeb</artifactId>
  561. <groupId>org.vafer</groupId>
  562. <version>1.0.1</version>
  563. <executions>
  564. <execution>
  565. <phase>package</phase>
  566. <goals>
  567. <goal>jdeb</goal>
  568. </goals>
  569. </execution>
  570. </executions>
  571. <configuration>
  572. <controlDir>${project.build.directory}/resources/deb/control</controlDir>
  573. <deb>${basedir}/target/${artifactId}_${package-version}-${package-release}.deb</deb>
  574. <dataSet>
  575. <data>
  576. <type>file</type>
  577. <src>${monitor.dir}/src/main/python/__init__.py</src>
  578. <mapper>
  579. <type>perm</type>
  580. <prefix>${resmonitor.install.dir}</prefix>
  581. <!-- TODO: Figure out if file perms should be set -->
  582. <!--user>root</user>
  583. <group>root</group-->
  584. <filemode>755</filemode>
  585. </mapper>
  586. </data>
  587. <data>
  588. <type>file</type>
  589. <src>${monitor.dir}/src/main/python/main.py</src>
  590. <mapper>
  591. <type>perm</type>
  592. <prefix>${resmonitor.install.dir}</prefix>
  593. <filemode>755</filemode>
  594. </mapper>
  595. </data>
  596. <data>
  597. <type>directory</type>
  598. <src>${monitor.dir}/src/main/python/core</src>
  599. <mapper>
  600. <type>perm</type>
  601. <prefix>${resmonitor.install.dir}/core</prefix>
  602. </mapper>
  603. </data>
  604. <data>
  605. <type>directory</type>
  606. <src>${monitor.dir}/src/main/python/psutil</src>
  607. <excludes>build/**</excludes>
  608. <mapper>
  609. <type>perm</type>
  610. <prefix>${resmonitor.install.dir}/psutil</prefix>
  611. </mapper>
  612. </data>
  613. <data>
  614. <type>directory</type>
  615. <src>${project.basedir}/../../ambari-common/src/main/python/ambari_commons</src>
  616. <mapper>
  617. <type>perm</type>
  618. <prefix>${resmonitor.install.dir}/ambari_commons</prefix>
  619. </mapper>
  620. </data>
  621. <data>
  622. <type>template</type>
  623. <paths>
  624. <path>/etc/ambari-metrics-monitor/conf</path>
  625. <path>/usr/lib/ambari-metrics-collector</path>
  626. <path>/etc/ambari-metrics-collector/conf</path>
  627. <path>/etc/ams-hbase/conf</path>
  628. <path>/var/run/ams-hbase</path>
  629. <path>/var/lib/ambari-metrics-collector</path>
  630. <path>/usr/lib/ambari-metrics-hadoop-sink</path>
  631. <path>/usr/lib/ambari-metrics-kafka-sink</path>
  632. <path>/usr/lib/ambari-metrics-kafka-sink/lib</path>
  633. <path>/usr/lib/flume/lib</path>
  634. <path>/usr/lib/storm/lib</path>
  635. </paths>
  636. </data>
  637. <data>
  638. <src>${monitor.dir}/conf/unix/metric_groups.conf</src>
  639. <type>file</type>
  640. <mapper>
  641. <type>perm</type>
  642. <prefix>/etc/ambari-metrics-monitor/conf</prefix>
  643. <filemode>644</filemode>
  644. </mapper>
  645. </data>
  646. <data>
  647. <src>${monitor.dir}/conf/unix/metric_monitor.ini</src>
  648. <type>file</type>
  649. <mapper>
  650. <type>perm</type>
  651. <prefix>/etc/ambari-metrics-monitor/conf</prefix>
  652. <filemode>644</filemode>
  653. </mapper>
  654. </data>
  655. <data>
  656. <src>${monitor.dir}/conf/unix/ambari-metrics-monitor</src>
  657. <type>file</type>
  658. <mapper>
  659. <type>perm</type>
  660. <prefix>/usr/sbin</prefix>
  661. <filemode>755</filemode>
  662. </mapper>
  663. </data>
  664. <!-- Metric collector -->
  665. <data>
  666. <src>${collector.dir}/target/ambari-metrics-timelineservice-${project.version}.jar</src>
  667. <type>file</type>
  668. <mapper>
  669. <type>perm</type>
  670. <dirmode>644</dirmode>
  671. <prefix>/usr/lib/ambari-metrics-collector</prefix>
  672. </mapper>
  673. </data>
  674. <data>
  675. <src>${collector.dir}/target/lib</src>
  676. <type>directory</type>
  677. <mapper>
  678. <type>perm</type>
  679. <filemode>644</filemode>
  680. <prefix>/usr/lib/ambari-metrics-collector</prefix>
  681. </mapper>
  682. </data>
  683. <data>
  684. <src>${collector.dir}/target/embedded/${hbase.folder}</src>
  685. <type>directory</type>
  686. <excludes>bin/**,bin/*</excludes>
  687. <mapper>
  688. <type>perm</type>
  689. <prefix>/usr/lib/ams-hbase</prefix>
  690. <filemode>644</filemode>
  691. </mapper>
  692. </data>
  693. <data>
  694. <src>${collector.dir}/target/embedded/${hbase.folder}/bin</src>
  695. <type>directory</type>
  696. <mapper>
  697. <type>perm</type>
  698. <filemode>755</filemode>
  699. <prefix>/usr/lib/ams-hbase/bin</prefix>
  700. </mapper>
  701. </data>
  702. <data>
  703. <src>${project.build.directory}/ambari-metrics-collector-${project.version}/ambari-metrics-collector-${project.version}/hbase/lib/hadoop-native</src>
  704. <type>directory</type>
  705. <mapper>
  706. <type>perm</type>
  707. <filemode>755</filemode>
  708. <prefix>/usr/lib/ams-hbase/lib/hadoop-native</prefix>
  709. </mapper>
  710. </data>
  711. <data>
  712. <src>${collector.dir}/target/lib</src>
  713. <type>directory</type>
  714. <includes>phoenix*.jar,antlr*.jar</includes>
  715. <mapper>
  716. <type>perm</type>
  717. <filemode>644</filemode>
  718. <prefix>/usr/lib/ams-hbase/lib</prefix>
  719. </mapper>
  720. </data>
  721. <data>
  722. <src>${collector.dir}/conf/unix/ambari-metrics-collector</src>
  723. <type>file</type>
  724. <mapper>
  725. <type>perm</type>
  726. <filemode>755</filemode>
  727. <prefix>/usr/sbin</prefix>
  728. </mapper>
  729. </data>
  730. <data>
  731. <src>${collector.dir}/conf/unix/ams-env.sh</src>
  732. <type>file</type>
  733. <mapper>
  734. <type>perm</type>
  735. <filemode>755</filemode>
  736. <prefix>/etc/ambari-metrics-collector/conf</prefix>
  737. </mapper>
  738. </data>
  739. <data>
  740. <src>${collector.dir}/conf/unix/ams-site.xml</src>
  741. <type>file</type>
  742. <mapper>
  743. <type>perm</type>
  744. <filemode>644</filemode>
  745. <prefix>/etc/ambari-metrics-collector/conf</prefix>
  746. </mapper>
  747. </data>
  748. <data>
  749. <src>${collector.dir}/conf/unix/log4j.properties</src>
  750. <type>file</type>
  751. <mapper>
  752. <type>perm</type>
  753. <filemode>644</filemode>
  754. <prefix>/etc/ambari-metrics-collector/conf</prefix>
  755. </mapper>
  756. </data>
  757. <data>
  758. <src>${collector.dir}/target/embedded/${hbase.folder}/conf/hbase-site.xml</src>
  759. <type>file</type>
  760. <mapper>
  761. <type>perm</type>
  762. <filemode>644</filemode>
  763. <prefix>/etc/ambari-metrics-collector/conf</prefix>
  764. </mapper>
  765. </data>
  766. <data>
  767. <type>directory</type>
  768. <src>${collector.dir}/target/embedded/${hbase.folder}/conf</src>
  769. <mapper>
  770. <type>perm</type>
  771. <dirmode>755</dirmode>
  772. <filemode>644</filemode>
  773. <prefix>/etc/ams-hbase/conf</prefix>
  774. </mapper>
  775. </data>
  776. <!-- hadoop sink -->
  777. <data>
  778. <src>${hadoop-sink.dir}/target/ambari-metrics-hadoop-sink-with-common-${project.version}.jar</src>
  779. <type>file</type>
  780. <mapper>
  781. <type>perm</type>
  782. <filemode>644</filemode>
  783. <dirmode>755</dirmode>
  784. <prefix>/usr/lib/ambari-metrics-hadoop-sink</prefix>
  785. </mapper>
  786. </data>
  787. <!-- flume sink -->
  788. <data>
  789. <src>${flume-sink.dir}/target/${flume.sink.jar}</src>
  790. <type>file</type>
  791. <mapper>
  792. <type>perm</type>
  793. <filemode>644</filemode>
  794. <dirmode>755</dirmode>
  795. <prefix>/usr/lib/flume/lib</prefix>
  796. </mapper>
  797. </data>
  798. <!-- storm sink -->
  799. <data>
  800. <src>${storm-sink.dir}/target/${storm.sink.jar}</src>
  801. <type>file</type>
  802. <mapper>
  803. <type>perm</type>
  804. <filemode>644</filemode>
  805. <dirmode>755</dirmode>
  806. <prefix>/usr/lib/storm/lib</prefix>
  807. </mapper>
  808. </data>
  809. <!-- kafka sink -->
  810. <data>
  811. <src>${kafka-sink.dir}/target/${kafka.sink.jar}</src>
  812. <type>file</type>
  813. <mapper>
  814. <type>perm</type>
  815. <filemode>644</filemode>
  816. <dirmode>755</dirmode>
  817. <prefix>/usr/lib/ambari-metrics-kafka-sink</prefix>
  818. </mapper>
  819. </data>
  820. <data>
  821. <src>${kafka-sink.dir}/target/lib</src>
  822. <type>directory</type>
  823. <mapper>
  824. <type>perm</type>
  825. <filemode>644</filemode>
  826. <dirmode>755</dirmode>
  827. <prefix>/usr/lib/ambari-metrics-kafka-sink/lib</prefix>
  828. </mapper>
  829. </data>
  830. </dataSet>
  831. </configuration>
  832. </plugin>
  833. </plugins>
  834. </build>
  835. </profile>
  836. <profile>
  837. <id>windows</id>
  838. <activation>
  839. <os>
  840. <family>win</family>
  841. </os>
  842. </activation>
  843. <properties>
  844. <envClassifier>win</envClassifier>
  845. <dirsep>\</dirsep>
  846. <pathsep>;</pathsep>
  847. <executable.python>python</executable.python>
  848. <executable.shell>cmd</executable.shell>
  849. <fileextension.shell>cmd</fileextension.shell>
  850. <fileextension.dot.shell-default>.cmd</fileextension.dot.shell-default>
  851. <assemblydescriptor.collector>src/main/assembly/collector-windows.xml</assemblydescriptor.collector>
  852. <assemblydescriptor.monitor>src/main/assembly/monitor-windows.xml</assemblydescriptor.monitor>
  853. <assemblydescriptor.sink>src/main/assembly/sink-windows.xml</assemblydescriptor.sink>
  854. <packagingFormat>jar</packagingFormat>
  855. <python.build.version>2.7</python.build.version>
  856. </properties>
  857. </profile>
  858. <profile>
  859. <id>linux</id>
  860. <activation>
  861. <os>
  862. <family>unix</family>
  863. </os>
  864. </activation>
  865. <properties>
  866. <envClassifier>linux</envClassifier>
  867. <dirsep>/</dirsep>
  868. <pathsep>:</pathsep>
  869. <executable.python>${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap</executable.python>
  870. <executable.shell>sh</executable.shell>
  871. <fileextension.shell>sh</fileextension.shell>
  872. <fileextension.dot.shell-default></fileextension.dot.shell-default>
  873. <assemblydescriptor.collector>src/main/assembly/collector.xml</assemblydescriptor.collector>
  874. <assemblydescriptor.monitor>src/main/assembly/monitor.xml</assemblydescriptor.monitor>
  875. <assemblydescriptor.sink>src/main/assembly/sink.xml</assemblydescriptor.sink>
  876. <packagingFormat>jar</packagingFormat>
  877. </properties>
  878. </profile>
  879. <profile>
  880. <id>msi</id>
  881. <activation>
  882. <os>
  883. <family>Windows</family>
  884. </os>
  885. </activation>
  886. <build>
  887. <plugins>
  888. <!-- msi creation -->
  889. <plugin>
  890. <groupId>org.codehaus.mojo</groupId>
  891. <artifactId>exec-maven-plugin</artifactId>
  892. <version>1.2</version>
  893. <executions>
  894. <execution>
  895. <id>run-heat-collector</id>
  896. <phase>package</phase>
  897. <goals>
  898. <goal>exec</goal>
  899. </goals>
  900. <configuration>
  901. <executable>heat.exe</executable>
  902. <arguments>
  903. <argument>dir</argument>
  904. <argument>"."</argument>
  905. <argument>-dr</argument>
  906. <argument>"COLLECTOR_INSTALL_DIRECTORY"</argument>
  907. <argument>-platform</argument>
  908. <argument>Win64</argument>
  909. <argument>-cg</argument>
  910. <argument>"AmbariMetricsCollectorGroup"</argument>
  911. <argument>-gg</argument>
  912. <argument>-ke</argument>
  913. <argument>-srd</argument>
  914. <argument>-o</argument>
  915. <argument>".\..\collector-files.wxs"</argument>
  916. </arguments>
  917. <workingDirectory>${basedir}/target/ambari-metrics-collector-${project.version}</workingDirectory>
  918. </configuration>
  919. </execution>
  920. <execution>
  921. <id>run-candle-collector</id>
  922. <phase>package</phase>
  923. <goals>
  924. <goal>exec</goal>
  925. </goals>
  926. <configuration>
  927. <executable>candle.exe</executable>
  928. <arguments>
  929. <argument>-arch</argument>
  930. <argument>x64</argument>
  931. <argument>collector.wxs</argument>
  932. <argument>collector-files.wxs</argument>
  933. </arguments>
  934. <workingDirectory>${basedir}/target</workingDirectory>
  935. </configuration>
  936. </execution>
  937. <execution>
  938. <id>run-light-collector</id>
  939. <phase>package</phase>
  940. <goals>
  941. <goal>exec</goal>
  942. </goals>
  943. <configuration>
  944. <executable>light.exe</executable>
  945. <arguments>
  946. <argument>-ext</argument>
  947. <argument>WixUIExtension</argument>
  948. <argument>-b</argument>
  949. <argument>${basedir}/target/ambari-metrics-collector-${project.version}</argument>
  950. <argument>-o</argument>
  951. <argument>ambari-metrics-collector-${project.version}.msi</argument>
  952. <argument>collector.wixobj</argument>
  953. <argument>collector-files.wixobj</argument>
  954. </arguments>
  955. <workingDirectory>${basedir}/target</workingDirectory>
  956. </configuration>
  957. </execution>
  958. <execution>
  959. <id>run-heat-monitor</id>
  960. <phase>package</phase>
  961. <goals>
  962. <goal>exec</goal>
  963. </goals>
  964. <configuration>
  965. <executable>heat.exe</executable>
  966. <arguments>
  967. <argument>dir</argument>
  968. <argument>"."</argument>
  969. <argument>-dr</argument>
  970. <argument>"MONITOR_INSTALL_DIRECTORY"</argument>
  971. <argument>-platform</argument>
  972. <argument>Win64</argument>
  973. <argument>-cg</argument>
  974. <argument>"AmbariMetricsMonitorGroup"</argument>
  975. <argument>-gg</argument>
  976. <argument>-ke</argument>
  977. <argument>-srd</argument>
  978. <argument>-o</argument>
  979. <argument>".\..\monitor-files.wxs"</argument>
  980. </arguments>
  981. <workingDirectory>${basedir}/target/ambari-metrics-monitor-${project.version}</workingDirectory>
  982. </configuration>
  983. </execution>
  984. <execution>
  985. <id>run-candle-monitor</id>
  986. <phase>package</phase>
  987. <goals>
  988. <goal>exec</goal>
  989. </goals>
  990. <configuration>
  991. <executable>candle.exe</executable>
  992. <arguments>
  993. <argument>-arch</argument>
  994. <argument>x64</argument>
  995. <argument>monitor.wxs</argument>
  996. <argument>monitor-files.wxs</argument>
  997. </arguments>
  998. <workingDirectory>${basedir}/target</workingDirectory>
  999. </configuration>
  1000. </execution>
  1001. <execution>
  1002. <id>run-light-monitor</id>
  1003. <phase>package</phase>
  1004. <goals>
  1005. <goal>exec</goal>
  1006. </goals>
  1007. <configuration>
  1008. <executable>light.exe</executable>
  1009. <arguments>
  1010. <argument>-ext</argument>
  1011. <argument>WixUIExtension</argument>
  1012. <argument>-b</argument>
  1013. <argument>${basedir}/target/ambari-metrics-monitor-${project.version}</argument>
  1014. <argument>-o</argument>
  1015. <argument>ambari-metrics-monitor-${project.version}.msi</argument>
  1016. <argument>monitor.wixobj</argument>
  1017. <argument>monitor-files.wixobj</argument>
  1018. </arguments>
  1019. <workingDirectory>${basedir}/target</workingDirectory>
  1020. </configuration>
  1021. </execution>
  1022. <execution>
  1023. <id>run-heat-sink</id>
  1024. <phase>package</phase>
  1025. <goals>
  1026. <goal>exec</goal>
  1027. </goals>
  1028. <configuration>
  1029. <executable>heat.exe</executable>
  1030. <arguments>
  1031. <argument>dir</argument>
  1032. <argument>"."</argument>
  1033. <argument>-dr</argument>
  1034. <argument>"SINK_INSTALL_DIRECTORY"</argument>
  1035. <argument>-platform</argument>
  1036. <argument>Win64</argument>
  1037. <argument>-cg</argument>
  1038. <argument>"AmbariMetricsSinkGroup"</argument>
  1039. <argument>-gg</argument>
  1040. <argument>-ke</argument>
  1041. <argument>-srd</argument>
  1042. <argument>-o</argument>
  1043. <argument>".\..\sink-files.wxs"</argument>
  1044. </arguments>
  1045. <workingDirectory>${basedir}/target/ambari-metrics-hadoop-sink-${project.version}</workingDirectory>
  1046. </configuration>
  1047. </execution>
  1048. <execution>
  1049. <id>run-candle-sink</id>
  1050. <phase>package</phase>
  1051. <goals>
  1052. <goal>exec</goal>
  1053. </goals>
  1054. <configuration>
  1055. <executable>candle.exe</executable>
  1056. <arguments>
  1057. <argument>-arch</argument>
  1058. <argument>x64</argument>
  1059. <argument>sink.wxs</argument>
  1060. <argument>sink-files.wxs</argument>
  1061. </arguments>
  1062. <workingDirectory>${basedir}/target</workingDirectory>
  1063. </configuration>
  1064. </execution>
  1065. <execution>
  1066. <id>run-light-sink</id>
  1067. <phase>package</phase>
  1068. <goals>
  1069. <goal>exec</goal>
  1070. </goals>
  1071. <configuration>
  1072. <executable>light.exe</executable>
  1073. <arguments>
  1074. <argument>-ext</argument>
  1075. <argument>WixUIExtension</argument>
  1076. <argument>-b</argument>
  1077. <argument>${basedir}/target/ambari-metrics-hadoop-sink-${project.version}</argument>
  1078. <argument>-o</argument>
  1079. <argument>ambari-metrics-hadoop-sink-${project.version}.msi</argument>
  1080. <argument>sink.wixobj</argument>
  1081. <argument>sink-files.wixobj</argument>
  1082. </arguments>
  1083. <workingDirectory>${basedir}/target</workingDirectory>
  1084. </configuration>
  1085. </execution>
  1086. </executions>
  1087. </plugin>
  1088. </plugins>
  1089. </build>
  1090. </profile>
  1091. </profiles>
  1092. <dependencies>
  1093. <dependency>
  1094. <groupId>org.apache.ambari</groupId>
  1095. <artifactId>ambari-metrics-timelineservice</artifactId>
  1096. <version>${project.version}</version>
  1097. </dependency>
  1098. <dependency>
  1099. <groupId>org.apache.ambari</groupId>
  1100. <artifactId>ambari-metrics-common</artifactId>
  1101. <version>${project.version}</version>
  1102. </dependency>
  1103. <dependency>
  1104. <groupId>org.apache.ambari</groupId>
  1105. <artifactId>ambari-metrics-hadoop-sink</artifactId>
  1106. <version>${project.version}</version>
  1107. </dependency>
  1108. <dependency>
  1109. <groupId>org.apache.ambari</groupId>
  1110. <artifactId>ambari-metrics-flume-sink</artifactId>
  1111. <version>${project.version}</version>
  1112. </dependency>
  1113. <dependency>
  1114. <groupId>org.apache.ambari</groupId>
  1115. <artifactId>ambari-metrics-storm-sink</artifactId>
  1116. <version>${project.version}</version>
  1117. </dependency>
  1118. <dependency>
  1119. <groupId>org.apache.ambari</groupId>
  1120. <artifactId>ambari-metrics-kafka-sink</artifactId>
  1121. <version>${project.version}</version>
  1122. </dependency>
  1123. <dependency>
  1124. <groupId>org.apache.ambari</groupId>
  1125. <artifactId>ambari-metrics-host-monitoring</artifactId>
  1126. <version>${project.version}</version>
  1127. <type>pom</type>
  1128. <optional>true</optional>
  1129. </dependency>
  1130. </dependencies>
  1131. </project>