管理 EC2 上的服务器实例身份
我最近在 EC2 上建立了一个集群,我觉得我必须发明很多东西。我想知道有哪些工具、模式、想法可以解决这个问题。
一些背景信息:
我有 3 种不同类型的服务器,因此我首先为它们创建了 AMI。第一个 AMI 有 Zookeeper,因此部署系统的第一步是让 Zookeeper 服务器运行。
然后,我的脚本记录了 EC2 完全任意且不可预测的主机名与 Zookeeper 服务器之间的映射。
然后,当我启动其他 2 种服务器的新实例时,我要做的第一件事就是通过 ssh 连接到新服务器,并将 Zookeeper 服务器添加到其 /etc/hosts 文件中。然后当每个实例上的服务器软件启动时,它就可以找到zookeeper。
显然,这是很多人必须解决的问题,并且在不同的云中它的工作方式可能略有不同。
有解决这个概念的产品吗?让我感到非常惊讶的是 EC2 没有提供某种方式将您自己的名字与其名称联系起来。
感谢您的任何想法。
I recently brought up a cluster on EC2, and I felt like I had to invent a lot of things. I'm wondering what kinds of tools, patterns, ideas are out there for how to deal with this.
Some context:
I had 3 different kinds of servers, so first I created AMIs for each of them. The first AMI had zookeeper, so step one in deploying the system was to get the zookeeper server running.
My script then made a note of the mapping between EC2's completely arbitrary and unpredictable hostnames, and the zookeeper server.
Then as I brought up new instances of the other 2 kinds of servers, the first thing I would do is ssh to the new server, and add the zookeeper server to its /etc/hosts file. Then as the server software on each instance starts up, it can find zookeeper.
Obviously this is a problem that lots of people have to solve, and it probably works a little bit differently in different clouds.
Are there products that address this concept? I was pretty surprised that EC2 didn't provide some kind of way to tie your own name to its name.
Thanks for any ideas.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如何在 Amazon EC2 上进行一些服务发现 似乎有一些不错的选择。
How to do some service discovery on Amazon EC2 seems to have some good options.
我想你可能想看看 http://puppetlabs.com/mcollective/introduction/ 和一般来说,来自 http://puppetlabs.com 的工具套件。
从网站:
我相当肯定 mcollective 的构建正是为了解决您想要解决的问题。但是,请预先警告,这不是基于 DNS 的解决方案,而是一种寻址任意大且任意标记的主机组的方法。
I think you might want to look at http://puppetlabs.com/mcollective/introduction/ and the suite of tools from http://puppetlabs.com in general.
From the site:
I am fairly certain mcollective was built to solve exactly the problem you are trying to address. But, be forewarned, it's not a DNS-based solution, it's a method of addressing arbitrarily large and arbitrarily tagged groups of hosts.