added applatix scripts and tools
diff --git a/scripts/applatix/build.sh b/scripts/applatix/build.sh
new file mode 100755
index 0000000..7a86e6c
--- /dev/null
+++ b/scripts/applatix/build.sh
@@ -0,0 +1,111 @@
+#!/bin/bash
+#
+# Script to kick off the travis CI build. We want the build to fail-fast if any
+# of the below commands fail so we need to chain them in this script.
+#
+
+set -e
+
+DIR=`dirname $0`
+UTILS=${DIR}/../shutils
+source ${UTILS}/common.sh
+
+# verify that jars have not been added to the repo
+JARS=`find . -name "*.jar"`
+if [ "$JARS" ]; then
+  echo "ERROR: The following jars were found in the repo, "\
+    "which is not permitted. Instead add the jar to WORKSPACE as a maven_jar."
+  echo $JARS
+  exit 1
+fi
+
+# verify that eggs have not been added to the repo
+# ./third_party/pex/wheel-0.23.0-py2.7.egg should be the only one
+set +e
+EGGS=`find . -name "*.egg" | grep -v "third_party/pex/wheel"`
+set -e
+if [ "$EGGS" ]; then
+  echo 'ERROR: The following eggs were found in the repo, '\
+    'which is not permitted. Python dependencies should be '\
+    'added using the "reqs" attribute:'
+  echo $EGGS
+  exit 1
+fi
+
+# verify that wheels have not been added to the repo
+# ./third_party/pex/setuptools-18.0.1-py2.py3-none-any.whl should be the only one
+set +e
+WHEELS=`find . -name "*.whl" | grep -v "third_party/pex/setuptools"`
+set -e
+if [ "$WHEELS" ]; then
+  echo 'ERROR: The following wheels were found in the repo, '\
+  'which is not permitted. Python dependencies should be added using '\
+  'the "reqs" attribute:'
+  echo $WHEELS
+  exit 1
+fi
+
+set +x
+
+# Autodiscover the platform
+PLATFORM=$(discover_platform)
+echo "Using $PLATFORM platform"
+
+# Run this manually, since if it fails when run
+# as -workspace_status_command we don't get good output
+./scripts/release/status.sh
+
+# append the bazel default bazelrc to applatix/bazel.rc
+# for using rules provided by bazel
+# cat ~/.bazelrc >> tools/applatix/bazel.rc
+./bazel_configure.py
+
+# build heron
+T="heron build"
+start_timer "$T"
+python ${UTILS}/save-logs.py "heron_build.txt" bazel\
+  --bazelrc=tools/applatix/bazel.rc build --config=$PLATFORM heron/...
+end_timer "$T"
+
+# run heron unit tests
+T="heron test non-flaky"
+start_timer "$T"
+python ${UTILS}/save-logs.py "heron_test_non_flaky.txt" bazel\
+  --bazelrc=tools/applatix/bazel.rc test\
+  --test_summary=detailed --test_output=errors\
+  --config=$PLATFORM --test_tag_filters=-flaky heron/...
+end_timer "$T"
+
+# flaky tests are often due to test port race conditions,
+# which should be fixed. For now, run them serially
+T="heron test flaky"
+start_timer "$T"
+python ${UTILS}/save-logs.py "heron_test_flaky.txt" bazel\
+  --bazelrc=tools/applatix/bazel.rc test\
+  --test_summary=detailed --test_output=errors\
+  --config=$PLATFORM --test_tag_filters=flaky --jobs=0 heron/...
+end_timer "$T"
+
+T="heron build binpkgs"
+start_timer "$T"
+python ${UTILS}/save-logs.py "heron_build_binpkgs.txt" bazel\
+  --bazelrc=tools/applatix/bazel.rc build\
+  --config=$PLATFORM scripts/packages:binpkgs
+end_timer "$T"
+
+T="heron build testpkgs"
+start_timer "$T"
+python ${UTILS}/save-logs.py "heron_build_binpkgs.txt" bazel\
+  --bazelrc=tools/applatix/bazel.rc build\
+  --config=$PLATFORM scripts/packages:testpkgs
+end_timer "$T"
+
+T="heron clear tar and zip files"
+start_timer "$T"
+rm -rf ./bazel-bin/scripts/packages/*.tar 
+rm -rf ./bazel-bin/scripts/packages/*.tar.gz 
+rm -rf ./bazel-bin/scripts/packages/*.args
+rm -rf ./bazel-bin/scripts/packages/*.zip
+end_timer "$T"
+
+print_timer_summary
diff --git a/scripts/applatix/ci.sh b/scripts/applatix/ci.sh
new file mode 100755
index 0000000..b7b0722
--- /dev/null
+++ b/scripts/applatix/ci.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+export PATH=$PATH:/root/bin
+
+which gcc
+gcc --version
+
+which g++
+g++ --version
+
+which python
+python --version
+
+cd /heron && USER=abc scripts/travis/ci.sh
diff --git a/scripts/applatix/javatests.sh b/scripts/applatix/javatests.sh
new file mode 100755
index 0000000..0744aaa
--- /dev/null
+++ b/scripts/applatix/javatests.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+#
+# Script to kick off the travis CI integration test. Fail-fast if any of tthe below commands fail.
+#
+set -e
+
+DIR=`dirname $0`
+source ${DIR}/testutils.sh
+
+# integration test binaries have to be specified as absolute path
+JAVA_INTEGRATION_TESTS_BIN="${HOME}/.herontests/lib/integration-tests.jar"
+
+# run the java integration test
+T="heron integration_test java"
+start_timer "$T"
+${HOME}/bin/http-server 8080 &
+http_server_id=$!
+trap "kill -9 $http_server_id" SIGINT SIGTERM EXIT
+
+${HOME}/bin/test-runner \
+  -hc heron -tb ${JAVA_INTEGRATION_TESTS_BIN} \
+  -rh localhost -rp 8080\
+  -tp ${HOME}/.herontests/data/java \
+  -cl local -rl heron-staging -ev devel
+end_timer "$T"
+
+print_timer_summary
diff --git a/scripts/applatix/prepare.sh b/scripts/applatix/prepare.sh
new file mode 100755
index 0000000..6551043
--- /dev/null
+++ b/scripts/applatix/prepare.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+ln -s /usr/bin/nodejs /usr/bin/node
+cd /heron/website && npm install && npm install gulp
diff --git a/scripts/applatix/pythontests.sh b/scripts/applatix/pythontests.sh
new file mode 100755
index 0000000..f3d5172
--- /dev/null
+++ b/scripts/applatix/pythontests.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+#
+# Script to kick off the travis CI integration test. Fail-fast if any of tthe below commands fail.
+#
+set -e
+
+DIR=`dirname $0`
+source ${DIR}/testutils.sh
+
+# integration test binaries have to be specified as absolute path
+PYTHON_INTEGRATION_TESTS_BIN="${HOME}/.herontests/lib/heron_integ_topology.pex"
+
+# run the python integration test
+T="heron integration_test python"
+start_timer "$T"
+${HOME}/bin/http-server 8080 &
+http_server_id=$!
+trap "kill -9 $http_server_id" SIGINT SIGTERM EXIT
+
+${HOME}/bin/test-runner \
+  -hc heron -tb ${PYTHON_INTEGRATION_TESTS_BIN} \
+  -rh localhost -rp 8080\
+  -tp ${HOME}/.herontests/data/python \
+  -cl local -rl heron-staging -ev devel
+end_timer "$T"
+
+print_timer_summary
diff --git a/scripts/applatix/test.sh b/scripts/applatix/test.sh
new file mode 100755
index 0000000..c346dea
--- /dev/null
+++ b/scripts/applatix/test.sh
@@ -0,0 +1,64 @@
+#!/bin/bash
+#
+# Script to kick off the travis CI integration test. Fail-fast if any of tthe below commands fail.
+#
+set -e
+
+DIR=`dirname $0`
+UTILS=${DIR}/../shutils
+source ${UTILS}/common.sh
+
+# Autodiscover the platform
+PLATFORM=$(discover_platform)
+echo "Using $PLATFORM platform"
+
+# include HOME directory bin in PATH for heron cli, tools and tests
+export PATH=${HOME}/bin:$PATH
+
+# integration test binaries have to be specified as absolute path
+JAVA_INTEGRATION_TESTS_BIN="${HOME}/.herontests/lib/integration-tests.jar"
+PYTHON_INTEGRATION_TESTS_BIN="${HOME}/.herontests/lib/heron_integ_topology.pex"
+
+# install client
+T="heron client install"
+start_timer "$T"
+python ${UTILS}/save-logs.py "heron_client_install.txt" ./heron-client-install.sh --user
+end_timer "$T"
+
+# install tools
+T="heron tools install"
+start_timer "$T"
+python ${UTILS}/save-logs.py "heron_tools_install.txt" ./heron-tools-install.sh --user
+end_timer "$T"
+
+# install tests
+T="heron tests install"
+start_timer "$T"
+python ${UTILS}/save-logs.py "heron_tests_install.txt" ./heron-tests-install.sh --user
+end_timer "$T"
+
+# run the java integration test
+T="heron integration_test java"
+start_timer "$T"
+${HOME}/bin/http-server 8080 &
+http_server_id=$!
+trap "kill -9 $http_server_id" SIGINT SIGTERM EXIT
+
+${HOME}/bin/test-runner \
+  -hc heron -tb ${JAVA_INTEGRATION_TESTS_BIN} \
+  -rh localhost -rp 8080\
+  -tp ${HOME}/.herontests/data/java \
+  -cl local -rl heron-staging -ev devel
+end_timer "$T"
+
+# run the python integration test
+T="heron integration_test python"
+start_timer "$T"
+${HOME}/bin/test-runner \
+  -hc heron -tb ${PYTHON_INTEGRATION_TESTS_BIN} \
+  -rh localhost -rp 8080\
+  -tp ${HOME}/.herontests/data/python \
+  -cl local -rl heron-staging -ev devel
+end_timer "$T"
+
+print_timer_summary
diff --git a/scripts/applatix/testutils.sh b/scripts/applatix/testutils.sh
new file mode 100755
index 0000000..0921936
--- /dev/null
+++ b/scripts/applatix/testutils.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+#
+# Script to kick off the travis CI integration test. Fail-fast if any of tthe below commands fail.
+#
+set -e
+
+DIR=`dirname $0`
+UTILS=${DIR}/../shutils
+source ${UTILS}/common.sh
+
+# Autodiscover the platform
+PLATFORM=$(discover_platform)
+echo "Using $PLATFORM platform"
+
+# include HOME directory bin in PATH for heron cli, tools and tests
+export PATH=${HOME}/bin:$PATH
+
+# install client
+T="heron client install"
+start_timer "$T"
+python ${UTILS}/save-logs.py "heron_client_install.txt" ./heron-client-install.sh --user
+end_timer "$T"
+
+# install tools
+T="heron tools install"
+start_timer "$T"
+python ${UTILS}/save-logs.py "heron_tools_install.txt" ./heron-tools-install.sh --user
+end_timer "$T"
+
+# install tests
+T="heron tests install"
+start_timer "$T"
+python ${UTILS}/save-logs.py "heron_tests_install.txt" ./heron-tests-install.sh --user
+end_timer "$T"
+
+print_timer_summary
diff --git a/tools/applatix/bazel.rc b/tools/applatix/bazel.rc
new file mode 100644
index 0000000..a83220d
--- /dev/null
+++ b/tools/applatix/bazel.rc
@@ -0,0 +1,40 @@
+# This is from Bazel's former travis setup, to avoid blowing up the RAM usage.
+startup --host_jvm_args=-Xmx2500m
+startup --host_jvm_args=-Xms2500m
+startup --batch
+test --ram_utilization_factor=10
+test --test_output=errors
+
+# This is so we understand failures better
+build --verbose_failures
+
+build --show_timestamps
+test --show_timestamps
+
+# Limits the jobs to 25 since the resources are limited
+build --jobs 25
+
+# Link with the appropriate libs
+build --linkopt -lm
+build --linkopt -lpthread
+build --linkopt -lrt
+build --experimental_action_listener=tools/cpp:compile_cpp
+build --experimental_action_listener=tools/java:compile_java
+build --experimental_action_listener=tools/python:compile_python
+build --workspace_status_command scripts/release/status.sh
+
+# This is so we use a recent enough GCC when building.
+build --crosstool_top //tools/applatix/toolchain:CROSSTOOL
+
+# This is so we don't use sandboxed execution. Sandboxed execution
+# runs stuff in a container, and since Applatix already runs its script
+# in a container this fails to run tests.
+build --spawn_strategy=standalone --genrule_strategy=standalone
+test --test_strategy=standalone
+
+# Ignore unsupported warning for sandboxing
+build --ignore_unsupported_sandboxing
+
+# Below this line, .travis.yml will cat the default bazelrc.
+# This is needed so Bazel starts with the base workspace in its
+# package path.
diff --git a/tools/applatix/toolchain/BUILD b/tools/applatix/toolchain/BUILD
new file mode 100644
index 0000000..3f369b7
--- /dev/null
+++ b/tools/applatix/toolchain/BUILD
@@ -0,0 +1,59 @@
+licenses(["restricted"])
+
+package(default_visibility = ["//visibility:public"])
+
+filegroup(
+    name = "empty",
+    srcs = [],
+)
+
+# This is the entry point for --crosstool_top.  Toolchains are found
+# by lopping off the name of --crosstool_top and searching for
+# "cc-compiler-${CPU}" in this BUILD file, where CPU is the target CPU
+# specified in --cpu.
+#
+# This file group should include
+#   * all cc_toolchain targets supported
+#   * all file groups that said cc_toolchain might refer to,
+# including the default_grte_top setting in the CROSSTOOL
+# protobuf.
+filegroup(
+    name = "toolchain",
+    srcs = [
+        ":cc-compiler-local",
+        ":empty",
+    ],
+)
+
+cc_toolchain(
+    name = "cc-compiler-local",
+    all_files = ":empty",
+    compiler_files = ":empty",
+    cpu = "local",
+    dwp_files = ":empty",
+    dynamic_runtime_libs = [":empty"],
+    linker_files = ":empty",
+    objcopy_files = ":empty",
+    static_runtime_libs = [":empty"],
+    strip_files = ":empty",
+    supports_param_files = 0,
+)
+
+cc_toolchain(
+    name = "cc-compiler-k8",
+    all_files = ":empty",
+    compiler_files = ":empty",
+    cpu = "local",
+    dwp_files = ":empty",
+    dynamic_runtime_libs = [":empty"],
+    linker_files = ":empty",
+    objcopy_files = ":empty",
+    static_runtime_libs = [":empty"],
+    strip_files = ":empty",
+    supports_param_files = 0,
+)
+
+filegroup(
+    name = "srcs",
+    srcs = glob(["**"]),
+)
diff --git a/tools/applatix/toolchain/CROSSTOOL b/tools/applatix/toolchain/CROSSTOOL
new file mode 100644
index 0000000..78d7e9c
--- /dev/null
+++ b/tools/applatix/toolchain/CROSSTOOL
@@ -0,0 +1,130 @@
+major_version: "local"
+minor_version: ""
+default_target_cpu: "same_as_host"
+
+default_toolchain {
+  cpu: "k8"
+  toolchain_identifier: "local_linux"
+}
+
+toolchain {
+  abi_version: "local"
+  abi_libc_version: "local"
+  builtin_sysroot: ""
+  compiler: "compiler"
+  host_system_name: "local"
+  needsPic: true
+  supports_gold_linker: false
+  supports_incremental_linker: false
+  supports_fission: false
+  supports_interface_shared_objects: false
+  supports_normalizing_ar: false
+  supports_start_end_lib: false
+  supports_thin_archives: false
+  target_libc: "local"
+  target_cpu: "local"
+  target_system_name: "local"
+  toolchain_identifier: "local_linux"
+
+  tool_path { name: "ar" path: "/usr/bin/ar" }
+  tool_path { name: "compat-ld" path: "/usr/bin/ld" }
+  tool_path { name: "cpp" path: "/usr/bin/cpp" }
+  tool_path { name: "dwp" path: "/usr/bin/dwp" }
+  tool_path { name: "gcc" path: "/usr/bin/gcc" }
+  cxx_flag: "-std=c++0x"
+  linker_flag: "-lstdc++"
+  linker_flag: "-B/usr/bin/"
+
+  # TODO(bazel-team): In theory, the path here ought to exactly match the path
+  # used by gcc. That works because bazel currently doesn't track files at
+  # absolute locations and has no remote execution, yet. However, this will need
+  # to be fixed, maybe with auto-detection?
+  cxx_builtin_include_directory: "/usr/lib/gcc/"
+  cxx_builtin_include_directory: "/usr/local/include"
+  cxx_builtin_include_directory: "/usr/include"
+  tool_path { name: "gcov" path: "/usr/bin/gcov" }
+
+  # C(++) compiles invoke the compiler (as that is the one knowing where
+  # to find libraries), but we provide LD so other rules can invoke the linker.
+  tool_path { name: "ld" path: "/usr/bin/ld" }
+
+  tool_path { name: "nm" path: "/usr/bin/nm" }
+  tool_path { name: "objcopy" path: "/usr/bin/objcopy" }
+  objcopy_embed_flag: "-I"
+  objcopy_embed_flag: "binary"
+  tool_path { name: "objdump" path: "/usr/bin/objdump" }
+  tool_path { name: "strip" path: "/usr/bin/strip" }
+
+  # Anticipated future default.
+  unfiltered_cxx_flag: "-no-canonical-prefixes"
+
+  # Make C++ compilation deterministic. Use linkstamping instead of these
+  # compiler symbols.
+  unfiltered_cxx_flag: "-Wno-builtin-macro-redefined"
+  unfiltered_cxx_flag: "-D__DATE__=\"redacted\""
+  unfiltered_cxx_flag: "-D__TIMESTAMP__=\"redacted\""
+  unfiltered_cxx_flag: "-D__TIME__=\"redacted\""
+
+  # Security hardening on by default.
+  # Conservative choice; -D_FORTIFY_SOURCE=2 may be unsafe in some cases.
+  # We need to undef it before redefining it as some distributions now have
+  # it enabled by default.
+  compiler_flag: "-U_FORTIFY_SOURCE"
+  compiler_flag: "-D_FORTIFY_SOURCE=1"
+  compiler_flag: "-fstack-protector"
+  linker_flag: "-Wl,-z,relro,-z,now"
+
+  # Enable coloring even if there's no attached terminal. Bazel removes the
+  # escape sequences if --nocolor is specified. This isn't supported by gcc
+  # on Ubuntu 14.04.
+  # compiler_flag: "-fcolor-diagnostics"
+
+  # All warnings are enabled. Maybe enable -Werror as well?
+  compiler_flag: "-Wall"
+  # Enable a few more warnings that aren't part of -Wall.
+  compiler_flag: "-Wunused-but-set-parameter"
+  # But disable some that are problematic.
+  compiler_flag: "-Wno-free-nonheap-object" # has false positives
+
+  # Keep stack frames for debugging, even in opt mode.
+  compiler_flag: "-fno-omit-frame-pointer"
+
+  # Anticipated future default.
+  linker_flag: "-no-canonical-prefixes"
+  # Have gcc return the exit code from ld.
+  linker_flag: "-pass-exit-codes"
+  # Stamp the binary with a unique identifier.
+  linker_flag: "-Wl,--build-id=md5"
+  linker_flag: "-Wl,--hash-style=gnu"
+  # Gold linker only? Can we enable this by default?
+  # linker_flag: "-Wl,--warn-execstack"
+  # linker_flag: "-Wl,--detect-odr-violations"
+
+  compilation_mode_flags {
+    mode: DBG
+    # Enable debug symbols.
+    compiler_flag: "-g"
+  }
+  compilation_mode_flags {
+    mode: OPT
+
+    # No debug symbols.
+    # Maybe we should enable https://gcc.gnu.org/wiki/DebugFission for opt or
+    # even generally? However, that can't happen here, as it requires special
+    # handling in Bazel.
+    compiler_flag: "-g0"
+
+    # Conservative choice for -O
+    # -O3 can increase binary size and even slow down the resulting binaries.
+    # Profile first and / or use FDO if you need better performance than this.
+    compiler_flag: "-O2"
+
+    # Disable assertions
+    compiler_flag: "-DNDEBUG"
+
+    # Removal of unused code and data at link time (can this increase binary size in some cases?).
+    compiler_flag: "-ffunction-sections"
+    compiler_flag: "-fdata-sections"
+    linker_flag: "-Wl,--gc-sections"
+  }
+}