Hadoop 基于Docker的Ambari 1.7群集安装向导repo URL死(404)而';运行安装代理脚本';
我正试图从Ambari源代码中设置一个简单的2节点集群(包括1个带有Ambari服务器的节点),在DataNode上安装Ambari代理时,它似乎接触到一个URL,Hadoop 基于Docker的Ambari 1.7群集安装向导repo URL死(404)而';运行安装代理脚本';,hadoop,docker,Hadoop,Docker,我正试图从Ambari源代码中设置一个简单的2节点集群(包括1个带有Ambari服务器的节点),在DataNode上安装Ambari代理时,它似乎接触到一个URL,http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/repodata/repomd.xm,它似乎已经死了。我对此相当生疏,无法找到a)找到正确的URL,b)在脚本中更改它 设置 根据,我下载并构建了Ambari(1.7最新版本)Docker映像(我在OS X上
http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/repodata/repomd.xm
,它似乎已经死了。我对此相当生疏,无法找到a)找到正确的URL,b)在脚本中更改它
设置
根据,我下载并构建了Ambari(1.7最新版本)Docker映像(我在OS X上),其中包括:
构建花费了相当长的时间(几个小时),但我很高兴看到它成功了。码头工人岩石
然后,我使用-it
Docker标志,在交互模式下根据上面构建的图像启动了一个Docker容器,该图像名为ambari master
。此容器将用作Ambari服务器。一旦进入,我就得到了它的ssh私钥
,写在某个地方,在Ambari集群安装wizzard期间,当被要求时,我可以复制它。服务器的Docker命令如下所示(对文档进行轻微修改,并带有虚线以确保可读性):
现在,由于我使用的是OS X,我可以在新的终端上运行boot2docker ip
,它给我的ip地址是192.168.59.103
,所以要加载Ambari服务器web UI,我只需转到http://192.168.59.103:8080
我得到了Ambari web用户界面。到目前为止还不错
现在,我想创建一个新的Docker容器,作为这个小测试集群的一部分使用。我从新的终端通过以下方式完成此操作:
# Start the slave docker container in interactive mode (again, in multiple lines for readability):
docker run \
--privileged
-h slave1.coderigo.com \
--name ambari-slave1 \
--link ambari-master:master.coderigo.com \ # automatically link to the ambari-master node.
-it \
ambari/build bash
# From here on in, we are INSIDE the created container (ambari-slave1)
# Start ssh server (so that master can ssh into it)
[root@ambari-slave1 tmp]: /etc/init.d/sshd start
Ambari安装向导
从现在开始,我可以在http://192.168.59.103:8080
(如果您使用的是非OS X,则IP地址可能会有所不同)
我转到群集安装向导,并为前三个屏幕选择以下内容:
clusterbomb
…下一步>
HDP2.2
…下一步>
ambari master
容器中创建的coderigo-ambari-server-id_rsa(请参阅文章的后续部分)。。。。注册并确认>
slave1.coderigo.com
的进度,几秒钟后它告诉我安装失败了。单击日志了解失败原因,显示slave1.coderigo.com的注册日志:
==========================
正在创建目标目录。。。
==========================
命令开始时间2014-12-18 08:11:48
与slave1.coderigo.com的连接已关闭。
SSH命令执行完成
host=slave1.coderigo.com,exitcode=0
命令结束时间2014-12-18 08:11:48
==========================
正在复制常用函数脚本。。。
==========================
命令开始时间2014-12-18 08:11:48
scp/usr/lib/python2.6/site-packages/ambari_commons
host=slave1.coderigo.com,exitcode=0
命令结束时间2014-12-18 08:11:48
==========================
正在复制操作系统类型检查脚本。。。
==========================
命令开始时间2014-12-18 08:11:48
scp/usr/lib/python2.6/site-packages/ambari_server/os_check_type.py
host=slave1.coderigo.com,exitcode=0
命令结束时间2014-12-18 08:11:49
==========================
正在运行操作系统类型检查。。。
==========================
命令开始时间2014-12-18 08:11:49
集群主/集群操作系统系列为redhat6,本地/当前操作系统系列为redhat6
与slave1.coderigo.com的连接已关闭。
SSH命令执行完成
host=slave1.coderigo.com,exitcode=0
命令结束时间2014-12-18 08:11:49
==========================
正在检查远程主机上的“sudo”包。。。
==========================
命令开始时间2014-12-18 08:11:49
sudo-1.8.6p3-15.el6.x86_64
与slave1.coderigo.com的连接已关闭。
SSH命令执行完成
host=slave1.coderigo.com,exitcode=0
命令结束时间2014-12-18 08:11:49
==========================
正在将回购文件复制到“tmp”文件夹。。。
==========================
命令开始时间2014-12-18 08:11:49
scp/etc/yum.repos.d/ambari.repo
host=slave1.coderigo.com,exitcode=0
命令结束时间2014-12-18 08:11:50
==========================
正在将文件移动到repo目录。。。
==========================
命令开始时间2014-12-18 08:11:50
与slave1.coderigo.com的连接已关闭。
SSH命令执行完成
host=slave1.coderigo.com,exitcode=0
命令结束时间2014-12-18 08:11:50
==========================
正在复制安装程序脚本文件。。。
==========================
命令开始时间2014-12-18 08:11:50
scp/usr/lib/python2.6/site-packages/ambari_server/setupAgent.py
host=slave1.coderigo.com,exitcode=0
命令结束时间2014-12-18 08:11:50
==========================
正在运行安装代理脚本。。。
==========================
命令开始时间2014-12-18 08:11:50
:[Errno 14]PYCURL错误22-“请求的URL返回错误:404未找到”
尝试另一面镜子。
错误:无法检索存储库:Updates-ambari-1.x的存储库元数据(repomd.xml)。请验证其路径并重试
:[Errno 14]PYCURL错误22-“请求的URL返回错误:404未找到”
尝试另一面镜子。
错误:无法检索存储库:Updates-ambari-1.x的存储库元数据(repomd.xml)。请验证其路径并重试
/bin/sh:/usr/sbin/ambari代理:没有这样的文件或目录
{'exitstatus':1,'log':('',无)}
与slave1.coderigo.com的连接已关闭。
SSH命令执行完成
host=slave1.coderigo.com,exitcode=1
命令结束时间2014-12-18 08:11:52
错误:主机slave1.coderigo.com的引导失败,因为上一个操作使用非零退出代码(1)完成
错误消息:tcgetattr:不适当
# From the cloned {ambari_root} directory:
docker run \
--privileged \
-h master.coderigo.com \
--name ambari-master \
-p 80:80 -p 5005:5005 -p 8080:8080 \
-v $(pwd):/tmp/ambari \
-it \
ambari/build bash
# From here on in, we are INSIDE the created container (ambari-master).
# Copy the ssh private key to give the install wizard.
[root@ambari-master tmp]: cat ~/.ssh/id_rsa > /tmp/ambari/coderigo-ambari-server-id_rsa
# Open up the /etc/hosts file to add an entry for the slave node (created in the next step
# but I'm pre-empting its IP address here, with the ambari-master having 172.17.0.25.
[root@ambari-master tmp]: echo "172.17.0.26 slave1.coderigo.com slave1" >> /etc/hosts
# Now fetch the ambari repo that is to be copied to all slaves by the Ambari install wizard
# and place it where Ambari install wizard expects it (/etc/yum.repos.d/)
[root@ambari-master tmp]: wget -nv http://public-repo-1.hortonworks.com/ambari/centos6/1.x/GA/ambari.repo -O /etc/yum.repos.d/ambari.repo
# Finally, fire up the ambari server on this container
[root@ambari-master tmp]: /tmp/ambari-build-docker/bin/ambaribuild.py server
# Start the slave docker container in interactive mode (again, in multiple lines for readability):
docker run \
--privileged
-h slave1.coderigo.com \
--name ambari-slave1 \
--link ambari-master:master.coderigo.com \ # automatically link to the ambari-master node.
-it \
ambari/build bash
# From here on in, we are INSIDE the created container (ambari-slave1)
# Start ssh server (so that master can ssh into it)
[root@ambari-slave1 tmp]: /etc/init.d/sshd start