Code Monkey home page Code Monkey logo

bigdata-cluster's Introduction

BigData Cluster

Off-The-Shelf solution to run a cluster for Big Data with docker.

Software installed:

Prerequisites

Before to start, you have to had the following softwares to be installed on all your machines:

Installing Docker Engine

https://docs.docker.com/engine/installation/

Setup

Network

Run the following command on your master pc.

$ sudo docker swarm init --advertise-addr <ip of your master>

Then, make every node of your cluster, to join the docker swarm cluster.

$ sudo docker swarm join --token <secret token> <ip of your master>

Now that you have all the nodes connected to the swarm, create a network overlay on your master.

$ sudo docker network create --attachable --driver overlay --subnet 10.0.1.0/24 hadoop_cluster

DNS Server

This container will run Serf and dnsmasqd.

Serf is tool for cluster membership, failure detection, and orchestration.

dnsmasqd is a lightweight, easy to configure, DNS forwarder.

This container will serve to the cluster the functionality of resolving internal hostnames and detecting when a new slave joins the cluster.

$ sudo docker build -t dns:latest -f Dockerfile-DNS .

Run the container

$ sudo docker run -d -ti --name dns --add-host master:10.0.1.2 --hostname cluster-dns --ip 10.0.1.254 --network hadoop_cluster -e TZ=Europe/Rome <image id> bash -c "/root/boot_dns.sh"

Master

Build the image

$ sudo docker build -t hadoop:latest .

Run the container

$ sudo docker run -d -ti --name master -p 54311:54311 -p 50070:50070 -p 9000:9000 -p 8030:8030 -p 8031:8031 -p 8032:8032 -p 8033:8033 -p 8088:8088 -p 2122:22 --add-host master:10.0.1.2 --add-host cluster-dns:10.0.1.254 --hostname master --ip 10.0.1.2 --dns 10.0.1.254 --network hadoop_cluster -e TZ=Europe/Rome <image id> bash -c "/root/boot_master.sh"

Slaves

Build the image

$ sudo docker build -t hadoop:latest .

Run the container

$ sudo docker run -d -ti --name slave --add-host master:10.0.1.2 --add-host cluster-dns:10.0.1.254 --dns 10.0.1.254 --network hadoop_cluster -e TZ=Europe/Rome <image id> bash -c "/root/boot_slave.sh"

bigdata-cluster's People

Contributors

vitobellini avatar

Stargazers

 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.