Giter Site home page Giter Site logo

docker-ambari's Introduction

Ambari on Docker

This projects aim is to help you to get started with Ambari.

Install Docker

Follow the description at the docker getting started page for your appropriate OS: (Linux, Mac, Windows)

OSX

Ambari containers started by ambari-function are using bridge networking. This means that you will not be able to communicate with containers directly from host unless you specify the route to containers. You can do this with:

# Getting the IP of docker-machine or boot2docker
docker-machine ip <name-of-docker-vm>
# or
boot2docker ip

# Setting up the
sudo route add -net 172.17.0.0/16 <docker-machine or boot2docker>
# e.g:
sudo route add -net 172.17.0.0/16 192.168.99.100

Note: the above mentioned route command will not survive a reboot and you need to execute again after reboot of your machine.

Starting containers

This will start (and download if you never used it before) an image based on Centos 7 with pre-installed Ambari 2.2.0 ready to install HDP 2.3.

This git repository also contains an ambari-functions script which will launch all the necessary containers to create a fully functional cluster. Download the file and source it:

. ambari-functions or source ambari-functions

Now you can issue commands with amb-prefix like:

amb-settings

To start a 3 node cluster:

amb-start-cluster 3

It will launch containers like this (1 Ambari server 2 agents 1 consul server):

CONTAINER ID        IMAGE                          COMMAND                  STATUS              NAMES
52b563756d26        hortonworks/ambari-agent       "/usr/sbin/init syste"   Up 9 seconds        amb2
ddfc8f00d30a        hortonworks/ambari-agent       "/usr/sbin/init syste"   Up 10 seconds       amb1
ca87a0fb6306        hortonworks/ambari-server      "/usr/sbin/init syste"   Up 12 seconds       amb-server
7d18cc35a6b0        sequenceiq/consul:v0.5.0-v6   "/bin/start -server -"    Up 17 seconds       amb-consul

Now you can reach the Ambari UI on the amb-server container's 8080 port. Type the amb-settings for IP:

amb-settings
...
AMBARI_SERVER_IP=172.17.0.17

Cluster deployment via blueprint

Once the container is running, you can deploy a cluster. Instead of going to the webui, we can use ambari-shell, which can interact with ambari via cli, or perform automated provisioning. We will use the automated way, and of course there is a docker image, with prepared ambari-shell in it:

amb-shell

Ambari-shell uses Ambari's Blueprints capability. It posts a cluster definition JSON to the ambari REST api, and 1 more json for cluster creation, where you specify which hosts go to which hostgroup.

Ambari shell will show the progress in the upper right corner.

Multi-node Hadoop cluster

For the multi node Hadoop cluster instructions please take a look at Cloudbreak.

If you don't want to check out the project from github, then just dowload the ambari-fuctions script, source it and deploy a an Ambari cluster:

curl -Lo .amb j.mp/docker-ambari && source .amb && amb-deploy-cluster

docker-ambari's People

Contributors

lalyos avatar akanto avatar mhmxs avatar keyki avatar jenkins-cloudbreak avatar slmingol avatar dlyle65535 avatar oleewere avatar aperepel avatar tibkiss avatar

Watchers

James Cloos avatar Mohit Sethi 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.