简体   繁体   English

对EC2实例进行分类

[英]Categorising EC2 instances

Is there a way to distinguish between sets of EC2 instances? 有没有办法区分EC2实例集?

My use case is that I have a bunch of web tier machines and a bunch of search tier machines; 我的用例是,我有一堆Web层机器和一堆搜索层机器。 currently the only way to track what each instance is doing is in a roll-your-own asset directory, like LDAP or a database. 当前,跟踪每个实例正在执行的操作的唯一方法是在自己拥有的资产目录中,例如LDAP或数据库。

Ideally, I'd like to be able to determine the role of a machine from the metadata available from the AWS APIs. 理想情况下,我希望能够从AWS API的可用元数据确定计算机的角色

Currently, the only approach I've come up with is to have different machine roles in different security groups (even if it's not strictly required). 当前,我想出的唯一方法是在不同的安全组中具有不同的计算机角色(即使不是严格要求的)。 Is there a better way? 有没有更好的办法?

Update: EC2 now supports "tags" for categorising instances. 更新: EC2现在支持用于对实例进行分类的“标签”。

http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/index.html?Using_Tags.html http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/index.html?Using_Tags.html


I've always used security groups for categorising. 我一直使用安全组进行分类。 I don't see anything wrong with using them! 使用它们我没有发现任何问题!

Groups not only allow categorising, they also allow different firewall rules. 组不仅允许分类,而且还允许使用不同的防火墙规则。 You can also have more than one group per instance, eg "production", "database" 每个实例还可以具有多个组,例如“生产”,“数据库”

Reference: http://docs.amazonwebservices.com/AWSEC2/2008-12-01/DeveloperGuide/index.html?ApiReference-SOAP-RunInstances.html 参考: http : //docs.amazonwebservices.com/AWSEC2/2008-12-01/DeveloperGuide/index.html?ApiReference-SOAP-RunInstances.html

You might want to check out some third party tools like rightscale which adds some capability for managing cloud resources with additional metadata like meaningful labels on volumes and instances. 您可能想检查一些第三方工具,例如rightscale,它添加了一些管理云资源的功能,以及附加的元数据,例如卷和实例上的有意义的标签。 I am only using the free version right now which is somewhat limited, but it still adds quite a bit over the Amazon provided management tools. 我现在仅使用免费版本,该版本在一定程度上受到限制,但是与Amazon提供的管理工具相比,它仍然增加了很多。

Amazon just announced their own console ( https://console.aws.amazon.com/ ), which initially got me excited about the prospect of a free version of RightScale. 亚马逊刚刚宣布了自己的控制台( https://console.aws.amazon.com/ ),最初使我对RightScale免费版本的前景感到兴奋。 However, it looks like it is just a Web UI that is functionally equivalent to ElasticFox. 但是,看起来它只是一个在功能上等效于ElasticFox的Web UI。 Oh well. 那好吧。

I am still keeping a spreadsheet locally to keep track of this mess. 我仍然在本地保留电子表格以跟踪此混乱情况。 Also, this is extremely low tech, but I am dropping a text file on the desktop of each machine (under the admin account) with the purpose of the machine in the filename so I can tell them apart (the generated machine names are absolutely no help without a cheat sheet.) 另外,这是一项技术含量极低的技术,但是我将文本文件拖放到每台计算机的桌面上(在admin帐户下),目的是将计算机作为文件名,以便我可以区分它们(生成的计算机名称绝对不是没有备忘单的帮助。)

I'd second John's vote to use a free RightScale account if you just want to keep tabs on your EC2 instances online. 如果您只想使EC2实例的选项卡保持在线状态,我将投票赞成John使用免费的RightScale帐户。 The paid version gives you a lot more functionality, but it can get quite expensive. 付费版本为您提供了更多功能,但价格可能非常昂贵。

The new AWS Management Console is a nice UI and makes it easier than in ElasticFox to do common operations like launching instances, creating and attaching EBS volumes and so on, but I'm really surprised they didn't add the capability to label your instances and volumes. 新的AWS管理控制台是一个不错的UI,并且比ElasticFox更易于执行启动实例,创建和附加EBS卷等常见操作,但是令我惊讶的是,他们没有添加标记您的实例的功能和卷。 Those Amazon ID strings are not exactly easy to remember, are they ;-) 那些Amazon ID字符串不是很容易记住,是;-)

The AWS console does show the security group for each instance, so Gerald's suggestion of using the security group to identify different groups of instances would work there, but it's still not as good as having an editable label for each device. AWS控制台确实显示了每个实例的安全组,因此Gerald建议使用安全组来标识不同的实例组在这里可行,但是仍然不如为每个设备设置可编辑标签。

While it's not in the AWS meta data, you could always use something like iClassify . 尽管它不在AWS元数据中,但您始终可以使用诸如iClassify之类的东西 It's designed to be the meta data repository for servers, EC2 or not. 它被设计为服务器EC2的元数据存储库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM