THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
Build and install Ambari
...
2.
...
0.0
Step 1: Download and build Ambari
...
2.
...
0.0 source
...
Code Block |
---|
wget http:// |
...
archive.apache.org/dist/ |
...
ambari/ambari-2.0.0/apache-ambari-2.0.0-src.tar.gz
tar xfvz apache-ambari-2.0.0-src.tar.gz
cd apache-ambari-2.0.0-src
mvn versions:set -DnewVersion=2.0.0.0
pushd ambari-metrics
mvn versions:set -DnewVersion=2.0.0.0
popd |
Note: If running into errors while compiling the ambari-metrics package due to missing the artifacts of jms, jmxri, jmxtools:
Code Block |
---|
[ERROR] Failed to execute goal on project ambari-metrics-kafka-sink: Could not resolve dependencies for project org.apache.ambari:ambari-metrics-kafka-sink:jar:2.0.0-0: The following artifacts could not be resolved: javax.jms:jms:jar:1.1, com.sun.jdmk:jmxtools:jar:1.2.1, com.sun.jmx:jmxri:jar:1.2.1: Could not transfer artifact javax.jms:jms:jar:1.1 from/to java.net (https://maven-repository.dev.java.net/nonav/repository): No connector available to access repository java.net (https://maven-repository.dev.java.net/nonav/repository) of type legacy using the available factories WagonRepositoryConnectorFactory |
The work around is to manually install the three missing artifacts:
Code Block |
---|
mvn install:install-file -Dfile=jms-1.1.pom -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar
mvn install:install-file -Dfile=jmxtools-1.2.1.pom -DgroupId=com.sun.jdmk -DartifactId=jmxtools -Dversion=1.2.1 -Dpackaging=jar
mvn install:install-file -Dfile=jmxri-1.2.1.pom -DgroupId=com.sun.jmx -DartifactId=jmxri -Dversion=1.2.1 -Dpackaging=jar |
The three poms are:
Code Block |
---|
$ cat jms-1.1.pom
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
<version>1.1</version>
<name>Java Message Service</name>
<description>
The Java Message Service (JMS) API is a messaging standard that allows application components based on the Java 2 Platform, Enterprise Edition (J2EE) to create, send, receive, and read messages. It enables distributed communication that is loosely coupled, reliable, and asynchronous.
</description>
<url>http://java.sun.com/products/jms</url>
<distributionManagement>
<downloadUrl>http://java.sun.com/products/jms/docs.html</downloadUrl>
</distributionManagement> |
Code Block |
---|
$ cat jmxri-1.2.1.pom
<?xml version="1.0" encoding="UTF-8"?><project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
<version>1.2.1</version>
<distributionManagement>
<status>deployed</status>
</distributionManagement> |
Code Block |
---|
$ cat jmxtools-1.2.1.pom
<?xml version="1.0" encoding="UTF-8"?><project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
<version>1.2.1</version>
<distributionManagement>
<status>deployed</status>
</distributionManagement> |
...
Code Block |
---|
wget http://www.apache.org/dist/ambari/ambari-1.7.0/ambari-1.7.0.tar.gz (use the suggested mirror from above)
tar xfvz ambari-1.7.0.tar.gz
cd ambari-1.7.0
mvn versions:set -DnewVersion=1.7.0.0
|
RHEL (CentOS 5 or 6) & SUSE (SLES 11):
Code Block |
---|
mvn -B clean install package rpm:rpm -DnewVersion=12.70.0.0 -DskipTests -Dpython.ver="python >= 2.6" |
...
Code Block |
---|
mvn -B clean install package jdeb:jdeb -DnewVersion=12.70.0.0 -DskipTests -Dpython.ver="python >= 2.6" |
...