[chef] Re: Re: Hosted chef not honoring passed environment?


Chronological Thread 
  • From: AJ Christensen < >
  • To:
  • Subject: [chef] Re: Re: Hosted chef not honoring passed environment?
  • Date: Mon, 14 Jan 2013 20:20:18 +1300

Hey Darron,

It definitely looks like the ec2 server create should be passing through the environment as you've specified it. [0]

Can you gist the contents of the client.rb as rendered post-bootstrap, when you notice the machine assigned to the wrong environment, and the full debug logs, if you haven't already posted those?

Cheers,

AJ



On 14 January 2013 19:33, Darron Froese < " target="_blank"> > wrote:
Tried again a few different times this weekend - same failures -
downloading the wrong version of the sudo cookbook and being assigned
to the wrong environment:

bundle exec knife rackspace server create -E lucid -S sudo2013 -f 2 -N
sudo2013 --image 112 -r 'recipe[sudo]' --distro ubuntu10.04-ruby187

https://gist.github.com/4527988
http://d.pr/i/rjBp

bundle exec knife bootstrap -E lucid -r "recipe[sudo]" 184.106.71.194
-x root -P not-so-fast --node-name bootstrap2013 --distro
ubuntu10.04-ruby187

https://gist.github.com/4528030
http://d.pr/i/DBDx

I also tried AWS:

bundle exec knife ec2 server create -E lucid -r "recipe[sudo]" -I
ami-ab36fbc2 -f m1.small -S dfroese -G varnish -x ubuntu --region
us-east-1 -Z us-east-1a --node-name aws2013 --distro
ubuntu10.04-ruby187

https://gist.github.com/4528155
http://d.pr/i/n6Pg

I expect to be able to create new servers and assign them to a
particular environment - is this correct?

Am I misunderstanding something or is something odd going on?

On Thu, Jan 10, 2013 at 2:25 PM, Darron Froese < "> > wrote:
> Using chef 10.16.4.
>
> I have an environment called 'lucid' for my current infrastructure:
>
> [master] /Dropbox/src/chef-repo: knife environment list
>   _default
>   lucid
>
> We're using hosted Chef and this next bit shows all of my cookbook
> versions for that environment:
>
> https://gist.github.com/4505868
>
> I'm adding a new server using that environment - tried passing
> environment along 2 different ways:
>
> bundle exec knife rackspace server create -E lucid -S server2013 -f 4
> -N server2013 --image 112 -r
> 'role[setup],role[mysql_server],role[web_server],recipe[backup]'
> --distro ubuntu10.04-ruby193
>
> OR
>
> bundle exec knife rackspace server create -S server2013 -f 4 -N
> server2013 --image 112 -r
> 'role[setup],role[mysql_server],role[web_server],recipe[backup]'
> --distro ubuntu10.04-ruby193 --environment lucid
>
> Neither seems to work as I expect.
>
> The server gets created, but at the end of the run, it says:
>
> Name: server2013
> Flavor: 2GB server
> Image: Ubuntu 10.04 LTS
> Metadata: {}
> Environment: lucid
> Run List: role[setup], role[mysql_server], role[web_server], recipe[backup]
>
> But:
>
> 1. It uses the 2.0.4 sudo cookbook that I uploaded yesterday - which
> is not part of the lucid environment.
>
> 2. In the Opscode management interface it shows up as _default:
> http://d.pr/i/UoZz
>
> Any ideas what I'm missing?




Archive powered by MHonArc 2.6.16.

§