Reputation: 40668
I type knife node show test
and the result says
Node Name: test
Environment: _default
FQDN: ip-xxx-xxx-xxx-xxx.us-west-2.compute.internal
IP: xxx.xxx.xxx.xxx
Run List: recipe[hello_chef_server]
Roles:
Recipes: hello_chef_server, hello_chef_server::default
Platform: ubuntu 14.04
Tags:
So I see that the node test "has a run list". Where is that association physically stored? That is, where is it physically stored that node "test" has run list "recipe[hello_chef_server]"? Is it on the chef server or chef node? Is it in a file (if so, where in the filesystem)? Is it stored in chef server's postgres DB (if so, does someone know what table it's stored in)?
Upvotes: 0
Views: 1107
Reputation: 40668
Here's the best I can figure out:
On my chef server I just created on Ubuntu AWS, chef's embedded postgres data directory is /var/opt/opscode/postgresql/9.2/data
. When I SELECT serialized_object FROM nodes
, I truly get a huge serialized object that is indecipherable until deserialized.
The reason I believe that's the answer I'm looking for is based off of this description in Chef documentation:
To understand how templates work, you should first understand a bit more about nodes. Recall that a node represents a server and is typically a virtual machine or physical server – basically any compute resource in your infrastructure that's managed by Chef. When you bootstrapped your node, the Chef server created what's called a node object for you. This node object contains a number of attributes that describe the node, and these attributes are saved on the Chef server.
When a recipe runs, a node object is loaded into the program. Chef loads the node's attributes from the Chef server into memory. For our home page, we want to display the server's fully qualified domain name (FQDN). To do so, we access the fqdn attribute of the node object.
Upvotes: 1