一个 Google 云项目中的多个 Hadoop 集群
Multiple Hadoop clusters in one Google Cloud project
是否可以在一个 Google 云项目中部署多个 Hadoop 集群?
使用bdutil you can deploy arbitrarily many different Hadoop clusters in a single Google project, as long as you've obtained sufficient Google Compute Engine quota to do so. The instructions here描述了bdutil的用法,但简而言之,bdutil中的集群名称在使用bdutil时只是简单地通过PREFIX
变量或--prefix
标志来区分。由您来跟踪每个 bdutil 集群中的区域和工作人员数量。
为了轻松跟踪多个集群,强烈建议使用 bdutil 的 generate_config
命令。例如,假设您想要 3 个集群:test
、staging
和 prod
。也许它们的大小不同并且位于不同的区域。你会想要 运行 像这样的东西:
./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.sh
、staging-cluster_env.sh
和 prod-cluster_env.sh
可用于从现在开始指代您的三个不同集群。例如,假设您要删除测试集群:
./bdutil -e test-cluster_env.sh delete
或者只部署您的产品集群:
./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 解决与任何自定义的任何合并冲突。
是否可以在一个 Google 云项目中部署多个 Hadoop 集群?
使用bdutil you can deploy arbitrarily many different Hadoop clusters in a single Google project, as long as you've obtained sufficient Google Compute Engine quota to do so. The instructions here描述了bdutil的用法,但简而言之,bdutil中的集群名称在使用bdutil时只是简单地通过PREFIX
变量或--prefix
标志来区分。由您来跟踪每个 bdutil 集群中的区域和工作人员数量。
为了轻松跟踪多个集群,强烈建议使用 bdutil 的 generate_config
命令。例如,假设您想要 3 个集群:test
、staging
和 prod
。也许它们的大小不同并且位于不同的区域。你会想要 运行 像这样的东西:
./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.sh
、staging-cluster_env.sh
和 prod-cluster_env.sh
可用于从现在开始指代您的三个不同集群。例如,假设您要删除测试集群:
./bdutil -e test-cluster_env.sh delete
或者只部署您的产品集群:
./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 解决与任何自定义的任何合并冲突。