Matthew,Since we have one chef-repo per cookbook, it seemed to make perfect sense to put the environment into the cookbook. I've since realised that's not going to work as updating the environment from one cookbook blows updates from the previous one away.I'm trying to find a way to decouple the attributes between cookbooks. See my subsequent post on that. It seems like environments are no better than roles for that. We need one big nasty json file in our main per location.Doug.On Fri, Feb 14, 2014 at 2:28 PM, Matthew Moretti < > wrote:
From your email it sounded like you were putting your environment file inside a cookbook? I might’ve misunderstood you , but if that’s the case, that’s probably not right. Most people keep their environments in a directory in their chef-repo and then they’re uploaded using
knife environment from file
-Matt Moretti
On Fri, Feb 14, 2014 at 4:50 PM, Douglas Garstang < > wrote:
Ok, the plot thickens.(bitcasa-prod) Douglass-Mac-mini:~ knife-eu2 environment show eu2-prodchef_type: environmentcookbook_versions:default_attributes:description:json_class: Chef::Environmentname: eu2-prodoverride_attributes:The data isn't even on the server. :( No default and no override attributes. I'm obviously not uploading the data correctly.Doug.--On Fri, Feb 14, 2014 at 1:40 PM, Douglas Garstang < > wrote:
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
Regards,
Douglas Garstang
http://www.linkedin.com/in/garstang
Email:
Cell: +1-805-340-5627
--
Regards,
Douglas Garstang
http://www.linkedin.com/in/garstang
Email:
Archive powered by MHonArc 2.6.16.