基于Docker的Ambari 1.7集群安装向导“repo URL dead(404)while'运行安装代理脚本'

我试图从Ambari源设置一个简单的双节点集群(包括一个Ambari服务器节点),并且在DataNode上安装Ambari代理期间,它似乎伸出一个URL, http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/repodata/repomd.xm ,这似乎已经死了。 我很漂亮的绿色,并找不到a)find正确的URL和b)在脚本中更改它。

build立

根据Docker Ambari开发的官方文档 ,我下载并构build了Ambari(1.7版本最新版本)的Docker镜像(我在OS X上):

 git clone https://github.com/apache/ambari.git cd ambari docker build -t ambari/build ./dev-support/docker/docker 

build设花了相当长的时间(小时),但我很高兴看到它的工作。 docker岩石!

然后,我使用-it Docker标志在交互模式下基于上面构build的映像启动了一个Docker容器,作为ambari-master 。 这个容器是作为Ambari服务器的。 一旦进入,我得到它的ssh private key写在某处我可以复制它在Ambari群集安装wizzard期间问。 服务器的Docker命令如下所示(对文档稍作修改,为便于阅读,使用虚线):

 # 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 

现在,由于我在OS X上,我可以在一个新的terminal上运行boot2docker ip ,这给了我一个IP地址192.168.59.103所以加载Ambari服务器的Web UI,我只需要去http://192.168.59.103:8080 ,我得到了Ambari的Web UI。 目前很好。

现在,我想创build一个新的Docker容器作为这个小型testing集群的一部分。 我从下面的一个新terminal这样做:

 # 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安装向导

从这里开始,我可以纯粹的使用Ambari的Web UI( http://192.168.59.103:8080 (如果你使用的是非OS X的IP地址可能不同)。

我转到群集安装向导,并为前三个屏幕select以下内容:

  1. 群集名称: clusterbomb …. 下一个>
  2. 堆栈: HDP2.2 …. 下一个>
  3. 目标主机(FQDN): slave1.coderigo.com SSH私钥:在 ambari ambari-master容器内创build的已上载的coderigo-ambari-server-id_rsa(请参阅更多信息)。 …. 注册并确认>
  4. 现在在这个阶段,我会看到一个屏幕显示我在slave1.coderigo.com的安装过程中的进度,几秒钟后它告诉我失败了。 点击日志为什么失败显示我这个注册日志slave1.coderigo.com

    ==========================创build目标目录… ================== ========

    命令开始时间2014-12-18 08:11:48

    连接到slave1.coderigo.comclosures。 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

    ==========================复制操作系统types检查脚本… ================ ==========

    命令开始时间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

    ==========================正在运行的操作系统types检查… ================= =========

    命令启动时间2014-12-18 08:11:49集群主/集群操作系统系列是redhat6,本地/当前操作系统是redhat6

    连接到slave1.coderigo.comclosures。 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.comclosures。 SSH命令执行完成host = slave1.coderigo.com,exitcode = 0命令结束时间2014-12-18 08:11:49

    ==========================将repo文件复制到“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

    ==========================移动文件到回购目录================ ==========

    命令开始时间2014-12-18 08:11:50

    连接到slave1.coderigo.comclosures。 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 http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/repodata/repomd.xml:[Errno 14] PYCURL ERROR 22 – “请求的URL返回错误:404未find”尝试其他镜像。 错误:无法检索存储库的存储库元数据(repomd.xml):Updates-ambari-1.x。 请validation其path,然后重试http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/repodata/repomd.xml :[错误14] PYCURL错误22 – “请求的URL返回错误:404未find“尝试其他镜像。 错误:无法检索存储库的存储库元数据(repomd.xml):Updates-ambari-1.x。 请validation它的path,然后再次尝试/ bin / sh:/ usr / sbin / ambari-agent:没有这样的文件或目录{'exitstatus':1,'log':('',None)}

    连接到slave1.coderigo.comclosures。 SSH命令执行完成host = slave1.coderigo.com,exitcode = 1命令结束时间2014-12-18 08:11:52

    错误:主机slave1.coderigo.com的引导失败,因为之前的操作使用非零退出代码完成(1)错误消息:tcgetattr:设备的不适当的ioctl连接到slave1.coderigo.comclosures。

    STDOUT: http ://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/repodata/repomd.xml:[Errno 14] PYCURL ERROR 22 – “请求的URL返回错误:404 Not Found “尝试其他的镜子。 错误:无法检索存储库的存储库元数据(repomd.xml):Updates-ambari-1.x。 请validation其path,然后重试http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/repodata/repomd.xml :[错误14] PYCURL错误22 – “请求的URL返回错误:404未find“尝试其他镜像。 错误:无法检索存储库的存储库元数据(repomd.xml):Updates-ambari-1.x。 请validation它的path,然后再次尝试/ bin / sh:/ usr / sbin / ambari-agent:没有这样的文件或目录{'exitstatus':1,'log':('',None)}

    连接到slave1.coderigo.comclosures。

问题

所以,根据日志,我可以看到大部分工作,但对于一个死链接: http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/repodata/repomd.xml : http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/repodata/repomd.xml回到404.我可以通过手动确认URL来确认,并返回一个带有一些XML的404,告诉你它不存在。 从周围刮我已经尝试了不同的回购。 具体来说,这些:

http://s3.amazonaws.com/public-repo-1.hortonworks.com/AMBARI-1.x/repos/centos6/ambari.repo http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.2.3.7/ambari.repo

但是由于它们与ambari服务器版本(AFAICT)不匹配,这些在安装过程的早期会导致失败。

我从来没有预料到死url会导致一个问题(redirect死URL的会很好)。 我会喜欢一些build议或指导如何克服这一障碍。 我要尝试一个手动设置,但ssh设置将是最佳的。 我希望上述是可重复的,具体来说,没有人知道:

a)正确的URL是什么; 和

b)在哪里改变它使之工作?