GithubHelp home page GithubHelp logo

docker-ambari-2.7's Introduction

docker-ambari

from https://leifengblog.net/blog/install-hortonworks-hdp-3-1-0-on-cluster-of-vmware-virtual-machines/#21--create-and-start-an-http-sever-on-the-master-host

Quick start

Run scripts to build and start server

$ ./scripts/build-image.sh
$ ./scripts/create-local.sh

Get ip of amb-server

docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' amb-server

Accept link

http://${amb-server-ip}:8080/

Build image

cd ambari-base && docker build -t hortonworks/ambari-base:2.7.3 ./ && cd .. 
cd ambari-server && docker build -t hortonworks/ambari-server:2.7.3 ./ && cd .. 
cd ambari-base-local && docker build -t hortonworks/ambari-base-local:2.7.3 ./ && cd .. 
cd ambari-server-local && docker build -t hortonworks/ambari-server-local:2.7.3 ./ && cd .. 

Start container

docker run -d --privileged --name amb-server -it hortonworks/ambari-server-local:2.7.3
docker run -d --privileged --name amb1 -it hortonworks/ambari-base-local:2.7.3
docker run -d --privileged --name amb2 -it hortonworks/ambari-base-local:2.7.3


docker network create -d bridge amb-net
docker run -d --privileged -p 22 --rm --network amb-net --name amb-server -it hortonworks/ambari-server-local:2.7.3
docker run -d --privileged -p 22 --rm --network amb-net --name amb1 -it hortonworks/ambari-base-local:2.7.3
docker run -d --privileged -p 22 --rm --network amb-net --name amb2 -it hortonworks/ambari-base-local:2.7.3
docker network create -d bridge test
docker run -d --privileged -p 22 --rm -ti --name u1 --network test hortonworks/ambari-server-local:2.7.3 
docker run -d --privileged -p 22 --rm -ti --name u2 --network test hortonworks/ambari-server-local:2.7.3

Option

docker exec -it amb1 /bin/sh
docker exec -it amb2 /bin/sh

docker inspect amb-server | grep IPAdd

Copy env

#docker cp ambari-base/bash_aliases amb-server:/root/.bash_aliases
#docker cp ambari-base/bash_aliases amb1:/root/.bash_aliases
#docker cp ambari-base/bash_aliases amb2:/root/.bash_aliases
#docker cp ambari-base/bash_profile amb-server:/root/.bash_profile
#docker cp ambari-base/bash_profile amb1:/root/.bash_profile
#docker cp ambari-base/bash_profile amb2:/root/.bash_profile

docker exec -it 
docker cp ambari-base/ssh amb-server:/root/.ssh
docker cp ambari-base/ssh amb1:/root/.ssh
docker cp ambari-base/ssh amb2:/root/.ssh

docker exec -it amb-server hostname amb-server
docker exec -it amb1 hostname amb1
docker exec -it amb2 hostname amb2

docker cp ambari-base/hosts amb-server:/root/hosts
docker cp ambari-base/hosts amb1:/root/hosts
docker cp ambari-base/hosts amb2:/root/hosts
docker cp ambari-base/change-hosts.sh amb-server:/root/change-hosts.sh
docker cp ambari-base/change-hosts.sh amb1:/root/change-hosts.sh
docker cp ambari-base/change-hosts.sh amb2:/root/change-hosts.sh
docker exec -it amb-server bash /root/change-hosts.sh
docker exec -it amb1 bash /root/change-hosts.sh
docker exec -it amb2 bash /root/change-hosts.sh

docker exec -it amb-server bash /root/start-base.sh
docker exec -it amb1 bash /root/start-base.sh
docker exec -it amb2 bash /root/start-base.sh
docker exec -it amb-server bash /root/start-server.sh

Each

Change /etc/hosts

passwd

Master

ssh-keygen -t rsa
ssh-copy-id localhost
ssh amb-server
scp -pr /root/.ssh [email protected]:/root/
scp -pr /root/.ssh [email protected]:/root/
ssh amb1
ssh amb2

Each

systemctl start ntpd

Master

service httpd restart
chkconfig httpd on
#docker cp ambari-env.sh amb-server:/var/lib/ambari-server/ambari-env.sh
ambari-server setup -j /usr/jdk64/jdk1.8.0_112 -s
#ambari-server setup -j /usr/jdk64/jdk1.8.0_112 --jdbc-db=mysql --jdbc-driver=/root/mysql-connector-java.jar -s
ambari-server start
#docker cp ambari-server/init.sh amb-server:/root/init.sh
#bash /root/init.sh

Agent

yum -y install hdp-select
yum -y install hadoop_3_1_4_0_315
yum -y install hadoop_3_1_4_0_315-yarn

amb-server.service.consul
amb1.service.consul
amb2.service.consul

Check

curl -X GET --header 'Content-Type: application/json'  'http://172.17.0.2:8080/resources/mysql-connector-java.jar'
curl -X GET --header 'Content-Type: application/json'  'http://172.17.0.2/HDP-UTILS/centos7/1.1.0.22/hdp-utils.repo'

HDF

#wget http://public-repo-1.hortonworks.com/HDF/centos7/3.x/updates/3.1.0.0/tars/hdf_ambari_mp/hdf-ambari-mpack-3.1.0.0-564.tar.gz
wget http://public-repo-1.hortonworks.com/HDF/centos7/3.x/updates/3.4.1.1/tars/hdf_ambari_mp/hdf-ambari-mpack-3.4.1.1-4.tar.gz
ambari-server install-mpack --mpack=/root/hdf-ambari-mpack-3.1.0.0-564.tar.gz --verbose
docker exec -it amb-server rm /etc/yum.repos.d/ambari-hdp-1.repo
docker exec -it amb1 rm /etc/yum.repos.d/ambari-hdp-1.repo
docker exec -it amb2 rm /etc/yum.repos.d/ambari-hdp-1.repo
docker exec -it amb-server cp /var/lib/ambari-server/resources/mysql-jdbc-driver.jar /var/lib/ambari-server/resources/mysql-connector-java.jar

docker-ambari-2.7's People

Stargazers

 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.