Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Build Instructions

Eric edited this page Mar 23, 2018 · 7 revisions

Purpose

The following build instructions are designed to help you build the Neon application WAR file from the source code. If you just want to get started with Neon, see the README. If you have already built Neon or have downloaded a copy of the neon.war file from the Neon site, proceed to the Deploying Neon for instructions on running Neon in a web server (e.g., Jetty or Tomcat).

The build instructions assume the developer is running on a Linux operating system.

Dependencies

Refer to the requirements page for a list of Neon's required dependencies.

Initial Setup

Prior to building Neon from source, create a gradle.properties file and configure it to your Mongo, ElasticSearch, and/or Spark SQL databases. Place this file in the top level NEON directory or in your user home directory. See the gradle.properties.sample for example file configurations. For more information on gradle.properies, see the Gradle docs.

Use the following steps to create and configure the gradle.properties file:

  1. Open a terminal and cd into the Neon project directory.
  2. Copy gradle.properties.sample to gradle.properties using the following command:

     cp gradle.properties.sample gradle.properties


*Alternatively*: Instead of creating the **gradle.properties** file, configure the **GRADLE_OPTS** environment variable

     (Java 7) GRADLE_OPTS=-Xmx1024M -XX:MaxPermSize=512M -Dorg.gradle.daemon=true 
     (Java 8) GRADLE_OPTS=-Xmx1024M -Dorg.gradle.daemon=true 

and pass the additional Neon properties in using the `-P` flag (when running Gradle). For example:

     ./gradlew jettyRun -Pmongo.host=localhost
  1. Customize the gradle.properties file with your system details. You may delete any properties you are not using. For example, delete the Tomcat deploy properties if you are not deploying to Tomcat. Configurable properties in the gradle.properties include:

    • NEON_SERVER - Set this property to your Tomcat server location.

    • mongo.host - Set this property to your Mongo database instance(s). Use comma separation to add more than one Mongo database.

    • hdfs.url - Set this property to the port of the Hadoop Distributed File System (HDFS) namenode.

    • sparksql.host - Set this property to your Spark SQL Thrift server.

    • elasticsearch.host - (New in 1.1.5) Set this property to your ElasticSearch 1.7.x server.

Building Neon

After the external dependencies are installed and you've configured the gradle.properties file, use the following steps to build the Neon application.

  1. Open a terminal and cd into the Neon project directory.

  2. Execute the following command to build Neon:

     ./gradlew build
    

This command compiles the source code, runs the unit tests, executes static code quality checks and builds the neon.war file. The WAR file is added to the neon-server/build/libs directory.

Now you're ready to run Neon!

Proceed to the Deploying Neon page for deployment instructions for running Neon in a Jetty container (best for development environments) or in a Tomcat container (best for production environments).

Alternative Build and Test Commands

Additional Gradle commands are available to test the Neon source code. The following commands will execute acceptance, integration and performance tests, respectively. Neon developers have extensively tested the application, therefore executing these commands is necessary only when you are making changes to the source code.

  1. Open a terminal and cd into the Neon project directory.

  2. Run the Gradle command to build Neon from source code and execute the following test:

    • ./gradlew acceptanceTest - Runs end-to-end acceptance tests. (Requires Mongo)

    • ./gradlew integrationTest - Runs integration tests against the existing data sources. (Requires Mongo, ElasticSearch, and Spark SQL)

    • ./gradlew gatling - Runs multi-user concurrency tests. (Requires Mongo, ElasticSearch, and Spark SQL)