[
https://issues.apache.org/jira/browse/AMBARI-7275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14147931#comment-14147931
]
Tony Reix commented on AMBARI-7275:
-----------------------------------
Here is a proposal for a README.txt file that explains how to deal with x86_64
and other (PPC64) architectures:
In order to build this distribution of ambari, you have the choice between two
profiles :
- default, which downloads Node.js node executable from official
repositories, provided by the eirslett frontend-maven-plugin.
- node-local, which uses the local Node.js node binary you have to
provide in the ./node-repo/node repository
WARNING : when using the default build option (no -P flag other than the one
used in the following command lines),
the Node.js node version in the ./node-repo/node directory WILL be
replaced by the one downloaded from the net.
As the PPC version of nodejs is not available on the official
repository, you will not get it this way.
1) Prepare
export AMBARI_VERSION=1.6.1.1
mvn versions:set -DnewVersion=${AMBARI_VERSION}
npm install -g brunch
yum install rpm-build
wget https://bootstrap.pypa.io/ez_setup.py -O - | python
2) Build
- Traditional build is (with default profile) :
- Example for Ubuntu / x86_64:
mvn -B clean install package rpm:rpm -DnewVersion=${AMBARI_VERSION}
-DskipTests -Dpython.ver="python > 2.6" -Preplaceurl -l mvn.compile-install.res
- Example for RedHat / x86_64:
mvn -B clean install package jdeb:jdeb -DnewVersion=${AMBARI_VERSION}
-DskipTests -Dpython.ver="python > 2.6" -Preplaceurl -l mvn.compile-install.res
- Example for Ubuntu / PPC64-LE:
cp /usr/bin/node node-repo/node/node
mvn -B clean install package jdeb:jdeb -Pnode-local
-DnewVersion=${AMBARI_VERSION} -DskipTests -Dpython.ver="python > 2.6"
-Preplaceurl -l mvn.compile-install.res
3) Test
mvn -fn -B test [-P node-local] -DnewVersion=${AMBARI_VERSION}
-Dpython.ver="python > 2.6" -Preplaceurl -l mvn.test.res
> Issue while porting Ambari on PPC64: x86_64 code is downloaded and run
> ----------------------------------------------------------------------
>
> Key: AMBARI-7275
> URL: https://issues.apache.org/jira/browse/AMBARI-7275
> Project: Ambari
> Issue Type: Bug
> Components: infra
> Affects Versions: 1.6.1
> Environment: RHEL 7 / PPC64
> Reporter: Tony Reix
> Labels: build, maven
> Attachments: AMBARI-PPC.patch
>
>
> Hi,
> I've started porting Ambari 1.6.1(.1) on different environments (IBM PPC64,
> IBM JVM) and I have several issues.
> One of them is, on RHEL 7 / PPC64, that Maven downloads x86_64 nodejs code
> (node v0.10.26 and npm 1.4.3) and tries to run it, though I already have
> nodejs available on my machine (/opt/node/bin/node , version v0.10.29).
> Changing pom.xml files to version v0.10.29 for node did not fix the issue.
> Following:
> https://cwiki.apache.org/confluence/display/AMBARI/Ambari+Development , I did
> :
> mvn -B clean install package rpm:rpm -DnewVersion=${AMBARI_VERSION}
> -DskipTests -Dpython.ver="python > 2.6" -Preplaceurl
> Traces are:
> ....
> [INFO] Installing node version v0.10.26
> [INFO] Creating temporary ....
> [INFO] Downloading Node.js from
> http://nodejs.org/dist/v0.10.26/node-v0.10.26-linux-x64.tar.gz to ....}
> [INFO] Extracting Node.js files in node_tmp
> [INFO] Unpacking ... into /..../node_tmp
> [INFO] Moving node binary to
> .../ambari/ambari-admin/src/main/resources/ui/admin-web/node/node
> [INFO] Deleting temporary directory ...
> [INFO] Installed node locally.
> [INFO] Running 'npm install --unsafe-perm --color=false' in ...
> [INFO]
> /home/reixt/AMBARI/FromAmbariGitHub/ambari/ambari-admin/src/main/resources/ui/admin-web/node/with_new_path.sh:
> ligne3:
> /home/reixt/AMBARI/FromAmbariGitHub/ambari/ambari-admin/src/main/resources/ui/admin-web/node/node
> : impossible to run binary file
> $ file
> /home/reixt/AMBARI/FromAmbariGitHub/ambari/ambari-admin/src/main/resources/ui/admin-web/node/node
> .../node: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically
> linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
> This MVN/Ambari mechanism needs to be changed so that:
> - it does not download nodejs (node, npm) code if node/npm commands are
> already available (with compatible versions) on my machine
> - it uses compatible versions (as an example: use 0.10.29 if available on
> the machine already and version > 0.10.26 is required)
> - it downloads node.js code for my machine architecture (arch awareness) if
> it is not available on the machine where I want to build Ambari.
> For now, I found no work-around for this issue.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)