Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

How to get current components version? #295

Closed
kowal opened this issue Jan 20, 2015 · 7 comments
Closed

How to get current components version? #295

kowal opened this issue Jan 20, 2015 · 7 comments

Comments

@kowal
Copy link

kowal commented Jan 20, 2015

How can I possibly know what exact versions of components does given ChefDK ships? By components I mean:

  • chef cli
  • chef-client / knife
  • gems: Berkshelf, Chefspec, Foodcritic
  • TestKitchen

After several updates of ChefDK I have multiple versions of gems installed in ChefDK Ruby env:

$ chef gem list rake
rake (10.3.2, 10.1.1, 10.1.0, 10.0.3, 0.9.6)

Also, when I try to check version by chef exec kitchen -v, I'm getting

Chef Development Kit Version: 0.3.2

So my questions are:

  1. How to invoke full uninstall of ChefDK? apt-get remove chefdk leaves all gems apparently. I can image this is desired behavior, but on the other hand, it's not so easy to control gems versions when upgrading ChefDK.
  2. Is there a place in documentation or even source code, where I can find exact components versions for given chefdk release?
@kowal kowal changed the title How to read current components version? How to get current components version? Jan 20, 2015
@brandocorp
Copy link
Contributor

You can find the uninstall instructions for your platform here:

https://docs.chef.io/install_dk.html#uninstall

@brandocorp
Copy link
Contributor

You can also find the chef-dk omnibus software definition here:

https://github.com/opscode/omnibus-chef/blob/master/config/projects/chefdk.rb

@kowal
Copy link
Author

kowal commented Jan 20, 2015

@brandocorp thanks for those links (especially 2nd one).

On Ubuntu 14.04 after running dpkg -P chefdk, I had to manually remove /opt/chefdk/ directory as well because some gems installed later into chefdk weren't removed. I guess this is correct.

I've also found https://github.com/RoboticCheese/chef-dk-chef which can be used in update scenarios (also implements instructions from https://docs.chef.io/install_dk.html#uninstall)

One issue which I can still complain is lack of ability to get components versions in command line. For example chef -v could display components versions as well. What do you think? Does it make sense as a feature request to chefDK?

@kowal
Copy link
Author

kowal commented Jan 20, 2015

@brandocorp one more question. In omnibus-chef repo I can't find branch/tag for ChefDK 0.3.5 (latest on https://downloads.chef.io/chef-dk). There is only branch release/chefdk-0.3.4, nothing newer. Do you know how it get's released? From what branch/tag?

@brandocorp
Copy link
Contributor

I'm not sure how the release/tagging process works for that repo. I'm not seeing a branch or tag for ChefDK 0.3.5, either.

You can find the exact details for the omnibus package in the version manifest. It should be under /opt/chefdk/version-manifest.txt

On OSX, mine looks like the following

chefdk 0.3.5

Component                   Installed Version   Version GUID                                   Overridden From   
-----------------------------------------------------------------------------------------------------------------
appbundler                  0.2.0               0.3.0             
berkshelf                   v3.2.1              git:31c30cef332802b83b146e0ec9e4443ad7e9d1d1   master            
bundler                     1.7.5               1.5.3             
cacerts                     2014.08.20          md5:c9f4f7f4d6a5ef6633e893577a09865e           2014.09.03        
chef                        11.18.0.rc.1        git:ddab6de7b100b4b3f18c414e1c2fc2ddaa5ca805   master            
chef-provisioning           master              git:ea746f1642c57aa0474abab30571d0e959658a55   
chef-provisioning-aws       master              git:3c40a05b77ec42f2e666b2f56e3dd801ea671630   
chef-provisioning-azure     master              git:22ed216022c7b856ae8516139fc0275ff320e157   
chef-provisioning-fog       master              git:96079c215c8d6f3e019bd221ccfe2470d522129c   
chef-provisioning-vagrant   master              git:542e372aeeaf0e8132b7bfaa9d4740d50feebe35   
chef-vault                  v2.2.4              git:b04bfcfce22644e43f4f84cc6e1d32029eac3d6d   
chefdk                      0.3.5               git:09fb345c290d53f12e3172edfa947ecbe4809c5f   master            
dep-selector-libgecode      1.0.2               
foodcritic                  v4.0.0              git:f2952ff49c487263534eac6d04a1801bde072ae0   
gdbm                        1.9.1               md5:59f6e4c4193cb875964ffbe8aa384b58           
libarchive                  3.1.2               md5:efad5a503f66329bb9d2f4308b5de98a           
libedit                     20130712-3.1        md5:0891336c697362727a1fa7e60c5cb96c           20120601-3.0      
libffi                      3.0.13              md5:45f3b6dbc9ee7c7dfbbbc5feba571529           
libiconv                    1.14                md5:e34509b1623cec449dfeb73d7ce9c6c6           
liblzma                     5.0.5               md5:19d924e066b6fff0bc9d1981b4e53196           
libtool                     2.4.2               md5:d2f3b7d4627e69e13514a40e72a24d50           2.4               
libxml2                     2.9.1               md5:9c0cfef285d5c4a5c80d00904ddab380           
libxslt                     1.1.28              md5:9667bf6f9310b957254fdcf6596600b7           
libyaml                     0.1.6               md5:5fe00cda18ca5daeb43762b80c38e06e           
makedepend                  1.0.5               md5:efb2d7c7e22840947863efaedc175747           
ncurses                     5.9                 md5:8cb9c412e5f2d96bc6f459aa8c6282a1           
nokogiri                    1.6.3.1             
ohai                        master              git:f606ca119c4867d5e19163b0135a6ee7ec6d0eaa   
openssl                     1.0.1j              md5:f7175c9cd3c39bb1907ac8bba9df8ed3           
openssl-customization       0.3.5               
pkg-config                  0.28                md5:aa3c86e67551adc3ac865160e34a2a0d           
preparation                 1.0.0               
ruby                        2.1.4               md5:89b2f4a197621346f6724a3c35535b19           1.9.3-p550        
rubygems                    2.4.1               md5:7e39c31806bbf9268296d03bd97ce718           1.8.24            
rubygems-customization      0.3.5               
shebang-cleanup             0.0.1               
test-kitchen                v121-dep-fix        git:2a387009e1448b7b704ed88caede997c309adf0d   master            
util-macros                 1.18.0              md5:fd0ba21b3179703c071bbb4c3e5fb0f4           
version-manifest            0.0.1               
xproto                      7.0.25              md5:a47db46cb117805bd6947aa5928a7436           
zlib                        1.2.8               md5:44d667c142d7cda120332623eab69f40           1.2.6         

@jaym
Copy link
Contributor

jaym commented Jan 21, 2015

I'm fairly certain this is not an issue in chefdk 0.3.6
See PR #255

@kowal
Copy link
Author

kowal commented Jan 21, 2015

Heh good timing with new release :)

After installing chefdk 0.3.6, I can check all version via exec:

$ chef exec berks -v                  # 3.2.3
$ chef exec kitchen -v                # Test Kitchen version 1.3.1
$ chef exec foodcritic -V             # foodcritic 4.0.0
$ chef exec rspec -v                  # 3.1.7        
$ chef gem list chefspec | tail -1    # chefspec (4.2.0.beta.1, 4.1.0)

/opt/chefdk/version-manifest.txt also helps, however not all gems are listed there.

As mentioned in http://lists.opscode.com/sympa/arc/chef/2014-05/msg00150.html we can also check app-bundler gem versions via cat $(which chef). Please note that this shows only other dependent gems, not those considered as chefdk components (chefspec, berskshelf, foodcritic, testkitchen).

Closing this, as 0.3.6 release fixes issue for me.
Thanks again for your help.

@kowal kowal closed this as completed Jan 21, 2015
ksubrama pushed a commit that referenced this issue Jan 11, 2016
@chef-boneyard chef-boneyard locked and limited conversation to collaborators Feb 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants