In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to deploy ambari in docker. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
1.docker deployment ambari
① centos7 does not have its own yum tool
Apt-get install yum-y
② install git
Yum-y install git
③ pull remote warehouse
Git clone https://gitee.com/which-ly/docker-ambari-2.7.3.git
④ installation begins
Cd docker-ambari-2.7.3
Cd ambari-base-local
Wget-O local.repo http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.3.0/ambari.repo
Cd..
Cd ambari-server-local
Wget-O local.repo http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.7.3.0/ambari.repo
Cd..
# make an image
. / scripts/build-image.sh
# start locally
. / scripts/create-local.sh
⑤ view container
# View the running container
Docker ps
# get web ip
Docker inspect-f'{{range .NetworkSettings.Networks}} {{.IPAddress}} {{end}} 'amb-server
# visit the ambari interface
Http://ambari-server (IP): 8080
# check the ip of other nodes
Docker inspect container id | grep-I ip
two。 Configure ssh secret-free login
The ip of my three containers here are
172.17.0.2 (amb-server)
172.17.0.3 (amb1)
172.17.0.4 (amb2)
① modifies hostname
# go to each container to modify the hostname
Sudo hostnamectl set-hostname node1
172.17.0.2 (amb-server)-> node3
172.17.0.3 (amb1)-> node1
172.17.0.4 (amb2)-> node2
② modifies the hosts file and can directly ping the name.
# enter each container separately
Docker exec-it amb-server / bin/bash
Vi / etc/hosts
172.17.0.2 node3
172.17.0.3 node1
172.17.0.4 node2
# comment out at the same time:
# 172.17.0.3 amb1.service.consul amb1
# 172.17.0.4 amb2.service.consul amb2
③ generation key
First execute the instructions on each of the three nodes: ssh-keygen, and then press enter until the end. At this point, you can find that idrsa (private key) and idrsa.pub (public key) are generated under the / root/.ssh/ folder, which are the generated key pairs.
④ public key sharing
To synchronize the public key to all nodes, you need to enter the root password. All three nodes set the root password to ambari123.
Sudo passwd
Send your own public key to other nodes, including yourself. The instructions are as follows:
Ssh-copy-id node1
Ssh-copy-id node2
Ssh-copy-id node3
⑤ configure ambari basic repo (already configured, go directly to 3)
Find the yum repo address of hdp3.1.4 from the following address
Http://public-repo-1.hortonworks.com/HDP/hdp_urlinfo.json
Yum repo address of hdp-3.1.4:
Http://public-repo-1.hortonworks.com/HDP/centos7/3.x/updates/3.1.4.0/HDP-3.1.4.0-315.xml
Open the repo to see hdp, hdp-gpl, and hdp-utils
3. Secondary repo configuration
# enter each container and do the following
Cd / etc/yum.repos.d/
Cp backup_repo/CentOS-Base.repo.
4. Create a cluster
Click: LAUNCH INSTALL WIZARD
Name: idc
Select HDP3.1
The next step is to enter the private key of the machine where the ambari-server resides, so that ambari-server can deploy the component to other nodes
Docker exec-it amb-server / bin/bash
Cd / root/.ssh
Id_rsa
Only node1 and node2 can be added.
Next, install the service according to the project requirements.
On how to deploy ambari in docker to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.