在分布式远程机器上部署和执行程序
我正在开发一个将在 Amazon EC2 机器上运行的分布式程序。
理想情况下,我会在本地计算机上进行开发,触发脚本以在远程计算机上部署源代码(我可以访问 ssh 的所有 Linux 计算机),在每台远程计算机上触发编译命令,然后然后在每个实例上运行程序,同时控制正在运行的程序(能够挂起它们)。
我想知道是否已经存在任何用于此类任务的工具(除了使用 MPI,但这是另一个问题),如果没有,我应该遵循哪些最佳实践。
I am developing a distributed program that will run on Amazon EC2 machines.
Ideally I would develop on my local machine, trigger a script to deploy the source on the remote machines (All Linux machines on which I have ssh access), trigger a compile command on each of the remote machines and then run the program on each instance while having control over the running programs (being able to suspend them).
I am wondering if there exist already any tools for such a task (except using MPI, but this is for another question), and if not, what best practices should I follow.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据您的部署规模,有许多替代方案。我个人没有尝试过的一个有趣的方法是 glu。还有众所周知的 puppet、chef 系列配置管理工具,它们具有一些流程控制组件。
There are many alternatives depending on your scale of deployment. An interesting one that I have not tried personally is glu. There are also the well known puppet, chef family of config management tools that have some process control components.
你不会写Perl吗?
Net::OpenSSH::Parallel 允许编写运行的脚本通过 SSH 在多个服务器中并行执行命令非常容易:
Can't you write Perl?
Net::OpenSSH::Parallel allows to write scripts that run commands in several servers in parallel via SSH quite easily: