一个Google Cloud项目中有多个Hadoop集群

时间:2015-06-05 10:04:09

标签: google-cloud-platform google-hadoop

是否可以在一个Google Cloud项目中部署多个Hadoop集群?

1 个答案:

答案 0 :(得分:1)

使用bdutil,您可以在单个Google项目中部署任意多个不同的Hadoop群集,只要您已获得足够的Google Compute Engine quota即可。 instructions here描述了bdutil的用法,但简而言之,使用bdutil时,bdutil中的簇名称只能通过PREFIX变量或--prefix标志进行区分。由您来跟踪每个bdutil集群中的区域和工作人员数量。

为了便于跟踪多个群集,强烈建议使用bdutil的generate_config命令。例如,假设您需要3个群集:teststagingprod。也许它们的尺寸不同,区域不同。你想要运行类似的东西:

./bdutil --prefix my-test-cluster -n 2 -z us-central1-f -b test-bucket  \
    generate_config test-cluster_env.sh

./bdutil --prefix my-staging-cluster -n 5 -z us-central1-b -b staging-bucket  \
    generate_config staging-cluster_env.sh

./bdutil --prefix my-prod-cluster -n 10 -z us-central1-f -b prod-bucket  \
    generate_config prod-cluster_env.sh

完成此操作后,文件test-cluster_env.shstaging-cluster_env.shprod-cluster_env.sh可用于从现在开始引用您的三个不同群集。例如,假设您要删除测试集群:

./bdutil -e test-cluster_env.sh delete

或者只是部署你的prod集群:

./bdutil -e prod-cluster_env.sh deploy

或者SSH进入暂存群集的主服务器:

./bdutil -e staging-cluster_env.sh shell

当您这样做时,您可以将* _cluster_env.sh文件存储在源代码管理中,只要您使用新的Google版本升级bdutil,它们就会向后兼容。

如果您需要更广泛地定制bdutil,您可能需要考虑直接从GitHub获取bdutil:

git clone https://github.com/GoogleCloudPlatform/bdutil.git

这样你就可以使用git定期更新到bdutil的新版本,同时让git解决与任何自定义的任何合并冲突。

相关问题