Skip to content

Pivotal-Open-Source-Hub/WifiAnalyticsIoT

Repository files navigation

WAN-Analytics-IoT

For instructions on the setup of the devices, please see README - Raspberry PI

Setup Geode

$ cd server
$ gfsh

gfsh>  start locator --name=locator1 --mcast-port=0 --bind-address=<ADDRESS>
gfsh> start server --name=server1 --mcast-port=0 --bind-address=<ADDRESS>
gfsh> create region --name=/Probe_requests --type=PARTITION
gfsh> create region --name=/Distances --type=REPLICATE
gfsh> create region --name=/DeviceLocations --type=REPLICATE
gfsh> create region --name=/RaspberryPIs --type=REPLICATE

Setup Spring XD

  • Start Spring XD server

$ xd-singlenode
(...)
  • Modify the file server/streams.xd to connect to the right XD server as creating the stream.

  • Create the stream:

$ xd-shell --cmdfile streams.xd
Jul 15, 2015 11:12:56 PM org.springframework.shell.core.AbstractShell handleExecutionResult
INFO: Successfully targeted http://172.20.14.47:9393
Jul 15, 2015 11:13:07 PM org.springframework.shell.core.AbstractShell handleExecutionResult
INFO: Created and deployed new stream 'input'

Start the GUI

  • Modify the file server/WebConsole/src/main/resources/client.xml to connect to the right Gem locator host

  • Startup the client:

$ cd server/WebConsole
$ ./gradlew run
  • Open the browser at __http://<server>:8080/

Start clients

For each Raspberry PI:

  • SSH to the Raspberry PIs

$ ssh pi@<PI_HOST>
PI $ cd WifiAnalyticsIoT/client/IoT-Analytics-Http
  • Modify the file client/IoT-Analytics-Http/src/main/resources/application.properties to connect to the right Spring XD server and to use the correct tshark command syntax.

  • Start the client:

$ cd WifiAnalyticsIoT/client/IoT-Analytics-Http
$ ./gradlew run

VM Configuation (Ubuntu based)

# requirements
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get -y update && sudo apt-get -y install oracle-java8-installer git wget python vagrant unzip npm virtualbox

# docker
wget -qO- https://get.docker.com/ | sh

# maven - zeppelin needs maven 3.1+
wget ftp://mirror.reverse.net/pub/apache/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
sudo mkdir -p /usr/local/apache-maven
sudo mv apache-maven-3.3.3-bin.tar.gz /usr/local/apache-maven
cd /usr/local/apache-maven
sudo tar -xzvf apache-maven-3.3.3-bin.tar.gz
export PATH=/usr/local/apache-maven/apache-maven-3.3.3/bin:$PATH

# geode
git clone https://github.com/apache/incubator-geode
cd incubator-geode && ./gradlew clean build -Dskip.tests=true

# zeppelin
git clone https://github.com/apache/incubator-zeppelin
cd incubator-zeppelin && mvn clean package -Pspark-1.3 -Dhadoop.version=2.2.0 -Phadoop-2.2 -DskipTests

# lattice
git clone https://github.com/cloudfoundry-incubator/lattice.git
cd lattice
git checkout v0.2.6
vagrant up --provider virtualbox

# project
git clone https://github.com/Pivotal-Open-Source-Hub/WifiAnalyticsIoT
cd WifiAnalyticsIoT/server/WebConsole && ./gradlew build
cd WifiAnalyticsIoT/client/IoT-Analytics-Http && ./gradlew build