[chef] Re: Confused about environments.


Chronological Thread 
  • From: JOHN HASTY < >
  • To:
  • Subject: [chef] Re: Confused about environments.
  • Date: Fri, 14 Feb 2014 15:49:11 -0600

I mistake I make occasionally is to not reset the environment in the node:

{
  "name": "cheftest1",
  "chef_environment": "cheftest",
  "normal": {
    "deployment": "cheftest",
    "tags": [

    ]
  },
  "run_list": [
    "role[dmgr]",
    "recipe[was::dmgr]"
  ]
}

It seems to get reset to _default when I bootstrap the node unless I have knife{'environment']="cheftest"' in my knife.rb file.


JOHN HASTY
Software as a Service - DevOps
Software Group


Phone: 1-512-804-9968
E-mail:
  " target="_blank">
IBM

2407 S Congress Ave Ste E-350
Austin, TX 78704
United States


Inactive hide details for Douglas Garstang ---02/14/2014 03:41:19 PM---I'm missing an important detail with chef environments. Douglas Garstang ---02/14/2014 03:41:19 PM---I'm missing an important detail with chef environments. I created an environment called 'eu2-prod' w

From: Douglas Garstang < >
To: ,
Date: 02/14/2014 03:41 PM
Subject: [chef] Confused about environments.




I'm missing an important detail with chef environments. I created an environment called 'eu2-prod' with the knife command, and can view and edit it.

In my cookbook I have created the environments directory into which I have deposited an environment file called 'eu2-prod.json'. It looks like this:

{
  "name": "eu2-prod",
  "description": "",
  "cookbook_versions": {
  },
  "json_class": "Chef::Environment",
  "chef_type": "environment",
  "default_attributes": {
  },
  "override_attributes": {
  }
}

All this has been uploaded to the chef server. However, when the client runs, it can't find the data from the eu2-prod environment. 

Looking at the chef GUI, I'm still confused. The cookbook itself doesn't show the environments/ directory, but rather has a drop-down at the top which lets me select which environment I am looking at. No matter which environment I pick, 'None', '_default' or 'eu2-prod' I can't see any of the data from the environments/eu2-prod.json file.

If I go over to the Environments global section in the UI, also there's no data there. I wouldn't expect to see any data there anyway, as I imagine that's environment data that's, err... global in scope. 

Thanks,
Doug




Archive powered by MHonArc 2.6.16.

§