ENTRY

"Inspecting current cookbooks in Chef server and all single files in it… Attributes, recipes, etc"

Date:July 1st, 2014
Tags:
Comments: 0
  • Join date: 11-30-99
  • Posts: 12
View Counter:
  • 343 views
Rate it
Ad
Poll
  • How does version control (VCS) work in your enterprise?

    View Results

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext
💡 knife cookbook show allows not only to dump all cookbook to the console, but also show specific parts like attributes or recipe. That allows inspection of Chef server from console

Inspecting current cookbooks in chef server and all single files in it. After developing the new version of chef cookbook and uploading it I was very eager to know if all uploaded correctly. In the second case I really wanted to know what source a particular recipe on the chef server has.

Inspecting chef server from console

knife cookbook show … attributes

$ knife cookbook show apache2 1.10.5 attributes mod_ssl.rb
#
# Cookbook Name:: apache2
# Attributes:: mod_ssl
...

default['apache']['mod_ssl']['cipher_suite'] = 'RC4-SHA:HIGH:!ADH' 

knife cookbook show … definitions

$ knife cookbook show apache2 1.10.5 definitions web_app.rb
#
# Cookbook Name:: apache2
# Definition:: web_app
...
define :web_app, :template => 'web_app.conf.erb', :local => false, :enable => true do
application_name = params[:name]
include_recipe 'apache2::default'
include_recipe 'apache2::mod_rewrite'
include_recipe 'apache2::mod_deflate'
include_recipe 'apache2::mod_headers'
... 

knife cookbook show … recipes

$ knife cookbook show apache2 1.10.5 recipes mod_alias.rb
#
# Cookbook Name:: apache2
# Recipe:: alias
...
apache_module 'alias' do
conf true
end

knife cookbook show … files, templates, etc

Same was as above, like

$ knife cookbook show apache2 1.10.5 templates charset.erb
$ knife cookbook show apache2 1.10.5 files tests/minitest/mod_fastcgi.rb
...

Inspecting chef server with server GUI

Alternatively, chef has a web app which allows inspection of all elements. If you have a chef server running, find out how you can use this web GUI, it is good way to make inspect or configure things…

Be Sociable, Share!
 
Interesting entry?
VN:F [1.8.5_1061]
Rating: 0 (from 0 votes)
0 votes 'YES'  0 votes 'NO'


TAGS

RELATED
Pages
Posts

SOCIAL
Be Sociable, Share!

INCOMING SEARCH TERMS



Responces

Leave a Reply