pom.xml 46 KB

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