手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

如何使用vagrant在虚拟机安装Hadoop集群

[日期:2013-04-14] 来源:Linux社区  作者:wf1982 [字体:大 中 小]

配置文件定义了6台vm,并指定了各vm的角色(遵循CDH角色):

vm-cluster-node1: This is the master; besides running the CM master, it should run the namenode, secondary namenode, and jobtracker.

vm-cluster-node2: This is a slave, it should run a datanode and a tasktracker.

vm-cluster-node3: This is a slave, it should run a datanode and a tasktracker.

vm-cluster-node4: This is a slave, it should run a datanode and a tasktracker.

vm-cluster-node5: This is a slave, it should run a datanode and a tasktracker.

vm-cluster-client: This machine plays the role of gateway for the cluster.

配置文件各配置项意义请点击这里。特别指出的是依赖于不同的提供商,virtualbox或者vmwarefusion,定义的内存大小是不同的。大家看下,使用不同提供商定制需要的环境是多么的简单!

上面的vagrant配置文件做了另外一件重要的事情:在master和node1节点自动安装cloudera Manager 。

要创建这个虚拟机集群,只需要到配置文件目录下(比如VagrantHadoop),在shell下运行:

> vagrant up --provider=virtualbox

过一段时间(这个时间随你的机器性能而定),Vagrant运行完毕,意味着所有虚拟机安装配置完毕并且处于运行状态。

到此,你可以通过CM管理UI(http://vm-cluster-node1:7180)配置你的集群。

Have fun!

更多Hadoop相关信息见Hadoop 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=13

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款