Code Monkey home page Code Monkey logo

docker-ambari-cluster's Introduction

docker-ambari

Prerequisites

An Overlay network is needed.
In every docker-machine(vm or real-machine), use following commands to build a swarm:

#start docker deamon with using consul key-value store 
docker daemon -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock --cluster-store=consul://${consul.host.ip}:8500 --cluster-advertise=${network-interface}:2375

Steps:
#start consul (first)
docker run -d \
    -v /data \
    -p 8300:8300 \
    -p 8301:8301 \
    -p 8301:8301/udp \
    -p 8302:8302 \
    -p 8302:8302/udp \
    -p 8400:8400 \
    -p 8500:8500 \
    -h consul_m01 \
    --name consul_m01 \
    --restart=always \
    progrium/consul -server -advertise ${consul.host.ip} -bootstrap-expect 2
    
#start consul (others)
  docker run -d \
    -v /data \
    -p 8300:8300 \
    -p 8301:8301 \
    -p 8301:8301/udp \
    -p 8302:8302 \
    -p 8302:8302/udp \
    -p 8400:8400 \
    -p 8500:8500 \
    -h consul_m02 \
    --name consul_m02 \
    --restart=always \
    progrium/consul -server -advertise ${this.machine.ip} -join ${consul.host.ip}
    
#start swarm-agent
docker run --name=agent -d \
  --restart=always \
  swarm join --advertise=${this.machine.ip}:2375 consul://${consul.host.ip}:8500

#--
#start a swarm-maanger on any machine in this swarm cluster
docker run -d --name=manager_01 -p 2376:2375 \
  --restart=always \
  swarm manage consul://${consul.host.ip}:8500

#Create an overlay network
docker network create --driver overlay net99

docker-ambari-cluster's People

Contributors

yedushusheng avatar

Watchers

James Cloos 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.