AWS EMR perform “bootstrap” script on all the already running machines in cluster

你离开我真会死。 提交于 2019-12-04 17:15:33

问题


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

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) run the script on all the running instances (It would be nice if that would be somehow possible for example from boto)

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

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.


回答1:


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

That is going to be tough.

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.

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



来源:https://stackoverflow.com/questions/26575729/aws-emr-perform-bootstrap-script-on-all-the-already-running-machines-in-cluste

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!