Giter VIP home page Giter VIP logo

raspberry-pi-apache-spark-install's Introduction

rapsberry-pi-apache-spark-install

Below is a guide on installing the apache spark environment. Before starting this process ensure that all your nodes firmware is updated

SSH into your master node. Ensure that everything is updated and that java is installed

sudo apt-get update
sudo apt-get upgrade
sudo apt update
sudo apt install default-jdk

Next we want to configure our users for apache spark

sudo groupadd -g 5000 spark
sudo useradd -g 5000 -u  5000 -m spark
sudo passwd spark #password was set to "spark"

And we want to configure a ssh key for the spark user so that passwords don't need to be utilized

ssh-keygen -C "pi" -b 2048 -t rsa
## Copy the keygens to your other hosts
# ssh-copy-id [email protected]
# ssh-copy-id [email protected]

Installing Spark

Download the version of spark and install it:

wget http://d3kbcqa49mib13.cloudfront.net/spark-1.4.0-bin-hadoop2.6.tgz
sudo tar -zxf spark-1.4.0-bin-hadoop2.6.tgz -C /opt/
sudo ln -s /opt/spark-1.4.0-bin-hadoop2.6 /opt/spark
sudo chown -R pi:pi /opt/spark-1.4.0-bin-hadoop2.6

Configure master environment for running by adding these lines into your /opt/spark/conf/spark-env.sh file

SPARK_MASTER_IP=192.168.88.215
SPARK_WORKER_MEMORY=768m

Also create a file that contains a list of all the slave ip addresses, name the file /opt/spark/conf/slaves. My file looks like this:

192.168.88.217

Now simply copy over the configurations for apache spark on to the slave nodes and ensure that all installations are propogated as well.

for i in `cat /opt/spark/conf/slaves`
do 
    scp /opt/spark/conf/slaves $i:/opt/spark/conf/slaves
done

for i in `cat /opt/spark/conf/slaves`
do 
    scp /opt/spark/conf/spark-env.sh $i:/opt/spark/conf/spark-env.sh
done

Starting Apache Spark

Once everything is configured correctly we want to start the master node and slave nodes:

sudo /opt/spark/sbin/start-master.sh

To start all of the slave nodes run the script below:

/opt/spark/sbin/start-slaves.sh 

If you go to your browser @ http://192.168.88.215:8080 you should see the following output:

alt text

raspberry-pi-apache-spark-install's People

Contributors

fufu70 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.