Skip to content

Instantly share code, notes, and snippets.

@brendancol
Created May 30, 2015 04:10
Show Gist options
  • Select an option

  • Save brendancol/d9f90f145b2cf1825bf6 to your computer and use it in GitHub Desktop.

Select an option

Save brendancol/d9f90f145b2cf1825bf6 to your computer and use it in GitHub Desktop.
# install-on-workers.sh
while read slave_url; do
echo "Installing dependencies to ${slave_url}"
ssh root@${slave_url} 'bash -s' < worker-install.sh
done <persistent-hdfs/conf/slaves
# worker-install.sh
yum install libgeos-devel -y
yum install python-devel -y
yum install python-pip -y
yum install python-virtualenv -y
yum install gcc -y
virtualenv env
source env/bin/activate
pip install numpy
pip install cython
pip install shapely
echo "export SPARK_HOME=/root/spark/" >> /etc/profile
echo "export PYSPARK_PYTHON=/root/env/bin/python" >> /etc/profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment