Amazon AWS EC2 + Puppet, get Puppet to know AWS instance tags

Posted by Piotr Jasiulewicz on Server Fault See other posts from Server Fault or by Piotr Jasiulewicz
Published on 2013-06-26T10:13:29Z Indexed on 2013/06/26 10:22 UTC
Read the original article Hit count: 554

Filed under:
|

I am having a problem with my AWS deployment, fairly new to AWS and Puppet.

So coming to my question - can you distinguish puppet nodes with AWS machine tags or CNAME domains?

A little background about the plan:

  • have multiple clusters of machines, one php cluster, one legacy php cluster, one java cluster, one perl cluster
    • control configuration with puppet - still pretty new to puppet but as a developer I like the idea of being able to version control configuration of servers
    • have autoscaling enabled on those clusters - obviously the main benefit of the cloud that makes the much hight cost when it comes to any reasonable performance worth it (those amazon machines are slower than my phone...)
    • deployment controlled by Capistrano, this makes things a lot easier

So in AWS you get those super nasty public/private machine dns's... no way you can identify machines on those. In order to easer the problem, seams like AWS want's you to tag everything - so I did. Found a script that makes a CNAME record for each machine with the tag "ShortName" thanks to the Route53 API.

Every machine has a ShortName tag that becomes its CNAME, unfortunately puppet still resolves the private dns name.

I'd like to have

node 'perl-cluster'{}

in puppet, anyone any clue ho to achieve this?

Thanks

© Server Fault or respective owner

Related posts about amazon-web-services

Related posts about puppet