Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Alternatively, you can easily launch a VM that is preconfigured with all the tools that you need.  See the Pre-Configured Development Environment section in the Quick Start Guide.

  • xCode (if using Mac, get it from the apple store)
  • JDK 1.6.0
  • Apache Maven 3.0.5 <- Maven 3.1.0 results in errors when building ambari-agent
    Tip: In order to persist your changes to the JAVA_HOME environment variable and add Maven to your path, create the following files:
    File: ~/.profile
    Code Block
    source ~/.bashrc

     

    File: ~/.bashrc
    Code Block
    export PATH=/usr/local/apache-maven-3.0.5/bin:$PATH
    export JAVA_HOME=$(/usr/libexec/java_home)
  • Python 2.6
  • Python setuptools - python 2.6: Download or python 2.7: Download and run:
    2.6:

    Code Block
    sh setuptools-0.6c11-py2.6.egg

    2.7

    Code Block
    sh setuptools-0.6c11-py2.7.egg
  • rpmbuild (rpm-build package)
  • g++ (gcc-c++ package)
  • NodeJS - v0.10.2 or later is recommended.  Latest version tested for compatibility is v0.10.24 (as of Jan 15, 2014).  Download the binary tarball, extract, and put the bin directory in your PATH.  Verify that you can run the command node and npm.  Alternatively, you can use yum to install NodeJS if you are on Fedora 18:

    Code Block
    #Fedora 18: sudo yum update audit; sudo yum --enablerepo=updates-testing install nodejs npm
  • Brunch 1.7.13 (to install it, run the following command after NodeJS is installed):

    Code Block
    npm install -g brunch@1.7.13

    Verify that you can run the command brunch.  Later versions may work, but 1.7.13 is the latest version that has been tested (as of Jan 15, 2014).

Running Unit Tests

  • mvn clean test

NOTE: Please make sure you have npm in the path before running the unit tests.

Building Ambari

The first time you build Ambari, 

Code Block
cd $AMBARI_DIR/ambari-web
rm -rf node_modules
npm install
brunch build

cd ..

Note: if you can an error that too many files are open, then run, ulimit -n 10000

To build Ambari RPMs, run the following.

...