Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out the version of a chef server

Tags:

chef-infra

I have a chef server that I'm pretty sure is chef 10. I don't remember the exact version and it doesn't seem to say it anywhere in the web ui. Does anyone know how I can find out what it is? I don't see it in any configuration files either, but maybe I'm not looking in the right place.

Thanks.

like image 868
streetcornerlurker Avatar asked Mar 26 '15 19:03

streetcornerlurker


People also ask

How do I find chef version on server?

Check Chef Server Version If you want to check the Chef Server version, you need to use chef-server-ctl version command.

How do I find my chef client version?

1 Answer. Show activity on this post. If you have Chef installed from the package version should be in node["chef_packages"]["chef"]["version"] . If this does not work, you should be able to read Chef::VERSION from recipe.

How do I know if chef client is installed?

You can use which knife or which chef-client to determine (exist status 0 : command found, otherwise 1 ). While knife is used on the workstation, it should come with every installation of chef. But to be save, check for chef-client .

What version of Chef do I have installed on my server?

Inside your Chef installation directory you will find a file named version-manifest.txt, it has information about different applications versions, the first line refers to the chef-server's version.

What is the difference between chef and erchef?

Chef Manage is the web interface for the Chef Infra Server, which uses the Chef Infra Server API for all communication to the Chef Infra Server. Erchef is a complete rewrite of the core API for the Chef Infra Server, which allows it to be faster and more scalable than previous versions.

How do I read the key files on the Chef server?

The key files on the Chef Server are readable only by root. For example: Use knife configure -i to create an initial ~/.chef/knife.rb and new administrative API user for yourself.

How do I reconfigure the chef infra server?

The Chef Infra Server can be configured via the /etc/opscode/chef-server.rb file. Whenever this file is modified, the chef-server-ctl reconfigure command must be run to apply the changes. See the Chef Infra Server settings guide for additional information.


2 Answers

Inside your Chef installation directory you will find a file named version-manifest.txt, it has information about different applications versions, the first line refers to the chef-server's version. In CentOS 6 you can do this:

# head -n1 /opt/opscode/version-manifest.txt chef-server 12.0.0 
like image 171
Ernesto Iser Avatar answered Oct 01 '22 08:10

Ernesto Iser


So to determine chef-server version:

If there's a couchdb running it's chef10, you may ensure that listing /var/lib/couchdb/* seeing recent files and in the processlist (unless it's the old base from an update not cleaned properly but in this case the files should not be recent)

In this case the version of the chef server is given by:

cat /usr/lib/ruby/vendor_ruby/chef-server/version.rb 

If there's no couch db, you're on chef11 or chef12, for chef11 on unbutu the version manifest is in /opt/chef-server/version-manifest.txt.

like image 35
Tensibai Avatar answered Oct 01 '22 08:10

Tensibai