[chef] Re: Re: Re: Re: Re: Re: How to handle the elastic_ip associate recipe to finish up smoothly?


Chronological Thread 
  • From: Sachin Sagar Rai < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Re: How to handle the elastic_ip associate recipe to finish up smoothly?
  • Date: Sun, 8 Jul 2012 15:43:39 +0545

@JD,

Well I setup the bootstrap template as yours and now when I am going to launch the instance, what would be the knife command to fire up the ec2 instance as per your modified bootstrap template?

Is it:

knife ec2 server create -E staging -x ubuntu -N logstash-server -V -i ./keys/ec2-server.pem -r 'role[logstash_server]' 

But looking at the bootstrap template, it requires the ENV['ROLES'] and ENV['ENVIRONMENT'] env vars?

How should I pass those env attrs? Is it just setting while running the command as: (removing the -E and -r values)

ROLES=role[logstash_server] ENVIRONMENT=staging knife ec2 server create -x ubuntu -N logstash-server -V -i ./keys/ec2-server.pem


This has become totally confusing for me now!

-------------------------------------------
@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow

On Saturday, July 7, 2012 at 10:36 PM, Sachin Sagar Rai wrote:

@JD, Thanks for the explanation.

I'll give it a try n see it.

-------------------------------------------
@millisami
~ Sachin Sagar Rai
Ruby on Rails Developer
http://tfm.com.np
http://nepalonrails.tumblr.com
Sent with Sparrow

On Saturday, July 7, 2012 at 10:11 PM, JD Harrington wrote:

On Sat, Jul 7, 2012 at 3:16 PM, Sachin Sagar Rai < "> > wrote:
@JD, thanks for the reply n ur bootstrap gist

I looked at it. But my question about the ssh hanging when elastic_ip is
attached is not answered?

Or am I getting it wrong?

Running chef-client with the --daemonize option means it is not
attached to your TTY. ssh hangs because binding an elastic IP actually
changes the public IP of the instance you're binding it to, rather
than adding the elastic IP in addition to the already allocated public
IP. By running chef-client daemonized (or, as suggested earlier, in
screen/tmux), you're detaching chef-client from the TTY of your ssh
connection so that the run won't be interrupted.





Archive powered by MHonArc 2.6.16.

§