Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chef Workstation 2020 Testing #1167

Closed
20 of 21 tasks
btm opened this issue May 11, 2020 · 10 comments
Closed
20 of 21 tasks

Chef Workstation 2020 Testing #1167

btm opened this issue May 11, 2020 · 10 comments
Labels

Comments

@btm
Copy link
Contributor

btm commented May 11, 2020

Chef Workstation 20.05 needs additional testing before release. Related: #1059

Get the latest build from current and install it: mixlib-install download chef-workstation -c current. Must be at least 20.5.26+.

Ensure all commands run are only coming from the chef workstation install. No other ruby installations, rubygems, or other chef products should be in the PATH.

Test appropriate functionality, leave a comment on this issue regarding the results including noting all/any ruby warnings.

If everything tested works, and there are no Ruby deprecation errors to clean up, check the checkbox below.

  • inspec # the built in one
  • test-kitchen with inspec
  • cookstyle

Knife Plugins

Ensure basic functionality of each plugin works

  • knife acl, e.g. knife acl show nodes NODE_NAME
  • knife tidy, e.g. knife tidy server report
  • knife opc, e.g. knife opc org create
  • knife windows, e.g. knife wsman test
  • knife bootstrap (ssh, winrm, cross-platforms)

Clouds and virtualization

Ensure we can use the knife plugin to create an instance, and the test-kitchen driver works if available.

  • azure (test-kitchen with azure-rm and knife azure)
  • ec2 (test-kitchen with ec2 and knife ec2)
  • google (test-kitchen with google and knife google)
  • test-kitchen with hyperv
  • test-kitchen with vagrant

Additional clouds/virtualization

These clouds are lower priority as they may be difficult to get access to an instance of them

  • test-kitchen with digital ocean
  • test-kitchen with openstack
  • vcenter (test-kitchen with vcenter and knife-vcenter)
  • knife-vsphere

Additional tests

Aha! Link: https://chef.aha.io/features/SH-1840

@btm btm added the Status: Untriaged An issue that has yet to be triaged. label May 11, 2020
@dheerajd-msys
Copy link

Chef Workstation Setup

1. We need to remove installed chef/chefdk package from our machine

2. check status of chef/chefdk
   dpkg --status chef/chefdk

3. Remove installed package
   sudo dpkg -P chef/chefdk

4. Download chef-worksation for your ubuntu machine from current channel
   https://downloads.chef.io/chef-workstation/current

5. Install chef-workstaion
    sudo dpkg -i <downloaded-chef-workstation>

6. Set your system PATH for chef-workstation

dheerajdubey@PUN-LAP-DHEERAJ:~$ echo $PATH
/home/dheerajdubey/.rvm/gems/ruby-2.6.0/bin:/home/dheerajdubey/.rvm/gems/ruby-2.6.0@global/bin:/usr/share/rvm/rubies/ruby-2.6.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/share/rvm/bin

dheerajdubey@PUN-LAP-DHEERAJ:~$ export PATH=/opt/chef-workstation/embedded/bin/:$PATH

7. Set your GEM_PATH & GEM_HOME to /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0
   export GEM_HOME=/opt/chef-workstation/embedded/lib/ruby/gems/2.7.0
   export GEM_PATH=/opt/chef-workstation/embedded/lib/ruby/gems/2.7.0

8. Validate using :
   gem env

9. By this time you should be able to see "knife -v" output 

10. dheerajdubey@PUN-LAP-DHEERAJ:~/.aws$ chef-cli -v
Chef Workstation version: 20.5.27
Chef Infra Client version: 16.0.287
Chef InSpec version: 4.18.111
Chef CLI version: 2.0.10
Test Kitchen version: 2.5.0
Cookstyle version: 6.3.4

11.
dheerajdubey@PUN-LAP-DHEERAJ:~/.aws$ which ruby
/opt/chef-workstation/embedded/bin/ruby

@dheerajd-msys
Copy link

dheerajdubey@PUN-LAP-DHEERAJ:~/.aws$ knife ec2 server create -I ami-xxxxx -U ec2-user -i ddubey-msys-chef.pem -N ddubey-amazon-msys --sudo --use-sudo-password -c knife.rb

WARN: Deprecation CHEF-29 from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/knife-ec2-1.0.36/lib/chef/knife/helpers/ec2_base.rb:183:in `locate_config_value'

  Use of config_value without a fallback_key is deprecated.  Knife plugin authors should access the config hash directly, which does correct merging of cli and config options.

Please see https://docs.chef.io/deprecations_knife_bootstrap_apis/ for further details and information on how to correct this problem.
WARN: Deprecation CHEF-29 from /opt/chef-workstation/embedded/lib/ruby/gems/2.7.0/gems/knife-ec2-1.0.36/lib/chef/knife/helpers/ec2_base.rb:183:in `locate_config_value'

@lamont-granquist
Copy link
Contributor

@dheerajd-msys I'm working on fixing all of that in knife-ec2 right now. I've fixed knife-azure already and master of that could be Q/A tested. All the rest of the knife plugins need to be fixed, but we should probably coordinate if we're going to do that in parallel.

@dheerajd-msys
Copy link

Reports are getting generated only in JSON format for knife tidy #1178 (comment)

@dheerajd-msys
Copy link

dheerajd-msys commented May 15, 2020

Fail( IN cases when the user has no read permission to any of the organization and --orgs is not provided in CLI ) #1178 (comment) and works well when we provide --orgs option for knife tidy server report like #1178 (comment)

@btm
Copy link
Contributor Author

btm commented May 15, 2020

@dheerajd-msys I commented on #1178 (comment) that those issues in knife-tidy are fine. We're just looking for regressions, critical failures, and deprecation warnings here.

@btm btm added the Epic label May 15, 2020
@dheerajd-msys
Copy link

Thank you @btm.

@tyler-ball
Copy link
Contributor

tyler-ball commented May 15, 2020

chefspec is not tracked on this Zenhub board so I added chefspec/chefspec#986 in the card description

@dheerajd-msys
Copy link

dheerajd-msys commented Jun 12, 2020

@btm chefspec/chefspec#986 is fixed via chefspec/chefspec#988 in chef-workstation v20.6.64

@tyler-ball tyler-ball removed the Status: Untriaged An issue that has yet to be triaged. label Jul 22, 2020
@dheerajd-msys
Copy link

chef/chef#9922 is fixed in chef/chef#10298 and available in Chef Infra Client v16.4.35+ and Chef workstation v20.8.125
Tested with both successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants