Coder Social home page Coder Social logo

anaconda_cluster_install's Introduction

Anaconda Cluster Install

Tool to automate the installation of Anaconda Python in a cluster of linux computers.

What it does

  • It takes a local Anaconda installation file and copies it to each of your selected machines, using a user of your choice (a "ssh user") to copy and execute the commands on each machine (e.g. root)

  • It enters each machine, as that "ssh user" (e.g. root) and there, it changes to another user of your choice, a "destiny user", and installs Anaconda for that "destiny user".

  • It makes Anaconda the default Python installation, only for your "destiny user".

Why Anaconda

  • It's open source

  • It's Python 2.7, the latest 2.* version

  • It includes Numpy, IPython and lots of other cool things, pre-configured and pre-compiled for your architecture

A use case

Imagine you have a Hadoop cluster, with CentOS 6.* machines. (Because CentOS 6.* is the version supported by most Hadoop Distributions). The default Python version is 2.6.

You want to use Spark in that cluster to read from HDFS and execute in YARN, using PySpark. For that you would probably need Python 2.7 and Numpy, IPython, etc. But you should not override the default system's Python installation, many system components may depend on it.

So, this script will allow you to:

  • download Anaconda once (instead of once for each machine to be installed)
  • copy the installer to each of your machines using the root user, which probably already has passwordless SSH keys configured in all your machines
  • connect to each of your machines using again your root user, and install Anaconda only for the yarn user, which is the one that runs Spark

So, if you have passwordless keys configured for your "ssh user", you can run the script and go for a coffee while you wait for it to finish.

How to use

  • Go to the Anaconda Python website: https://store.continuum.io/cshop/anaconda/

  • Go to the downloads link.

  • Select the Linux installer.

  • Download the installer for your version of linux (x86 or x64), it's a .sh file.

  • Run this script with:

      anaconda_install.sh <ssh user> <destiny user> <destiny group owner> <anaconda bash install file> <list of host addresses accessible by the current user, separated by ','>`
    

So, for example:

    bash anaconda_install.sh root yarn hadoop /home/user/Installers/Python/Anaconda-2.1.0-Linux-x86_64.sh 192.168.232.110,192.168.232.111,192.168.232.112"

Or:

    cd ~/Downloads
    bash anaconda_install.sh root yarn hadoop Anaconda*.sh node01,node02,node03,node04,node05"

After the installation is complete, you may need to reboot the machines, so that the services running under your "destiny user" user recognize the new environment with the new Python binaries.

anaconda_cluster_install's People

Contributors

tiangolo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.