Seeking some simple way to update /etc/hosts on all nodes

Asked by Koji

I wanted to use { get_attr: [ name, first_address ] } to retrieve ip addresses of all instances, but I get the following error. Which makes sense.

"ERROR: Remote error: CircularDependencyException Circular Dependency Found"

So my question is, is there some way to list all instances on /etc/hosts of all instances? It would be great if Heat can/(will be able to) do it with a few lines in the template.

I've spent a couple of days to learn HOT syntax by writing a Hadoop template. Here's the link of what I got.

https://github.com/kjtanaka/heat_templates/tree/master/hadoop

Over all in my investigation, Heat did great for simplifying the initial process. I'd like to thank the developers.

Thanks and best regards,
Koji

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Heat Edit question
Assignee:
No assignee Edit question
Solved by:
Koji
Solved:
Last query:
Last reply:
Revision history for this message
Clint Byrum (clint-fewbar) said :
#1

Excerpts from Koji's message of 2013-12-18 21:41:27 UTC:
> New question #241010 on heat:
> https://answers.launchpad.net/heat/+question/241010
>
> I wanted to use { get_attr: [ name, first_address ] } to retrieve ip addresses of all instances, but I get the following error. Which makes sense.
>
> "ERROR: Remote error: CircularDependencyException Circular Dependency Found"
>
> So my question is, is there some way to list all instances on /etc/hosts of all instances? It would be great if Heat can/(will be able to) do it with a few lines in the template.
>
> I've spent a couple of days to learn HOT syntax by writing a Hadoop template. Here's the link of what I got.
>
> https://github.com/kjtanaka/heat_templates/tree/master/hadoop
>
> Over all in my investigation, Heat did great for simplifying the initial process. I'd like to thank the developers.
>
> Thanks and best regards,
> Koji
>

We abuse the AWS::AutoScaling::LaunchConfiguration to achieve this
with TripleO. You can refer to all of the other parts of the stack in
the Metadata section, and it will be the last thing created. Then you
have to use cfn-hup or os-collect-config to query the Metadata of that
resource post-boot.

Revision history for this message
Koji (kj-tanaka) said :
#2

Thanks Clint. I will check cfn-hup and os-collect-config.

Koji

Revision history for this message
Koji (kj-tanaka) said :
#3

Serf looks good
http://www.serfdom.io/

I'll close this question.