AWS EMR执行"bootstrap"操作群集中所有已运行的计算机上的脚本 [英] AWS EMR perform "bootstrap" script on all the already running machines in cluster

查看:185
本文介绍了AWS EMR执行"bootstrap"操作群集中所有已运行的计算机上的脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行24/7的EMR集群.我无法关闭它并启动新的.

I have one EMR cluster which is running 24/7. I can't turn it off and launch the new one.

我想做的是对已经运行的集群执行类似引导操作的操作,最好使用Python和boto或AWS CLI.

What I would like to do is to perform something like bootstrap action on the already running cluster, preferably using Python and boto or AWS CLI.

我可以想象分两个步骤进行操作:

I can imagine doing this in 2 steps:

1)在所有正在运行的实例上运行脚本(如果可以的话,例如从boto,那将是很好的选择)

1) run the script on all the running instances (It would be nice if that would be somehow possible for example from boto)

2)将脚本添加到引导操作中,以防我想调整集群大小.

2) adding the script to bootstrap actions for case that I'd like to resize the cluster.

所以我的问题是:是否可以使用boto或至少使用AWS CLI进行类似的操作?我正在阅读github上的文档和源代码,但是当集群已经在运行时,我无法弄清楚如何添加新的"bootstrap"操作.

So my question is: Is something like this possible using boto or at least AWS CLI? I am going through the documentation and source code on github, but I am not able to figure out how to add new "bootstrap" actions when the cluster is already running.

推荐答案

最新答案,但我给它一个机会:

Late answer, but I'll give it a shot:

那将是艰难的.

您可以安装Amazon SSM代理并使用远程命令界面在所有实例上启动命令.但是,您必须将适当的SSM角色分配给实例,这将需要重建群集AFAIK.但是,以后所有命令都不需要重建.

You could install Amazon SSM Agent and use the remote command interface to launch a command on all instances. However, you will have to assign the appropriate SSM roles to the instances, which will require rebuilding the cluster AFAIK. However, any future commands will not require rebuilding.

然后,您将能够使用CLI在所有节点上运行命令(可能也是boto,尚未检查).

You would then be able to use the CLI to run commands on all nodes (probably boto as well, haven't checked that).

这篇关于AWS EMR执行"bootstrap"操作群集中所有已运行的计算机上的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆