A cookbook is versioned whenever there is a third party component change, a bug fix, the addition of new features or improvements to existing cookbook. This helps us to easily organise the cookbook and let us know which version of the cookbook has what functionalities. This also helps us to specifically update a version of the cookbook to Chef Server and use it for chef-client runs. A cookbook version is in the format “a.b.c” where a, b, c are decimal numbers. “a”, “b”, “c”  represents major, minor and patch versions respectively. For eg: 1.1.2 version represents major and minor release version “1” with patch version “2”.Versions like “1.2a.3” or “1.2.3.4” or “3” are not allowed. A version restriction could be attained by combining a cookbook version with an operator. Following operators are used = : Equals >: Greater than < : Less than < =: Less than and equal to > =: Greater than and equal to ~>: approximately greater than. For eg: ~> 3.2.5 denotes cookbooks greater than and equal to 3.2.5 but less than 3.3.0   Cookbook versions are specified in the “metadata.rb” file located at the top of our cookbook.