anchor.diff:  FROM ubuntu
   MAINTAINER Russell Jurney, russell.jurney@gmail.com
   
  +WORKDIR /root
  +
   # Update apt-get
  -RUN apt-get update
  -
  -# Things we'll need
  -RUN apt-get install -y zip unzip curl bzip2 python-dev build-essential
  +RUN apt-get update && \
  +    apt-get install -y zip unzip curl bzip2 python-dev build-essential git
   
   # Setup Oracle Java8
  -RUN apt-get install -y software-properties-common debconf-utils
  -RUN add-apt-repository -y ppa:webupd8team/java
  -RUN apt-get update
  -RUN echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections
  -RUN apt-get install -y oracle-java8-installer
  +RUN apt-get install -y software-properties-common debconf-utils && \
  +    add-apt-repository -y ppa:webupd8team/java && \
  +    apt-get update && \
  +    echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections && \
  +    apt-get install -y oracle-java8-installer
   ENV JAVA_HOME=/usr/lib/jvm/java-8-oracle
   
   # Download and install Anaconda Python
  -WORKDIR /root
   ADD http://repo.continuum.io/archive/Anaconda3-4.2.0-Linux-x86_64.sh /tmp/Anaconda3-4.2.0-Linux-x86_64.sh
   RUN bash /tmp/Anaconda3-4.2.0-Linux-x86_64.sh -b -p /root/anaconda
   ENV PATH="/root/anaconda/bin:$PATH"
  
positive.code: #
  # Install and setup Kafka
  #
  WORKDIR /root
  ADD http://www-us.apache.org/dist/kafka/0.10.1.1/kafka_2.11-0.10.1.1.tgz /tmp/kafka_2.11-0.10.1.1.tgz
  RUN mkdir -p /root/kafka
  RUN tar -xvzf /tmp/kafka_2.11-0.10.1.1.tgz -C kafka --strip-components=1
  
  # Run zookeeper (which kafka depends on), then Kafka
  RUN /root/kafka/bin/zookeeper-server-start.sh /root/kafka/config/zookeeper.properties
  RUN /root/kafka/bin/kafka-server-start.sh /root/kafka/config/server.properties
  
  #
  # Install and set up Airflow
  #
  # Install Apache Incubating Airflow
  WORKDIR /root
  RUN pip install airflow # should have already installed via above: pip install -r requirements.txt
  RUN mkdir /root/airflow
  RUN mkdir /root/airflow/dags
  RUN mkdir /root/airflow/logs
  RUN mkdir /root/airflow/plugins
  RUN airflow initdb
  RUN airflow webserver -D
  RUN airflow scheduler -D
  
  #
  # Install and setup Zeppelin
  #
  WORKDIR /root
  ADD http://www-us.apache.org/dist/zeppelin/zeppelin-0.6.2/zeppelin-0.6.2-bin-all.tgz /tmp/zeppelin-0.6.2-bin-all.tgz
  RUN mkdir -p /root/zeppelin
  RUN tar -xvzf /tmp/zeppelin-0.6.2-bin-all.tgz -C zeppelin --strip-components=1
  
  # Configure Zeppelin
  RUN cp /root/zeppelin/conf/zeppelin-env.sh.template /root/zeppelin/conf/zeppelin-env.sh
  RUN echo "export SPARK_HOME=/root/spark" >> /root/zeppelin/conf/zeppelin-env.sh
  RUN echo "export SPARK_MASTER=local" >> /root/zeppelin/conf/zeppelin-env.sh
  RUN echo "export SPARK_CLASSPATH=" >> /root/zeppelin/conf/zeppelin-env.sh
  
  # Done!
negative.code: #
  # Install ElasticSearch in the elasticsearch directory in the root of our project, and the Elasticsearch for Hadoop package
  #
  ADD https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.1.1.tar.gz /tmp/elasticsearch-5.1.1.tar.gz
  RUN mkdir /root/elasticsearch && \
      tar -xvzf /tmp/elasticsearch-5.1.1.tar.gz -C elasticsearch --strip-components=1 && \
      /root/elasticsearch/bin/elasticsearch && \
      rm -f /tmp/elasticsearch-5.1.1.tar.gz
  
  # Install Elasticsearch for Hadoop
  ADD http://download.elastic.co/hadoop/elasticsearch-hadoop-5.1.1.zip /tmp/elasticsearch-hadoop-5.1.1.zip
  RUN unzip /tmp/elasticsearch-hadoop-5.1.1.zip && \
      mv /root/elasticsearch-hadoop-5.1.1 /root/elasticsearch-hadoop && \
      cp /root/elasticsearch-hadoop/dist/elasticsearch-hadoop-5.1.1.jar /root/Agile_Data_Code_2/lib/ && \
      cp /root/elasticsearch-hadoop/dist/elasticsearch-spark-20_2.10-5.1.1.jar /root/Agile_Data_Code_2/lib/ && \
      echo "spark.speculation false" >> /root/spark/conf/spark-defaults.conf && \
      rm -f /tmp/elasticsearch-hadoop-5.1.1.zip && \
      rm -rf /root/elasticsearch-hadoop
  
  # Install and add snappy-java and lzo-java to our classpath below via spark.jars
  ADD http://central.maven.org/maven2/org/xerial/snappy/snappy-java/1.1.2.6/snappy-java-1.1.2.6.jar /tmp/snappy-java-1.1.2.6.jar
  ADD http://central.maven.org/maven2/org/anarres/lzo/lzo-hadoop/1.0.5/lzo-hadoop-1.0.5.jar /tmp/lzo-hadoop-1.0.5.jar
  RUN mv /tmp/snappy-java-1.1.2.6.jar /root/Agile_Data_Code_2/lib/ && \
      mv /tmp/lzo-hadoop-1.0.5.jar /root/Agile_Data_Code_2/lib/
  
  # Setup mongo and elasticsearch jars for Spark
  RUN echo "spark.jars /root/Agile_Data_Code_2/lib/mongo-hadoop-spark-1.5.2.jar,/root/Agile_Data_Code_2/lib/mongo-java-driver-3.4.0.jar,/root/Agile_Data_Code_2/lib/mongo-hadoop-1.5.2.jar,/root/Agile_Data_Code_2/lib/elasticsearch-spark-20_2.10-5.1.1.jar,/root/Agile_Data_Code_2/lib/snappy-java-1.1.2.6.jar,/root/Agile_Data_Code_2/lib/lzo-hadoop-1.0.5.jar" >> /root/spark/conf/spark-defaults.conf
  