ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject ambari git commit: AMBARI-16918. Create management-pack for Microsoft-R service (srimanth)
Date Tue, 31 May 2016 23:13:25 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk f852e3ca8 -> c2cd661ff


AMBARI-16918. Create management-pack for Microsoft-R service (srimanth)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c2cd661f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c2cd661f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c2cd661f

Branch: refs/heads/trunk
Commit: c2cd661fff83d923245a4a9d04ddb7206a684d00
Parents: f852e3c
Author: Srimanth Gunturi <sgunturi@hortonworks.com>
Authored: Thu May 26 17:57:07 2016 -0700
Committer: Srimanth Gunturi <sgunturi@hortonworks.com>
Committed: Tue May 31 16:10:09 2016 -0700

----------------------------------------------------------------------
 .../management-packs/microsoft-r_mpack/pom.xml  | 115 +++++++++++++
 .../src/main/assemblies/microsoft_r-mpack.xml   |  44 +++++
 .../MICROSOFT_R/8.0.0/metainfo.xml              |  53 ++++++
 .../8.0.0/package/scripts/microsoft_r.py        |  83 ++++++++++
 .../MICROSOFT_R/8.0.0/service_advisor.py        |  73 +++++++++
 .../MICROSOFT_R/8.0.0/metainfo.xml              |  28 ++++
 .../src/main/resources/mpack.json               |  39 +++++
 contrib/management-packs/pom.xml                | 161 +++++++++++++++++++
 8 files changed, 596 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c2cd661f/contrib/management-packs/microsoft-r_mpack/pom.xml
----------------------------------------------------------------------
diff --git a/contrib/management-packs/microsoft-r_mpack/pom.xml b/contrib/management-packs/microsoft-r_mpack/pom.xml
new file mode 100644
index 0000000..d143d72
--- /dev/null
+++ b/contrib/management-packs/microsoft-r_mpack/pom.xml
@@ -0,0 +1,115 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns="http://maven.apache.org/POM/4.0.0"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.ambari.contrib.mpacks</groupId>
+  <artifactId>microsoft-r_mpack</artifactId>
+  <version>1.0.0.0-SNAPSHOT</version>
+  <name>Micrsoft-R Management Pack</name>
+
+  <parent>
+    <groupId>org.apache.ambari.contrib.mpacks</groupId>
+    <artifactId>ambari-contrib-mpacks</artifactId>
+    <version>2.0.0.0-SNAPSHOT</version>
+  </parent>
+
+  <dependencies>
+  </dependencies>
+
+  <properties>
+    <ambari.dir>${project.parent.parent.parent.basedir}</ambari.dir>
+    <ambari.version>1.3.0.0-SNAPSHOT</ambari.version>
+  </properties>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>1.8</version>
+        <executions>
+          <execution>
+            <id>parse-version</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>parse-version</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>regex-property</id>
+            <goals>
+              <goal>regex-property</goal>
+            </goals>
+            <configuration>
+              <name>mpackVersion</name>
+              <value>${project.version}</value>
+              <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)(\.|-).*</regex>
+              <replacement>$1.$2.$3.$4</replacement>
+              <failIfNoMatch>false</failIfNoMatch>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>2.6</version>
+        <executions>
+          <execution>
+            <id>copy-resources</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${basedir}/target/</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>${basedir}/src/main/resources</directory>
+                  <includes>
+                    <include>mpack.json</include>
+                  </includes>
+                  <filtering>true</filtering>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <configuration>
+          <tarLongFileMode>gnu</tarLongFileMode>
+          <descriptors>
+            <descriptor>src/main/assemblies/microsoft_r-mpack.xml</descriptor>
+          </descriptors>
+        </configuration>
+        <executions>
+          <execution>
+            <id>build-tarball</id>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>

http://git-wip-us.apache.org/repos/asf/ambari/blob/c2cd661f/contrib/management-packs/microsoft-r_mpack/src/main/assemblies/microsoft_r-mpack.xml
----------------------------------------------------------------------
diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/assemblies/microsoft_r-mpack.xml
b/contrib/management-packs/microsoft-r_mpack/src/main/assemblies/microsoft_r-mpack.xml
new file mode 100644
index 0000000..40fad9e
--- /dev/null
+++ b/contrib/management-packs/microsoft-r_mpack/src/main/assemblies/microsoft_r-mpack.xml
@@ -0,0 +1,44 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<assembly
+  xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3
http://maven.apache.org/xsd/assembly-1.1.3.xsd">
+  <id></id>
+  <formats>
+    <format>dir</format>
+    <format>tar.gz</format>
+  </formats>
+  <includeBaseDirectory>true</includeBaseDirectory>
+  <fileSets>
+    <fileSet>
+      <directory>src/main/resources/common-services</directory>
+      <outputDirectory>common-services</outputDirectory>
+    </fileSet>
+    <fileSet>
+      <directory>src/main/resources/custom-services</directory>
+      <outputDirectory>custom-services</outputDirectory>
+    </fileSet>
+  </fileSets>
+  <files>
+    <file>
+      <source>target/mpack.json</source>
+    </file>
+  </files>
+  <dependencySets>
+  </dependencySets>
+</assembly>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/c2cd661f/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml
----------------------------------------------------------------------
diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml
new file mode 100644
index 0000000..6998efc
--- /dev/null
+++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/metainfo.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>MICROSOFT_R</name>
+      <displayName>Microsoft R</displayName>
+      <comment>Microsoft R Server</comment>
+      <version>8.0.0</version>
+
+      <components>
+        <component>
+          <name>MICROSOFT_R_CLIENT</name>
+          <displayName>Microsoft R Client</displayName>
+          <category>CLIENT</category>
+          <cardinality>1+</cardinality>
+          <commandScript>
+            <script>scripts/microsoft_r.py</script>
+            <scriptType>PYTHON</scriptType>
+            <timeout>1200</timeout>
+          </commandScript>
+        </component>
+      </components>
+
+      <commandScript>
+        <script>scripts/service_check.py</script>
+        <scriptType>PYTHON</scriptType>
+        <timeout>300</timeout>
+      </commandScript>
+
+      <requiredServices>
+        <service>YARN</service>
+      </requiredServices>
+    </service>
+  </services>
+</metainfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/c2cd661f/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/microsoft_r.py
----------------------------------------------------------------------
diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/microsoft_r.py
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/microsoft_r.py
new file mode 100644
index 0000000..5b6e482
--- /dev/null
+++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/package/scripts/microsoft_r.py
@@ -0,0 +1,83 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
+import sys
+from resource_management import *
+import shutil, tempfile, subprocess, traceback
+from resource_management.core import shell
+
+openr_location = 'http://104.196.87.250/msft-r/'
+rserver_location = 'http://104.196.87.250/msft-r/'
+#openr_location = '/ambari/contrib/msr/'
+#rserver_location = '/ambari/contrib/msr/'
+
+class MicrosoftR(Script):
+  def install(self, env):
+    print 'Install R Server'
+    tmp_dir = tempfile.mkdtemp()
+    print 'Using temp dir: ' + tmp_dir
+    try:
+      print 'Download R Open'
+      if "http" in openr_location:
+        subprocess.call(['wget', openr_location + 'MRO-for-MRS-8.0.0.el6.x86_64.rpm'], cwd=tmp_dir)
+      else:
+        shell.call('cp ' + openr_location + '/MRO-for-MRS-8.0.0.el6.x86_64.rpm ' + tmp_dir)
+
+      print 'Install R Open'
+      subprocess.call(['yum', 'install', '-y', 'MRO-for-MRS-8.0.0.el6.x86_64.rpm'], cwd=tmp_dir)
+
+      print 'Download R Server'
+      if "http" in rserver_location:
+        subprocess.call(['wget', rserver_location + 'Microsoft-R-Server-8.0.0-RHEL6.tar.gz'],
cwd=tmp_dir)
+      else:
+        shell.call('cp ' + rserver_location + 'Microsoft-R-Server-8.0.0-RHEL6.tar.gz ' +
tmp_dir)
+
+      print 'Install R Server'
+      subprocess.call(['tar', '-xzvf', 'Microsoft-R-Server-8.0.0-RHEL6.tar.gz'], cwd=tmp_dir)
+      subprocess.call([tmp_dir + '/rrent/install.sh', '-a', '-y', '-p', '/usr/lib64/MRO-for-MRS-8.0.0/R-3.2.2'],
cwd = tmp_dir + '/rrent')
+
+      print 'Create symlink to hadoop library'
+      _, libhdfs = shell.call('find /usr/hdp/ -name libhdfs.so')
+      shell.call('ln -s ' + libhdfs + ' /usr/lib64/libhdfs.so')
+
+      print 'Create /share on hadoop' # This is not strictly required, but needed to run
the example
+      shell.call('sudo -u hdfs hadoop fs -mkdir -p /share')
+      shell.call('sudo -u hdfs hadoop fs -chmod uog+rwx /share')
+
+      print 'Configure R Server for the ambari-qa user'
+      shell.call('sudo -u hdfs hadoop fs -mkdir -p /user/RevoShare/ambari-qa')
+      shell.call('sudo -u hdfs hadoop fs -chmod uog+rwx /user/RevoShare/ambari-qa')
+      shell.call('mkdir -p /var/RevoShare/ambari-qa')
+      shell.call('chmod oug+rwx /var/RevoShare/ambari-qa')
+      shell.call('sudo -u ambari-qa echo ". /usr/lib64/MRS-8.0/scripts/RevoHadoopEnvVars.site"
>> ~ambari-qa/.bashrc')
+
+      print 'Installed R Server'
+    except Exception as ex:
+      print "An error occured while installing Microsoft R"
+      traceback.print_exc()
+    finally:
+      print 'Cleaning up'
+      shutil.rmtree(tmp_dir)
+
+  def configure(self, env):
+    print 'Configure R Server. Nothing to do.'
+
+if __name__ == "__main__":
+  MicrosoftR().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/c2cd661f/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py
----------------------------------------------------------------------
diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py
new file mode 100644
index 0000000..554be2d
--- /dev/null
+++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/common-services/MICROSOFT_R/8.0.0/service_advisor.py
@@ -0,0 +1,73 @@
+#!/usr/bin/env ambari-python-wrap
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+import os
+import fnmatch
+import imp
+import socket
+import sys
+import traceback
+
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+STACKS_DIR = os.path.join(SCRIPT_DIR, '../../../../../stacks/')
+PARENT_FILE = os.path.join(STACKS_DIR, 'service_advisor.py')
+
+try:
+  with open(PARENT_FILE, 'rb') as fp:
+    service_advisor = imp.load_module('service_advisor', fp, PARENT_FILE, ('.py', 'rb', imp.PY_SOURCE))
+except Exception as e:
+  traceback.print_exc()
+  print "Failed to load parent"
+
+class HDP23MICROSOFT_RServiceAdvisor(service_advisor.ServiceAdvisor):
+
+  def colocateService(self, stackAdvisor, hostsComponentsMap, serviceComponents):
+    # colocate R_CLIENT with NODEMANAGERs and YARN_CLIENTs
+    rClientComponent = [component for component in serviceComponents if component["StackServiceComponents"]["component_name"]
== "MICROSOFT_R_CLIENT"]
+    traceback.print_tb(None)
+    rClientComponent = rClientComponent[0]
+    if not stackAdvisor.isComponentHostsPopulated(rClientComponent):
+      for hostName in hostsComponentsMap.keys():
+        hostComponents = hostsComponentsMap[hostName]
+        if ({"name": "NODEMANAGER"} in hostComponents or {"name": "YARN_CLIENT"} in hostComponents)
\
+            and {"name": "MICROSOFT_R_CLIENT"} not in hostComponents:
+          hostsComponentsMap[hostName].append({ "name": "MICROSOFT_R_CLIENT" })
+        if ({"name": "NODEMANAGER"} not in hostComponents and {"name": "YARN_CLIENT"} not
in hostComponents) \
+            and {"name": "MICROSOFT_R_CLIENT"} in hostComponents:
+          hostsComponentsMap[hostName].remove({"name": "MICROSOFT_R_CLIENT"})
+
+  def getComponentLayoutValidations(self, stackAdvisor, services, hosts):
+    componentsListList = [service["components"] for service in services["services"]]
+    componentsList = [item["StackServiceComponents"] for sublist in componentsListList for
item in sublist]
+    hostsList = [host["Hosts"]["host_name"] for host in hosts["items"]]
+    hostsCount = len(hostsList)
+
+    rClientHosts = self.getHosts(componentsList, "MICROSOFT_R_CLIENT")
+    expectedrClientHosts = set(self.getHosts(componentsList, "NODEMANAGER") + self.getHosts(componentsList,
"YARN_CLIENT"))
+
+    items = []
+
+    # Generate WARNING if any PXF is not colocated with NAMENODE or DATANODE
+    mismatchHosts = sorted(expectedrClientHosts.symmetric_difference(set(rClientHosts)))
+    if len(mismatchHosts) > 0:
+      hostsString = ', '.join(mismatchHosts)
+      message = "Microsoft-R Client must be installed on NodeManagers and YARN Clients. "
\
+                "The following {0} host(s) do not satisfy the colocation recommendation:
{1}".format(len(mismatchHosts), hostsString)
+      items.append( { "type": 'host-component', "level": 'WARN', "message": message, "component-name":
'MICROSOFT_R_CLIENT' } )
+
+    return items
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/c2cd661f/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/metainfo.xml
----------------------------------------------------------------------
diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/metainfo.xml
b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/metainfo.xml
new file mode 100644
index 0000000..0c69b61
--- /dev/null
+++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/custom-services/MICROSOFT_R/8.0.0/metainfo.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+
+<metainfo>
+  <schemaVersion>2.0</schemaVersion>
+  <services>
+    <service>
+      <name>MICROSOFT_R</name>
+      <extends>common-services/MICROSOFT_R/8.0.0</extends>
+      <version>8.0.0.0</version>
+    </service>
+  </services>
+</metainfo>

http://git-wip-us.apache.org/repos/asf/ambari/blob/c2cd661f/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json
----------------------------------------------------------------------
diff --git a/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json b/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json
new file mode 100644
index 0000000..17c2f54
--- /dev/null
+++ b/contrib/management-packs/microsoft-r_mpack/src/main/resources/mpack.json
@@ -0,0 +1,39 @@
+{
+  "type": "full-release",
+  "name": "microsoft_r-ambari.mpack",
+  "version": "1.0.0.0",
+  "description": "Ambari Management Pack for Microsoft R",
+  "prerequisites": {
+    "min-ambari-version": "2.2.0.0",
+    "min-stack-versions": [
+      {
+        "stack_name": "HDP",
+        "stack_version": "1.3.0"
+      }
+    ]
+  },
+  "artifacts": [
+    {
+      "name": "MICROSOFT_R-common-services",
+      "type" : "service-definitions",
+      "source_dir" : "common-services"
+    },
+    {
+      "name" : "MICROSOFT_R-custom-services",
+      "type" : "stack-extension-definitions",
+      "source_dir": "custom-services",
+      "service_versions_map": [
+        {
+          "service_name" : "MICROSOFT_R",
+          "service_version" : "8.0.0",
+          "applicable_stacks" : [
+            {
+              "stack_name" : "HDP",
+              "stack_version" : "2.2"
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/c2cd661f/contrib/management-packs/pom.xml
----------------------------------------------------------------------
diff --git a/contrib/management-packs/pom.xml b/contrib/management-packs/pom.xml
new file mode 100644
index 0000000..c8acf6b
--- /dev/null
+++ b/contrib/management-packs/pom.xml
@@ -0,0 +1,161 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.apache.ambari</groupId>
+    <artifactId>ambari-project</artifactId>
+    <version>2.0.0.0-SNAPSHOT</version>
+    <relativePath>../../ambari-project</relativePath>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.ambari.contrib.mpacks</groupId>
+  <artifactId>ambari-contrib-mpacks</artifactId>
+  <packaging>pom</packaging>
+  <version>2.0.0.0-SNAPSHOT</version>
+  <name>Ambari Contrib Management Packs</name>
+  <properties>
+    <ambari.version>2.0.0.0-SNAPSHOT</ambari.version>
+    <ambari.dir>${project.parent.parent.basedir}</ambari.dir>
+    <hadoop.version>2.7.1</hadoop.version>
+  </properties>
+  <modules>
+    <module>microsoft-r_mpack</module>
+  </modules>
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.rat</groupId>
+          <artifactId>apache-rat-plugin</artifactId>
+          <version>0.11</version>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <!--GIT files-->
+            <exclude>.git/</exclude>
+            <exclude>**/.gitignore</exclude>
+            <exclude>**/.gitattributes</exclude>
+            <!--gitignore content-->
+            <exclude>.idea/</exclude>
+            <exclude>pass.txt</exclude>
+            <exclude>.DS_Store</exclude>
+            <exclude>.iml/</exclude>
+            <exclude>.classpath</exclude>
+            <exclude>.project</exclude>
+            <exclude>.settings</exclude>
+            <exclude>**/target/**</exclude>
+            <exclude>**/.gitkeep</exclude>
+            <exclude>**/.bowerrc</exclude>
+            <exclude>**/.editorconfig</exclude>
+            <exclude>**/.jshintrc</exclude>
+            <exclude>**/.tmp/**</exclude>
+            <exclude>**/tmp/**</exclude>
+            <exclude>**/*.json</exclude>
+            <exclude>**/*.svg</exclude>
+            <exclude>**/vendor/**</exclude>
+            <exclude>**/bin</exclude>
+            <exclude>**/node_modules/**</exclude>
+            <exclude>**/vendor/**</exclude>
+            <exclude>**/public/**</exclude>
+            <exclude>**/dist/**</exclude>
+            <exclude>**/bower_components/**</exclude>
+            <exclude>**/bower/**</exclude>
+            <exclude>**/node/**</exclude>
+            <exclude>**/runner.js</exclude>
+            <exclude>**/assets/javascripts/**</exclude>
+            <exclude>**/assets/stylesheets/**</exclude>
+            <exclude>**/assets/static/javascripts/**</exclude>
+            <exclude>**/assets/static/stylesheets/**</exclude>
+            <exclude>storm/src/main/resources/**</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>rpm-maven-plugin</artifactId>
+        <version>2.0.1</version>
+        <executions>
+          <execution>
+            <!-- unbinds rpm creation from maven lifecycle -->
+            <phase>none</phase>
+            <goals>
+              <goal>rpm</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <copyright>2012, Apache Software Foundation</copyright>
+          <group>Development</group>
+          <description>Maven Recipe: RPM Package.</description>
+          <mappings/>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.vafer</groupId>
+        <artifactId>jdeb</artifactId>
+        <version>1.0.1</version>
+        <executions>
+          <execution>
+            <phase>none</phase>
+            <goals>
+              <goal>jdeb</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <skip>true</skip>
+          <attach>false</attach>
+          <submodules>true</submodules>
+          <controlDir>${ambari.dir}/ambari-project/src/main/package/deb/control</controlDir>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <configuration>
+          <descriptors>
+            <descriptor>${ambari.dir}/ambari-project/src/main/assemblies/empty.xml</descriptor>
+          </descriptors>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <profiles>
+    <profile>
+      <id>linux</id>
+      <activation>
+        <os>
+          <family>unix</family>
+        </os>
+      </activation>
+      <modules>
+        <module>microsoft-r_mpack</module>
+      </modules>
+    </profile>
+  </profiles>
+  <dependencyManagement>
+    <dependencies>
+    </dependencies>
+  </dependencyManagement>
+
+</project>


Mime
View raw message