Deployment

Once you have configured your data and modified the required application parameters, you can build and deploy your custom Influent app.

Building Your Project

To build your application to a WAR file
  1. Execute the following command in your project folder:

    mvn clean install
    
  2. Access the compiled WAR in the target/ directory of your project folder.

To build your application and serve it on localhost
  1. Execute the following command in your project folder:

    mvn package jetty:run
    
  2. Access the application at http://localhost:8080/<project-name>/.

Web App Deployment

If you chose to build your application to a WAR file, the following sections describe the process of deploying it to Apache Tomcat and Jetty web servers.

Tomcat Configuration

  1. Copy the WAR file into your server's webapps/ folder. Note that the context path of your application will be /<WAR_file_name>/.
  2. Ensure that the VM has enough heap space by setting a Tomcat options environment variable:
    Shell Command
    Windows set CATALINA_OPTS=-Xmx10240m
    ksh/Bash export CATALINA_OPTS="-Xmx10240m"
    tcsh/csh setenv CATALINA_OPTS "-Xmx10240m"
  3. If this is your only Tomcat installation, set CATALINA_HOME to the Tomcat install directory. Otherwise, set CATALINA_BASE to the Tomcat install directory for this installation.
  4. Create a subfolder in your server's bin/ folder called bin/ and copy in the appropriate PhantomJS binary for your platform. The final path should be /bin/bin/phantomjs/.
  5. Run Tomcat using the platform-appropriate startup script (.sh or .bat) in your server's bin/ folder.

Jetty Configuration

Jetty supports both conventional WAR deployments and skinny WAR deployments, where Influent libraries are supplied outside of your app WAR file so they can be shared across applications or separated from your application code. For example, you may wish to customize two applications to different datasets or make it easier to drop in new Influent updates without having to rebuild your app.

Conventional Deployment

  1. Copy the WAR file into your server's webapps/ folder. Note that the context path of your application will be /<WAR_file_name>/.
  2. Create a subfolder in your server's bin/ folder called bin/ and copy in the appropriate PhantomJS binary for your platform. The final path should be /bin/bin/phantomjs/.
  3. Execute the following command to start your Jetty server and set the proper heap space:

    java -Xmx10240m -jar start.jar
    

Skinny WAR Deployment

The full collection of Influent libraries and transitive dependencies (other libraries needed) is bundled in a ZIP file in the influent-server/target/ directory.

The full collection of client-side resource files (JavaScript, CSS, etc.) are bundled at the tail end of the influent-client build. Two versions are placed in ZIP files in the influent-client/target/ directory:

  • A raw source file useful for debugging
  • A minimized form for optimal loading in deployed scenarios

The "skinny war" approach can be implemented in a standalone Jetty server by configuring the web app's XML file in contexts, similar to the following example. In this example, lib-influent/ is the directory into which you would extract the contents of the ZIP file produced by the server build process.

<Configure class="org.eclipse.jetty.webapp.WebAppContext" id="context">
    <!--Specify the path to the influent directory in Jetty here!!!-->
    <Call name="newResource" id="jarpath">
        <Arg>lib-influent/</Arg>
    </Call>

    <!--Trace path to lib directory for debugging purposes (Optional)-->
    <Get class="java.lang.System" name="out">
        <Call name="println">
            <Arg>LOADING INFLUENT LIBS FROM<Ref id="jarpath"><Get name="file"/></Ref></Arg>
        </Call>
    </Get>

    <!--Set the customized class loader (Boiler Plate)-->
    <Get name="class"><Get name="classLoader" id="parentClassLoader"/></Get>
    <Set name="classLoader">
        <New class="org.eclipse.jetty.webapp.WebAppClassLoader">
            <Arg><Ref id="parentClassLoader"/></Arg>
            <Arg><Ref id="context"/></Arg>
            <Call name="addJars">
                <Arg><Ref id="jarpath"/></Arg>
            </Call>
        </New>
    </Set>
</Configure>

Interested in Learning More?

  • Tour: Take our tour to learn more about Influent.
  • Docs: Learn how to use Influent to explore your large-scale transaction flow data.
  • Live Examples: Explore live examples of the capabilities of Influent.
  • Contact: Contact Uncharted for more information about Influent or to submit technical suggestions/contributions.