GithubHelp home page GithubHelp logo

chef / chef-workstation Goto Github PK

View Code? Open in Web Editor NEW
133.0 56.0 110.0 27.36 MB

Chef Workstation gives you everything you need to get started with Chef, so you can automate how you audit, configure, and manage applications end environments.

License: Apache License 2.0

Ruby 30.74% Shell 10.42% HTML 8.84% Makefile 0.36% PowerShell 1.96% Dockerfile 0.36% Go 41.95% PLSQL 5.37%
chef-workstation chef chef-dk

chef-workstation's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chef-workstation's Issues

Cookbook dependencies only work under `bundle exec`

Description

When trying to execute a cookbook that includes dependent cookbooks the chef-run fails when trying to use the installed package but works from source control with bundle exec

Chef Workstation Version

master / 0.1.135

Platform Version

OSX workstation, Ubuntu target

Replication Case

  1. Create a cookbook with a dependency. The metadata.rb should include depends 'nginx' and the default recipe should be include_recipe "nginx:default"
  2. Create a vagrant ubuntu node
  3. Run chef-run vagrant@ubuntu1 path/to/cookbook
  4. It should fail
  5. Check out chef-workstation code, bundle install it and bundle exec chef-run vagrant@ubuntu1 path/to/cookbook - it should succeed

Client Output

[ - ] Generating local policyfile...
[ - ] Generated local policyfile
[ - ] [ubuntu1] Connecting...
[ - ] [ubuntu1] Connected.
[ - ] [ubuntu1] Verifying Chef client installation.
[ - ] [ubuntu1] Chef client version 14.2.0 already installed on target.
[ - ] [ubuntu1] Converging local recipe /Users/tball/github/chefws-chef-conf/cookbooks/my_nginx/recipes/dep.rb on target...
[ - ] [ubuntu1] Pushing remote policy to target...
[ - ] [ubuntu1] Running Chef on target...
[ - ] [ubuntu1] Failed to converge target.
[ERR] [ubuntu1] The converge of the remote host failed.

CHEFCCR099

The converge of the remote host failed.

Please examine the log file for a detailed cause of failure.

If you are not able to resolve this issue, please contact Chef support
at [email protected] and include the log file from the location below:
  /Users/tball/.chef-workstation/logs/default.log

default.log:

[2018-06-18T16:53:33-06:00] INFO: Initialized logger
[2018-06-18T16:53:33-06:00] INFO: Looking for telemetry data to submit
[2018-06-18T16:53:33-06:00] INFO: Found 66 sessions to submit
[2018-06-18T16:53:40-06:00] ERROR: Remote chef-client error follows:
[2018-06-18T16:53:40-06:00] ERROR: Chef::Exceptions::CookbookNotFound: Error loading cookbook zypper with identifier 28279427bc93cb2ad2e29f09545c7dc5aa17c6dc from cookbook_artifacts/zypper/28279427bc93cb2ad2e29f09545c7dc5aa17c6dc: Net::HTTPFatalError - 500 "Internal Server Error"
[2018-06-18T16:53:40-06:00] ERROR: [ERR] [ubuntu1] The converge of the remote host failed.

Looking on the target node at /var/chef-workstation/cookbook_artifacts/zypper-28279427bc93cb2ad2e29f09545c7dc5aa17c6dc/metadata.json the very bottom of it looks like:

...
  "ohai_versions": [

  ],
  "gems": [

It is incomplete JSON for some reason. When debugging and trying this from local source, the metadata.json file is created on the client side with that incomplete JSON before it is packaged and sent to the remote node. So the error is not in the un-taring or transfer of the policyfile bundle. It is somehow occurring when creating the Policyfile bundle or downloading/preparing dependencies.

ED25519 SSH Key support

Description

ED25519 keys are not currently supported

Chef Workstation Version

0.1.0

Platform Version

MacOs 10.13

unsupported key type `ssh-ed25519'
net-ssh requires the following gems for ed25519 support:
 * rbnacl (>= 3.2, < 5.0)
 * rbnacl-libsodium, if your system doesn't have libsodium installed.
 * bcrypt_pbkdf (>= 1.0, < 2.0)

Failing to execute CHEF scripts via workstation to client nodes on Windows’ platform

SQL_2017_ONLY_PROVISION_STD_x64

[✔] Packaging cookbook... done!

[✔] Generating local policyfile... exporting... done!

[✖] Applying SQL_2017_ONLY_PROVISION_STD_x64::default from C:/Users//chef-repo/cookbooks/SQL_2017_ONLY_PROVISION_STD_x64 to target.

|__ [✖] [..net] Failed to converge SQL_2017_ONLY_PROVISION_STD_x64::default.

Could not determine reason for converge failure

STDOUT (may be blank)

STDERR (may be blank)

Cannot find path 'C:\Users<user name>\AppData\Roaming\chef-workstation\cache\run-report.json' because it does not exist.

At line:1 char:1

  • type $env:APPDATA/chef-workstation/cache/run-report.json

  • 
      + CategoryInfo          : ObjectNotFound: (C:\Users\<user name>...run-report.json:String) [Get-Content], ItemNotFoundException
    
      + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand
    
    
    
    
    
    

An error occurred while converging the remote host.

I was unable to retrieve the log file which would allow

me to provide more information. Above is the output

that occurred while trying to retrieve the remote log file.

PS C:\Users<user name>\chef-repo\cookbooks>

Chef Workstation Version

unknown

Platform Version

windows

A2 Self Signed Certificate causes data collector send to fail

Description

When using an A2 server with a self signed certificate the remote chef-client run we kick off will hang for an extremely long time, doing nothing.

Chef Workstation Version

master

Platform Version

all

Replication Case

  1. Generate an A2 server using the default setup, so it has a Self Signed certificate
  2. Log into the A2 server and generate an API token
  3. Paste the token and url into ~/.chef-workstation/config.toml
[data_collector]
url="https://1.1.1.1/data-collector/v0/"
token="****"
  1. Issue any chef-run command against a single node. It will hang trying to perform the Chef run

Workaround

I got around this issue by applying the following patch locally

--- a/components/chef-run/lib/chef-run/action/converge_target.rb
+++ b/components/chef-run/lib/chef-run/action/converge_target.rb
@@ -82,6 +82,8 @@ module ChefRun::Action
           data_collector.token "#{dc.token}"
           data_collector.mode :solo
           data_collector.organization "Chef Workstation"
+          verify_api_cert false
+          ssl_verify_mode :verify_none
         EOM
       end

All attempts we made to use knife ssl fetch on the remote target failed. Maybe the data collector does not use the same trusted certs directory everything else does?

winrm support

The man pages and docs show chef-run will work with winrm. However there are no examples that show how to use it.

e.g. from the man page

ARGUMENTS:
<TARGET[S]> The hosts or IPs to target. Can also be an SSH or WinRM URLs
in the form:
ssh://[USERNAME]@example.com[:PORT]

Have tried unsuccessfully the following

chef-run server1 service w3wp action=start

chef-run winrm://server1:5986 service w3wp action=start


chef-run winrm://[email protected] service w3wp action=start --user [email protected] --password bar
An remote error has occurred:
  bad URI(is not URI?): winrm://[email protected]@server1.example.com.

Is winrm support available yet?

Does not work with ARM chef-client

When executing against an ARM host that already has chef-client installed chef-run fails with

[✔] [192.168.1.113] Connected.
[✖] [192.168.1.113] Unknown architecture armv7l.
Must be one of: aarch64, i386, powerpc, ppc64, ppc64le, s390x, sparc, x86_64


CHEFINT001

An unexpected error has occurred:

  Unknown architecture armv7l.
Must be one of: aarch64, i386, powerpc, ppc64, ppc64le, s390x, sparc, x86_64

Stack trace

--------------------------------------------------------------------------------
2018-05-28 21:20:30 -0400: Error encountered while running the following:
  --sudo [email protected] package ntp action=install
Backtrace:
Mixlib::Install::Options::InvalidOptions: Unknown architecture armv7l.
Must be one of: aarch64, i386, powerpc, ppc64, ppc64le, s390x, sparc, x86_64
	/opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/mixlib-install-3.10.0/lib/mixlib/install/options.rb:103:in `validate_options!'
	/opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/mixlib-install-3.10.0/lib/mixlib/install/options.rb:92:in `validate!'
	/opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/mixlib-install-3.10.0/lib/mixlib/install/options.rb:82:in `initialize'

should it work against existing working architectures even if chef-run itself does not execute on ARM ?

no need to type winrm://

It would be nice if I didn't have to type winrm:// in front of every server I want to connect to.

Possible solutions

  1. Add a --winrm parameter
  2. Let me default to winrm in a config file (useful if I have more windows than linux hosts)
  3. Auto detect the remote host os type if not specified

ChefDk Version 2.4.17 Powershell Error when Initializing

Description

When Starting Chef Development Kit the following error is thrown:

Cannot run a document in the middle of a pipeline: C:\windows\system32\Out-String.
At line:1 char:105
+ ... v:CHEFDK_ENV_FIX = 1; chef shell-init powershell | out-string | iex;  ...
+                                                        ~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (C:\windows\system32\Out-String:String) [], Run
   timeException
    + FullyQualifiedErrorId : CantActivateDocumentInPipeline

PowerShell 5.1.14409.1005 (Microsoft Windows NT 6.1.7601 Service Pack 1)
Ohai, welcome to ChefDK!

By modifying the following line in Start-chefdk.ps1 from
chefdkinit = '"$env:PATH = ''' + $chefdk_bin + ';'' + $env:PATH; $env:CHEFDK_ENV_FIX = 1; chef shell-init powershell | out-string | iex; Import-Module chef -DisableNameChecking"'
to
$chefdkinit = '"$env:PATH = ''' + $chefdk_bin + ';'' + $env:PATH; $env:CHEFDK_ENV_FIX = 1; chef shell-init powershell | iex; Import-Module chef -DisableNameChecking"'
The error is no longer thrown, and the Path environment variable has the following additional entries:

C:/opscode/chefdk/bin
C:/Users/username/AppData/Local/chefdk/gem/ruby/2.4.0/bin
C:/opscode/chefdk/embedded/bin
C:/opscode/chefdk/embedded/git/usr/bin

ChefDK Version

Chef Development Kit Version: 2.4.17

Platform Version

Windows 7 Enterprise (Build 7601: Service Pack 1)
Chef Version

PS C:\> chef --version
Chef Development Kit Version: 2.4.17
chef-client version: 13.6.4
delivery version: master (73ebb72a6c42b3d2ff5370c476be800fee7e5427)
berks version: 6.3.1
kitchen version: 1.20.0
inspec version: 1.45.13

Powershell Version

PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14409.1005
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14409.1005
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Replication Case

Launch Chef Development Kit.

Stacktrace

Cannot run a document in the middle of a pipeline: C:\windows\system32\Out-String.
At line:1 char:105
+ ... v:CHEFDK_ENV_FIX = 1; chef shell-init powershell | out-string | iex;  ...
+                                                        ~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (C:\windows\system32\Out-String:String) [], Run
   timeException
    + FullyQualifiedErrorId : CantActivateDocumentInPipeline

NOTE: CHEFDK BUGS ONLY

This issue tracker is for the code contained within this repo -- chefdk.

knife commands fail with SSL error when using FIPS kernel

Description

When using FIPS kernel, the knife and chef-client commands fail with the following error:

ERROR: OpenSSL::OpenSSLError: This version of OpenSSL does not support FIPS mode

The issue only occurs in Chef Workstation and not in ChefDK 3.4.38.

Chef Workstation Version

0.2.29-1 (stable) and 0.2.32-1 (current)

Platform Version

RHEL 7.6

Details

knife:

# /opt/chef-workstation/bin/knife node list
ERROR: OpenSSL::OpenSSLError: This version of OpenSSL does not support FIPS mode

chef-client:

# /opt/chef-workstation/bin/chef-client
Traceback (most recent call last):
        9: from /opt/chef-workstation/bin/chef-client:296:in `<main>'
        8: from /opt/chef-workstation/bin/chef-client:296:in `load'
        7: from /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-14.6.47/bin/chef-client:25:in `<top (required)>'
        6: from /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-14.6.47/lib/chef/application.rb:64:in `run'
        5: from /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-14.6.47/lib/chef/application/client.rb:313:in `reconfigure'
        4: from /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-14.6.47/lib/chef/application.rb:55:in `reconfigure'
        3: from /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-14.6.47/lib/chef/application.rb:99:in `configure_chef'
        2: from /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-config-14.6.47/lib/chef-config/config.rb:587:in `init_openssl'
        1: from /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-config-14.6.47/lib/chef-config/config.rb:1132:in `enable_fips_mode'
/opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-config-14.6.47/lib/chef-config/config.rb:1132:in `fips_mode=': This version of OpenSSL does not support FIPS mode (OpenSSL::OpenSSLError)

Workaround

As documented in chef/chef issue 5533, the following command resolves the issue for the current shell.

export CHEF_FIPS=""

The ChefDK packages do not have this issue and do not require the workaround, including the latest stable ChefDK 3.4.38 package.

chef-workstation RPM warns of missing dependencies, probably needs refactoring

Description

chef-workstation package emits scary 'missing dependency'-like text


Running transaction
  Installing : chef-workstation-0.2.48-1.el6.x86_64                                                                          1/1

To run the experimental Chef Workstation App, use your
platform's package manager to install these dependencies:

        libgtk-3.so.0 => not found
        libgdk-3.so.0 => not found
        libpangocairo-1.0.so.0 => not found
        libpango-1.0.so.0 => not found
        libatk-1.0.so.0 => not found
        libcairo.so.2 => not found
        libgdk_pixbuf-2.0.so.0 => not found
        libX11-xcb.so.1 => not found
        libxcb.so.1 => not found
        libXi.so.6 => not found
        libXcursor.so.1 => not found
        libXdamage.so.1 => not found
        libXrandr.so.2 => not found
        libXcomposite.so.1 => not found
        libXext.so.6 => not found
        libXfixes.so.3 => not found
        libXrender.so.1 => not found
        libX11.so.6 => not found
        libXtst.so.6 => not found
        libXss.so.1 => not found
        libgconf-2.so.4 => not found
        libasound.so.2 => not found
        libcups.so.2 => not found
        libfontconfig.so.1 => not found
You can then launch the App by running 'chef-workstation-app'.
The App will then be available in the system tray.

Thank you for installing Chef Workstation!
You can find some tips on getting started at https://chef.sh/

Emitting large blocks of output in the RPM %post has generally been discouraged for a long time (because the rpm tools themselves generally run unattended, and text dumped to stdout is either pointless or risky).

The missing pieces are heavily X-windows stuff. Usually a sub-package is used to separate the X addon bits from the basic text pieces. Then we use a system of dependencies to ensure the requirements are pulled in automatically for that X-windows sub-package (it's kinda slick -- you'll see) so the user isn't put in dependency hell (which is otherwise self-inflicted).

Chef Workstation Version

0.2.48-1.el6 <-- el6?

If we're using the same builder or package for EL6 and others (like EL7) you should expect to cause issues. Set up your mock or builder VMs and build it in the right environment to prevent issues. Mock, or else careful tag generation, should get that string right.

Platform Version

centos-release-7-6.1810.2.el7.centos.x86_64

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

chef target does not work

The documentation references a command called chef target but that does not work

chef target converge <Target host|IP|SSH|WinRM> <Resource> <Resource Name> [properties] [flags]

chef target converge user@hostname user timmy

chef target converge winrm://user@hostname:port user timmy
chef target converge winrm://[email protected]
Unknown command `target'.

Support aix platform

Can we get some AIX love please

Description

CHEFTARG001

'aix' is not a supported target operating system at this time.

We plan to support a range of target operating systems,
but during this targeted beta we are constraining our efforts
to Windows and Linux.

If you are not able to resolve this issue, please contact Chef support
at [email protected]

Chef Workstation Version

latest stable release

Platform Version

AIX

We're packaging multiple copies of the same gem in our package

Stumbled across this

/opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.114/lib/chef-run/action/converge_target.rb
/opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-cli-0.1.114/lib/chef-cli/action/converge_target.rb
/opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.119/lib/chef-run/action/converge_target.rb
/opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-cli-0.1.103/lib/chef-cli/action/converge_target.rb
/opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-cli-0.1.119/lib/chef-cli/action/converge_target.rb
/opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.103/lib/chef-run/action/converge_target.rb

Feature Request: chef-run target a hostname in my ssh config

When I target host that's specified in my ssh config I get a timeout?
Can this be a feature request?

[✖] [magic-name-sshconfig] SSH session could not be established

CHEFINT001

An remote error has occurred:

  SSH session could not be established.

If you are not able to resolve this issue, please contact Chef support
at [email protected] and include the log file and stack trace from the
locations below:

  /home/kmf/.chef-workstation/logs/default.log
  /home/kmf/.chef-workstation/logs/stack-trace.log

no_proxy doesn't work as advertised when using chef exec rspec

Description

chef exec rspec is not able to function due to it trying to make connections to 127.0.0.1 through our HTTP proxy, because it shouldn't be doing that. It appears no_proxy in knife.rb is being ignored or the documentation for it does not accurately reflect the proper syntax for the setting.

ChefDK Version

Chef Development Kit Version: 0.14.25
chef-client version: 12.10.24
berks version: 4.3.3
kitchen version: 1.8.0

Platform Version

RHEL 7

Replication Case

  1. Configure knife.rb
    http_proxy               'http://proxy.our.org:80'
    https_proxy              'http://proxy.our.org:80'
    no_proxy                 '*.our.org, localhost, 127.0.0.1'
  1. Run chef generate cookbook no_proxy_test with the default cookbook generator
  2. cd no_proxy_test
  3. Run chef exec rspec and you'll see it trying to talk through a proxy (and failing) to, I assume... chef-zero. This can be seen more clearly with (on Linux): strace -qq -f -e trace=connect chef exec rspec. The stacktrace in Stacktrace below shows the failure.
  4. Comment out the http_proxy and https_proxy lines in knife.rb (thereby defining no proxies to use, like no_proxy should be doing...) and you will succeed as shown in the code output below.
    .

    Finished in 2.9 seconds (files took 2.84 seconds to load)
    1 example, 0 failures

Stacktrace

F

Failures:

  1) no_proxy_test::default When all attributes are default, on an unspecified platform converges successfully
     Failure/Error: expect { chef_run }.to_not raise_error

       expected no Exception, got #<Net::HTTPFatalError: 504 "Gateway Timeout"> with backtrace:
         # ./spec/unit/recipes/default_spec.rb:13:in `block (3 levels) in <top (required)>'
         # ./spec/unit/recipes/default_spec.rb:17:in `block (4 levels) in <top (required)>'
         # ./spec/unit/recipes/default_spec.rb:17:in `block (3 levels) in <top (required)>'
     # ./spec/unit/recipes/default_spec.rb:17:in `block (3 levels) in <top (required)>'

Finished in 0.5396 seconds (files took 3.1 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/unit/recipes/default_spec.rb:16 # no_proxy_test::default When all attributes are default, on an unspecified platform converges successfully

CLI help text for <RECIPE> name is missing an expected format

Version

0.1.120

Description

The 3rd variant of <RECIPE> in the help text does not provide the required format in the text.

  <RECIPE>          The recipe to converge. This can be provided as one of:
                    1. Full path to a recipe file
                    2. Cookbook name. First we check the working directory for this
                       cookbook, then we check in the chef repository path. If a
                       cookbook is found we run the default recipe.
                    3. This behaves similarly to 'cookbook name' above, but it also allows
                       you to specify which recipe to use from the cookbook.

Expected

Variant 3 should provide an explanation that the required format is cookbook name::recipename

Add a Debian compatible version

Describe the Enhancement:

I'm trying to follow the "Infrastructure Automation" course from http://learn.chef.io, but when the https://omnitruck.chef.io/install.sh script is executed it fails with a 404 error :

debian 9 x86_64
Getting information for chef-workstation stable 0.2.41 for debian...
downloading https://omnitruck.chef.io/stable/chef-workstation/metadata?v=0.2.41&p=debian&pv=9&m=x86_64
  to file /tmp/install.sh.5244/metadata.txt
trying wget...
ERROR 404
Omnitruck artifact does not exist for version 0.2.41 on platform debian

Either this means:
   - We do not support debian
   - We do not have an artifact for 0.2.41

This is often the latter case due to running a prerelease or RC version of chef
or a gem version which was only pushed to rubygems and not omnitruck.

You may be able to set your knife[:bootstrap_version] to the most recent stable
release of Chef to fix this problem (or the most recent stable major version number).

In order to test the version parameter, adventurous users may take the Metadata URL
below and modify the '&v=<number>' parameter until you successfully get a URL that
does not 404 (e.g. via curl or wget).  You should be able to use '&v=11' or '&v=12'
succesfully.

If you cannot fix this problem by setting the bootstrap_version, it probably means
that debian is not supported.

Metadata URL: https://omnitruck.chef.io/stable/chef-workstation/metadata?v=0.2.41&p=debian&pv=9&m=x86_64

There are versions for Ubuntu but not Debian (which looks silly to me) so I can't process further in learning chef.

Describe the Need:

All the Debian users would benefit from this and don't get stuck on the very first step of the course.
So having a Debian version, which should be very similar to the Ubuntu one, would solve this.

Current Alternative

The alternative I found is to create the /etc/lsb-release file with the following content :

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu Bionic Beaver

Also I had to install the sudo package and then I was able to install chef-workstation.

Can We Help You Implement This?:

Where are the Ubuntu files which allows you to release the Ubuntu versions of Chef Workstation?
I could use them in order to do the Debian version.

Specify Chef Client installer location

Description

Having a config option in the config.toml file to specify the network location of the chef client installer would greatly cut down on the network overhead for bootstrapping our environments. As it is now each client must first download the chef client from the internet which takes significantly longer than using our network source.

Chef Workstation Version

0.2.48

Platform Version

Windows 10

Feature Request: run against a real chef server

From the documentation it looks like chef-workstation only runs against local cookbooks:

 <RECIPE>          The recipe to converge. This can be provided as one of:
                    1. Full path to a recipe file
                    2. Cookbook name. First we check the working directory for this
                       cookbook, then we check in the chef repository path. If a
                       cookbook is found we run the default recipe.
                    3. This behaves similarly to 'cookbook name' above, but it also allows
                       you to specify which recipe to use from the cookbook.

It would be awesome to also be able to use against a chef server, i think it would only work against already bootstrapped nodes, unless workstation is modified to also have the ability to bootstrap. I know there is knife ssh but i think chef workstation is a better interface and the idea of a inventory file to come is great for orchestration. we currently do this with ansible as i have found it easier to use than knife ssh for our use case for blue green deployments.

OPERATING_SYSTEM_DEFAULTS are clobbered by ~/.gemrc

Description

Users with custom ~/.gemrc files may clobber the flags set in OPERATING_SYSTEM_DEFAULTS.

In operating_system.rb:6 there are the following two lines:

# Always install and update new gems in "user install mode"
Gem::ConfigFile::OPERATING_SYSTEM_DEFAULTS["install"] = "--user --no-document"
Gem::ConfigFile::OPERATING_SYSTEM_DEFAULTS["update"] = "--user --no-document"

This behavior breaks using ChefDK as a plugin to things like rbenv-chefdk and other Ruby switchers.

To see how hard this is debug, look at the efforts I had to go through on docwhat/rbenv-chefdk#3

ChefDK Version

Chef Development Kit Version: 0.15.16
chef-client version: 12.11.18
delivery version: master (444effdf9c81908795e88157f01cd667a6c43b5f)
berks version: 4.3.5
kitchen version: 1.10.0

Platform Version

Any. But I'm testing on OS X

Replication Case

Create a ~/.gemrc file with these lines:

install: --no-document
update:  --no-document

And then, in a shell that has not run chef shell-init run:

% /opt/chefdk/embedded/bin/gem install awesome_print
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /opt/chefdk/embedded/lib/ruby/gems/2.1.0 directory.

An easy way to reproduce this setup is to clone this gist and run ./fakehome.sh

Proposed solution

Remove the OPERATING_SYSTEM_DEFAULTS lines and instead add in the GEM_* environment variables from chef shell-init. Leave the user_dir alone, since it is useful.

My local cookbooks are not being resolved

Description

I am building a list of cookbooks that will be inter-referencing each other under the same parent working directory. Using the CLI, I cannot resolve neighboring local cookbooks.

I am unsure if it comes from a misunderstanding of how the tool works with or without --cookbook-repo-paths or if it is a real issue.

Chef Workstation Version

chef-run: 0.1.21

Platform Version

Windows 10, 64bit

File details

Here is the file structure of my project, with many of the generated files omitted (it's on another drive than my user directory).

E:\Projects\mycompany\dev-ops\tests\chef-example
├───cicd
│   ├───recipes
│   ├───templates
│   └    metadata.rb
└───mycompany_docker
    ├───recipes
    └    metadata.rb

In the metadata.rb files, 'cicd' has a depends 'mycompany_docker' and that one's metadata.rb has a depends 'docker'. I have double checked the value of the name attribute.

Both cookbooks run correctly if I run them without that dependency.

Failing command

chef-run me@mydomain --cookbook-repo-paths E:\Projects\mycompany\dev-ops\tests\chef-example cicd

Partial Trace

Caused by: Solve::Errors::NoSolutionError: Unable to satisfy the following requirements:
- `mycompany_docker (>= 0.0.0)` required by `cicd-0.1.0`

Hopefully this is not something I missed in the documentation.

Include knife-ec-backup and knife-acl

Description

Can we please include knife-ec-backup and knife-acl in chefdk? They are critical for managing a chef infrastructure.

ChefDK Version

next

Platform Version

all

Exception when my ssh keyring contains an ed25519 key

Description

When my ssh agent contains an ed25519 key, trying to connect to a host results in an exception being raise.

Chef Workstation Version

14:05 ~/work/chef % chef-run -v 
chef-run: 0.1.124

Platform Version

macOS 10.13

Replication Case

14:04 ~/work/chef % ssh-add -l
2048 SHA256:xxxxxx /Users/thom/.ssh/id_rsa (RSA)
256 SHA256:xxxx thom@UNKNOWN (ED25519)
chef-run ec2-xxx.eu-west-1.compute.amazonaws.com --user ubuntu apt_update foo action=run

Client Output

[-] [ec2-xxx.eu-west-1.compute.amazonaws.com] Connecting...
INTERNAL ERROR
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Message:
unsupported key type `ssh-ed25519'
net-ssh requires the following gems for ed25519 support:
 * rbnacl (>= 3.2, < 5.0)
 * rbnacl-libsodium, if your system doesn't have libsodium installed.
 * bcrypt_pbkdf (>= 1.0, < 2.0)
See https://github.com/net-ssh/net-ssh/issues/478 for more information
Gem::MissingSpecError : "Could not find 'rbnacl' (< 5.0, >= 3.2.0) among 324 total gem(s)

Chef-run should respect wildcards in NO_PROXY

Description

When $ENV:NO_PROXY contains a domain wildcard a la "localhost,127.0.0.1,*.mysubdomain.mydomain.org", chef-run should respect this wildcard and not use the proxy for any target matching the wildcard. For users who are behind a proxy, this is invaluable for large numbers of targets. This way they don't have to explicitly be added to NO_PROXY.

Chef Workstation Version

0.2.48

Platform Version

Windows 10

ParentContainsErrorRecordException when opening chef dk

Description

Error occurs when opening Chef DK on windows 10.

At line:2 char:71
+ ... host).ui.rawui.windowtitle = 'Administrator: ChefDK (Cathal O'Brien)'
+                                                                   ~~~~~
Unexpected token 'Brien' in expression or statement.
At line:2 char:76
+ ... host).ui.rawui.windowtitle = 'Administrator: ChefDK (Cathal O'Brien)'
+                                                                        ~
Unexpected token ')' in expression or statement.
At line:2 char:77
+ ... host).ui.rawui.windowtitle = 'Administrator: ChefDK (Cathal O'Brien)'
+                                                                         ~
The string is missing the terminator: '.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

ChefDK Version

3.1.0
chef client version 14.2.0

Platform Version

Windows 10

Replication Case

It looks like the apostrophe in my name is causing the chef dk to error when opening.

At line:2 char:71
+ ... host).ui.rawui.windowtitle = 'Administrator: ChefDK (Cathal O'Brien)'
+                                                                   ~~~~~
Unexpected token 'Brien' in expression or statement.
At line:2 char:76
+ ... host).ui.rawui.windowtitle = 'Administrator: ChefDK (Cathal O'Brien)'
+                                                                        ~
Unexpected token ')' in expression or statement.
At line:2 char:77
+ ... host).ui.rawui.windowtitle = 'Administrator: ChefDK (Cathal O'Brien)'
+                                                                         ~
The string is missing the terminator: '.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

Cannot see chef module when executing Get-Module

Windows - Update Workstation msi installer to prevent installs on drives other than C:

Description

Can't bootstrap a node when ChefDK is installed on a drive other than C:. The ChefDK installer should prevent installation to drives other than C:.

Per notes in chef-boneyard/chef-client#461 installing ChefDK on drives other than C: is unsupported. The MSI installer should prevent installs to other volumes & installation docs @ https://docs.chef.io/install_dk.html updated.

ChefDK Version

12.18.31

Platform Version

Windows Server 2016

Replication Case

See chef-boneyard/chef-client#461

Stacktrace

See chef-boneyard/chef-client#461

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

chef-client runs slow from a Chef DK PowerShell prompt

Description

I'm relaying a report from a user who's getting started with Chef on an Azure instance. The user is going through Learn the basics, where you run chef-client --local-mode to get a feel for how Chef works. I understand this is not how you typically run Chef in practice.

This issue isn't directly related to Azure; it's simply where we discovered it. (running on a Standard DS1 v2 instance)

Given this basic recipe (call it web.rb)

powershell_script 'Install IIS' do
  code 'Add-WindowsFeature Web-Server'
  guard_interpreter :powershell_script
  not_if "(Get-WindowsFeature -Name Web-Server).Installed"
end

service 'w3svc' do
  action [:enable, :start]
end
  • It takes up to 40 minutes for chef-client --local-mode web.rb to complete when run from a Chef DK PowerShell prompt. (when IIS is not yet installed)
  • It takes 5 minutes to run the command a second time. (when IIS is already installed)
  • From a standard PowerShell prompt, it takes about a minute to run the recipe the first time; less than 10 seconds to run it again.
  • The underlying PowerShell commands complete in about the same time when run from a standard PowerShell prompt.

ChefDK Version

$ chef --version
Chef Development Kit Version: 2.0.28
chef-client version: 13.2.20
delivery version: master (17c1b0fed9be4c70f69091a6d21a4cbf0df60a23)
berks version: 6.2.0
kitchen version: 1.16.0
inspec version: 1.31.1

Platform Version

Windows Server 2012 R2 Datacenter

Replication Case

  1. Bring up 2 Windows Server instances. The issue was seen on Azure Standard DS1 v2 instances.
  2. On the first instance:
    1. Install Chef DK
    2. Add the recipe above to web.rb
    3. From a Chef DK PowerShell prompt, run chef-client --local-mode two times
    4. Note the time it takes to complete. We've seen 40 minutes for the first run; 5 minutes for the second.
  3. From the second instance:
    1. Repeat the steps from (2) but from a standard PowerShell prompt. We've seen 1 minute for the first run; < 10 seconds for the second.

--json-attributes causes JSON::ParserError from Chef DK prompt

Description

knife commands that use --json-attributes fail with JSON::ParserError from a Chef DK prompt but succeed from a standard PowerShell prompt. For example:

$ knife bootstrap windows winrm 54.84.99.135 --winrm-user Administrator --winrm-password 'masked' --json-attributes $public_ip

See this Gist for a side-by-side comparison:

https://gist.github.com/tpetchel/7ee1687f570769938c1886a81b362cc6

Impact: We demonstrate the use of --json-attributes on Learn Chef (example). We also encourage the use of the Chef DK command prompt.

ChefDK Version

$ chef --version
Chef Development Kit Version: 2.0.28
chef-client version: 13.2.20
delivery version: master (17c1b0fed9be4c70f69091a6d21a4cbf0df60a23)
berks version: 6.2.0
kitchen version: 1.16.0
inspec version: 1.31.1

Platform Version

Windows 10

Replication Case

See the above Gist.

Stacktrace

See the above Gist.

WinRM connections only work under 'bundle exec'

Description

I can get chef-run to manage an ad-hoc remote Windows node only if I bundle exec chef-run. The built packages do not appear to work.

Chef Workstation Version

master / 0.1.135

Platform Version

OSX workstation, Windows target

Replication Case

  1. Create an EC2 Windows Windows_Server-2016-English-Core-Base host
  2. In the user data for this host set a user and password with something like
net user /y /add chefws SomePasswordThatIsLong!!!
net localgroup Administrators /add chefws

The long password and exclamation points are required for the password security requirements

  1. Get the IP address of the host from the EC2 console
  2. Execute something like chef-run 'winrm://ec2user:[email protected]:5985' directory /tmp
  3. The command will not successfully connect to the host
  4. Check out master and bundle install
  5. bundle exec chef-run 'winrm://ec2user:[email protected]:5985' directory /tmp

Unfortunately this looks to be transient behavior - a very few times it did succeed using the installed package. I thought this was because it would work against the local vagrant Windows image and fail against the remote EC2 vagrant image, but this does not appear to be the case. It was actually just transiently succeeding.

It takes quite a long time for it to timeout with the WinRM::WinRMAuthorizationError

Client Output

[ - ] Generating local policyfile...
[ - ] Generated local policyfile
[ - ] [127.0.0.1] Connecting...
[ - ] [127.0.0.1] WinRM::WinRMAuthorizationError

CHEFINT001

An unexpected error has occurred:

  WinRM::WinRMAuthorizationError

If you are not able to resolve this issue, please contact Chef support
at [email protected] and include the log file and stack trace from the
locations below:

  /Users/tball/.chef-workstation/logs/default.log
  /Users/tball/.chef-workstation/logs/stack-trace.log

Stacktrace

2018-06-18 16:59:37 -0600: Error encountered while running the following:
  winrm://vagrant:[email protected]:5985 /Users/tball/github/chefws-chef-conf/cookbooks/my_nginx/recipes/dep.rb
Backtrace:
WinRM::WinRMAuthorizationError: WinRM::WinRMAuthorizationError
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/winrm-2.2.3/lib/winrm/http/response_handler.rb:58:in `raise_if_auth_error'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/winrm-2.2.3/lib/winrm/http/response_handler.rb:51:in `raise_if_error'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/winrm-2.2.3/lib/winrm/http/response_handler.rb:36:in `parse_to_xml'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/winrm-2.2.3/lib/winrm/http/transport.rb:186:in `send_request'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/winrm-2.2.3/lib/winrm/http/transport.rb:181:in `send_request'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/winrm-2.2.3/lib/winrm/shells/power_shell.rb:152:in `max_envelope_size_kb'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/winrm-2.2.3/lib/winrm/shells/power_shell.rb:80:in `max_fragment_blob_size'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/winrm-2.2.3/lib/winrm/shells/power_shell.rb:198:in `fragmenter'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/winrm-2.2.3/lib/winrm/shells/power_shell.rb:162:in `block in open_shell_payload'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/winrm-2.2.3/lib/winrm/shells/power_shell.rb:161:in `map'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/winrm-2.2.3/lib/winrm/shells/power_shell.rb:161:in `open_shell_payload'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/winrm-2.2.3/lib/winrm/shells/power_shell.rb:122:in `open_shell'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/winrm-2.2.3/lib/winrm/shells/base.rb:168:in `block in open'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/winrm-2.2.3/lib/winrm/shells/retryable.rb:37:in `retryable'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/winrm-2.2.3/lib/winrm/shells/base.rb:166:in `open'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/winrm-2.2.3/lib/winrm/shells/base.rb:129:in `with_command_shell'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/winrm-2.2.3/lib/winrm/shells/base.rb:81:in `run'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/train-1.4.4/lib/train/transports/winrm_connection.rb:103:in `run_command_via_connection'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/train-1.4.4/lib/train/transports/winrm_connection.rb:83:in `wait_until_ready'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.135/lib/chef-run/target_host.rb:56:in `connect!'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.135/lib/chef-run/cli.rb:501:in `do_connect'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.135/lib/chef-run/cli.rb:236:in `block in connect_target'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.135/lib/chef-run/ui/terminal.rb:83:in `block in render_job'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.135/lib/chef-run/ui/plain_text_element.rb:28:in `run'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.135/lib/chef-run/ui/terminal.rb:83:in `render_job'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.135/lib/chef-run/cli.rb:235:in `connect_target'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.135/lib/chef-run/cli.rb:246:in `run_single_target'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.135/lib/chef-run/cli.rb:211:in `perform_run'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.135/lib/chef-run/cli.rb:160:in `block in run'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.135/lib/chef-run/telemeter.rb:85:in `block in timed_capture'
        /opt/chef-workstation/embedded/lib/ruby/2.5.0/benchmark.rb:293:in `measure'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.135/lib/chef-run/telemeter.rb:85:in `timed_capture'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.135/lib/chef-run/telemeter.rb:74:in `timed_run_capture'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.135/lib/chef-run/cli.rb:158:in `run'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.135/lib/chef-run/startup.rb:151:in `start_chef_run'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.135/lib/chef-run/startup.rb:56:in `run'
        /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.135/bin/chef-run:23:in `<top (required)>'
        /usr/local/bin/chef-run:179:in `load'
        /usr/local/bin/chef-run:179:in `<main>'

Chef Workstation 2.53.1 on Windows pathing bug

Description

Start-chefws.ps1 fails to start properly. It throws the following error:

Import-Module : The specified module 'chef' was not loaded because no valid module file was found in any module directory.
At line:1 char:133
+ ... l | out-string | iex; Import-Module chef -DisableNameChecking;echo 'P ...
+                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (chef:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

In reviewing the script and the locations of the both the script and the module it's calling, the script is incorrectly locating the module and script roots. if the path is correctly specified, the chef.psm1 file loads correctly even though it has warnings itself.

Chef Workstation Version

2.53.1

Platform Version

Windows 10. Build 1809

RFE: Include `mdl`

Description

Can we include MarkdownLint in chefdk? It'd be great to be able to lint README.md's

ChefDK Version

Next

Platform Version

all

chef-workstation RPM doesn't set PATH properly

Description

Binary locations aren't added to the

[root@localhost ~]# yum install chef-workstation -y
[root@localhost ~]# bash -login
[root@localhost ~]# which irb
/usr/bin/which: no irb in (/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin)

Normally it's as simple as dropping a file in as /etc/profile.d/chef-workstation.sh:

::::::::::::::
/etc/profile.d/chef-workstation.sh
::::::::::::::
export PATH=$PATH:/opt/chef-workstation/embedded/bin

There are some concerns about precedence, and about a dozen ways to solve that; some of them effective. But if we run into that problem, we're already a step further than we are now.

Chef Workstation Version

chef-workstation-0.2.48-1.el6.x86_64

Platform Version

centos-release-7-6.1810.2.el7.centos.x86_64

Target Converge fails with no log

When trying to converge a new target node, it fails and does not log the error to the file mentioned in the error:

kreedy@Kevins-iMac:~/Projects/kevinreedy/test_cookbook$ chef target converge ssh://[email protected] recipes/default.rb
[✔] [ec2-34-234-85-86.compute-1.amazonaws.com] Connected.                                                                                                                            [✔] [ec2-34-234-85-86.compute-1.amazonaws.com] Successfully installed Chef client version 14.1.1
[✖] [ec2-34-234-85-86.compute-1.amazonaws.com] Failed to converge target.

CHEFCCR099

The converge of the remote host failed.

Please examine the log file for a detailed cause of failure.

If you are not able to resolve this issue, please contact Chef support
at [email protected] and include the log file from the location below:
  /Users/kreedy/.chef-workstation/logs/default.log

kreedy@Kevins-iMac:~/Projects/kevinreedy/test_cookbook$ cat /Users/kreedy/.chef-workstation/logs/default.log
kreedy@Kevins-iMac:~/Projects/kevinreedy/test_cookbook$ ls -l /Users/kreedy/.chef-workstation/logs/default.log
-rw-r--r--  1 kreedy  staff  0 May 11 10:35 /Users/kreedy/.chef-workstation/logs/default.log

This is the cookbook I'm trying to converge: kevinreedy/test_cookbook@92b3592

Running chef-run throws: `bash: - : invalid option`

Description

When I run chef-run to test it, it outputs the following error:

$ chef-run -i ~/.ssh/my_key [email protected] package ntp action=install
[✔] Generated local policyfile
[✔] [15x.xx.xx.xxx] Connected.
[✔] [15x.xx.xx.xxx] Chef client version 14.3.37 already installed on target.
[✖] [15x.xx.xx.xxx] The command 'bash -c 'd=$(mktemp -d -p${TMPDIR:-/tmp} chef_XXXXXX); chmod 777 $d; echo $d'' exited with return code '2' on '15x.xx.xx.xxx'.

CHEFRMT001

The command 'bash -c 'd=$(mktemp -d -p${TMPDIR:-/tmp} chef_XXXXXX); chmod 777 $d; echo $d'' exited with return code '2' on '15x.xx.xx.xxx'.

The following error was reported:

  bash: - : invalid option
Usage:	bash [GNU long option] [option] ...
	bash [GNU long option] [option] script-file ...
GNU long options:
	--debug
	--debugger
	--dump-po-strings
	--dump-strings
	--help
	--init-file
	--login
	--noediting
	--noprofile
	--norc
	--posix
	--rcfile
	--restricted
	--verbose
	--version
Shell options:
	-ilrsD or -c command or -O shopt_option		(invocation only)
	-abefhkmnptuvxBCHP or -o option


If you are not able to resolve this issue, please contact Chef support
at [email protected]

But the command doesn't throw an error if is executed manually on the target machine:

# bash -c 'd=$(mktemp -d -p${TMPDIR:-/tmp} chef_XXXXXX); chmod 777 $d; echo $d'
/tmp/chef_hCy7nW

Chef Workstation Version

$ chef -v
Chef Development Kit Version: 3.1.0
chef-client version: 14.2.0
delivery version: master (6862f27aba89109a9630f0b6c6798efec56b4efe)
berks version: 7.0.4
kitchen version: 1.22.0
inspec version: 2.1.72

$ chef-run --version
chef-run: 0.1.0

Platform Version

Chef Workstation is running on OSX El Capitan 10.11.6 and the target machine is an Ubuntu 14.04.5 LTS

I'm not sure if this the better place to report this, so if I have to do it somewhere else, tell me please.

SSH key configuration no longer read from ~/.ssh/config

Description

When Chef Workstation launched I could add configuration similar to the following to my ~/.ssh/config:

Host 192.168.33.51 ubuntu1
     IdentityFile /Users/tball/.ssh/new_key

When I ran chef-run user@ubuntu1 it would correctly read my configuration and I did not need to supply my key. It no longer does this.

This used to be a problem only with released version of our package and I could get it to successfully work from source with bundle exec. But this is no longer the case.

Chef Workstation Version

master

Platform Version

OSX

Stacktrace

2018-06-18 16:02:59 -0600: Error encountered while running the following:
  vagrant@ubuntu1 directory /tmp/foo
Backtrace:
Train::Transports::SSHFailed: SSH session could not be established
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/transports/ssh_connection.rb:157:in `rescue in establish_connection'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/transports/ssh_connection.rb:146:in `establish_connection'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/transports/ssh_connection.rb:236:in `session'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/transports/ssh_connection.rb:191:in `run_command_via_connection'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/plugins/base_connection.rb:108:in `run_command'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/platforms/detect/helpers/os_common.rb:36:in `command_output'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/platforms/detect/helpers/os_common.rb:43:in `unix_uname_s'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/platforms/detect/specifications/os.rb:35:in `block in load'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/platforms/detect/scanner.rb:46:in `instance_eval'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/platforms/detect/scanner.rb:46:in `block in scan_children'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/platforms/detect/scanner.rb:45:in `each'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/platforms/detect/scanner.rb:45:in `scan_children'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/platforms/detect/scanner.rb:33:in `block in scan'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/platforms/detect/scanner.rb:27:in `each'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/platforms/detect/scanner.rb:27:in `scan'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/platforms/detect.rb:9:in `scan'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/plugins/base_connection.rb:100:in `platform'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/extras/command_wrapper.rb:128:in `load'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/transports/ssh_connection.rb:46:in `initialize'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/transports/ssh.rb:196:in `new'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/transports/ssh.rb:196:in `create_new_connection'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/transports/ssh.rb:76:in `connection'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/target_host.rb:55:in `connect!'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/cli.rb:404:in `do_connect'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/cli.rb:139:in `block in connect_target'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/ui/terminal.rb:83:in `block in render_job'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/ui/plain_text_element.rb:28:in `run'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/ui/terminal.rb:83:in `render_job'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/cli.rb:138:in `connect_target'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/cli.rb:149:in `run_single_target'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/cli.rb:114:in `perform_run'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/cli.rb:63:in `block in run'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/telemeter.rb:85:in `block in timed_capture'
        /Users/tball/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/benchmark.rb:293:in `measure'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/telemeter.rb:85:in `timed_capture'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/telemeter.rb:74:in `timed_run_capture'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/cli.rb:61:in `run'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/startup.rb:152:in `start_chef_run'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/startup.rb:56:in `run'
        /Users/tball/github/chef-workstation/components/chef-run/bin/chef-run:23:in `<top (required)>'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bin/chef-run:23:in `load'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bin/chef-run:23:in `<main>'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bin/ruby_executable_hooks:15:in `eval'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bin/ruby_executable_hooks:15:in `<main>'
Caused by: Net::SSH::AuthenticationFailed: Authentication failed for user [email protected]
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/gems/net-ssh-4.2.0/lib/net/ssh.rb:254:in `start'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/train-daefae3357bd/lib/train/transports/ssh_connection.rb:153:in `establish_connection'
        ... 42 more

Unable to accept chef license.

When I try to run Chef in Test Kitchen I get the failure shown below. I installed Chef-Workstation from deb https://packages.chef.io/repos/apt/stable bionic main.

I've tried several methods for setting the license found on the chef licensing page, however none of them work.

  • chef --chef-license accept command: returns 'invalid option'.
  • CHEF_LICENSE=accept kitchen converge Did not do anything different then without the environment variable set.
  • Setting the node attribute via the kitchen.yml file didn't work either.
suites:
  - name: default
    run_list:
      - recipe[vpn::default]
    verifier:
      inspec_tests:
        - test/integration/default
    attributes:
      chef_client:
        chef_license: accept
  • I also tried the config.rb setting: chef_license = 'accept' to no avail.

In all cases, I received output similar to what is shown below.

hnelson@stallman:~/dev/chef/vpn$ kitchen converge
-----> Starting Kitchen (v1.24.0)
-----> Converging <default-ubuntu-1804>...
       Preparing files for transfer
       Preparing dna.json
       Resolving cookbook dependencies with Berkshelf 7.0.7...
       Removing non-cookbook files before transfer
       Preparing validation.pem
       Preparing client.rb
-----> Chef installation detected (install only if missing)
       Transferring files to <default-ubuntu-1804>
       +---------------------------------------------+
            Chef License Acceptance

       Before you can continue, 2 product licenses
       must be accepted. View the license at
       https://www.chef.io/end-user-license-agreement/

       Licenses that need accepting:
         * Chef Infra Client
         * Chef InSpec

       Do you accept the 2 product licenses (yes/no)?


       > Prompt timed out. Use non-interactive flags or enter an answer within 60 seconds.

       If you do not accept this license you will
       not be able to use Chef products.

       Do you accept the 2 product licenses (yes/no)?

       > Prompt timed out. Use non-interactive flags or enter an answer within 60 seconds.
       +---------------------------------------------+
       Chef Infra Client cannot execute without accepting the license
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Converge failed on instance <default-ubuntu-1804>.  Please see .kitchen/logs/default-ubuntu-1804.log for more details
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

hnelson@stallman:~/dev/chef/vpn$
hnelson@stallman:~/dev/chef/vpn$ chef --chef-license accept
invalid option: --chef-license
Usage:
    chef -h/--help
    chef -v/--version
    chef command [arguments...] [options...]


Available Commands:
    exec                    Runs the command in context of the embedded ruby
    env                     Prints environment variables used by ChefDK
    gem                     Runs the `gem` command in context of the embedded ruby
    generate                Generate a new app, cookbook, or component
    shell-init              Initialize your shell to use ChefDK as your primary ruby
    install                 Install cookbooks from a Policyfile and generate a locked cookbook set
    update                  Updates a Policyfile.lock.json with latest run_list and cookbooks
    push                    Push a local policy lock to a policy group on the server
    push-archive            Push a policy archive to a policy group on the server
    show-policy             Show policyfile objects on your Chef Server
    diff                    Generate an itemized diff of two Policyfile lock documents
    provision               Provision VMs and clusters via cookbook
    export                  Export a policy lock as a Chef Zero code repo
    clean-policy-revisions  Delete unused policy revisions on the server
    clean-policy-cookbooks  Delete unused policyfile cookbooks on the server
    delete-policy-group     Delete a policy group on the server
    delete-policy           Delete all revisions of a policy on the server
    undelete                Undo a delete command
    describe-cookbook       Prints cookbook checksum information used for cookbook identifier
hnelson@stallman:~/dev/chef/vpn$ chef --version
Chef Workstation: 0.2.53
  chef-run: 0.2.8
  chef-client: 14.10.9
  delivery-cli: 0.0.52 (9d07501a3b347cc687c902319d23dc32dd5fa621)
  berks: 7.0.7
  test-kitchen: 1.24.0
  inspec: 3.6.6
hnelson@stallman:~/dev/chef/vpn$

chefdk got automatically updated to chef-workstation on a machine with chef yum repos configured

YUM update o/p

image

Repo file:

~ (aws:none)(kc:none)$ cat /etc/yum.repos.d/chef-stable.repo 
[chef-stable]
name=chef-stable
baseurl=https://packages.chef.io/repos/yum/stable/el/7/$basearch/
gpgkey=https://packages.chef.io/chef.asc
gpgcheck=1
enabled=1

~ (aws:none)(kc:none)$ 

This completely removed /opt/chefdk and created /opt/chef-workstation and is now missing all symlinks from /opt/chef-workstation/bin to /usr/bin

First run does not create ~/.chef-workstation

Chef Workstation Version

0.1.133

Platform Version

macOS 10.13.5

Replication Case

On a fresh first-time install running chef-run complains about ~/.chef-workstation/config.toml not existing

$ chef-run ubuntu1 directory /tmp/foo
Creating config file in /Users/jvogt/.chef-workstation/config.toml.

Traceback (most recent call last):
  11: from /usr/local/bin/chef-run:179:in `<main>'
  10: from /usr/local/bin/chef-run:179:in `load'
   9: from /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.133/bin/chef-run:23:in `<top (required)>'
   8: from /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.133/lib/chef-run/startup.rb:36:in `run'
   7: from /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.133/lib/chef-run/startup.rb:89:in `first_run_tasks'
   6: from /opt/chef-workstation/embedded/lib/ruby/gems/2.5.0/gems/chef-run-0.1.133/lib/chef-run/startup.rb:96:in `create_default_config'
   5: from /opt/chef-workstation/embedded/lib/ruby/2.5.0/fileutils.rb:1051:in `touch'
   4: from /opt/chef-workstation/embedded/lib/ruby/2.5.0/fileutils.rb:1051:in `each'
   3: from /opt/chef-workstation/embedded/lib/ruby/2.5.0/fileutils.rb:1053:in `block in touch'
   2: from /opt/chef-workstation/embedded/lib/ruby/2.5.0/fileutils.rb:1057:in `rescue in block in touch'
   1: from /opt/chef-workstation/embedded/lib/ruby/2.5.0/fileutils.rb:1057:in `open'
/opt/chef-workstation/embedded/lib/ruby/2.5.0/fileutils.rb:1057:in `initialize': No such file or directory @ rb_sysopen - /Users/jvogt/.chef-workstation/config.toml (Errno::ENOENT)

Resolution is to manually create the ~/.chef-workstation directory:

$ mkdir ~/.chef-workstation
$ chef-run ubuntu1 directory /tmp/foo
[✔] [ubuntu1] Connected.
...

Running 0.1.133

$ chef-run --version
chef-run: 0.1.133

Feature Request: get target nodes from chef-server

This is a feature request(todo) and something to think about. Would be great to get a list of target nodes(names to display and IPs for connection with -a ipaddress) from chef-server by using a query, similar to knife ssh QUERY COMMAND (options)

Examples:
chef-run -t 'roles:www AND chef_environment:dev' -a ipaddress package ntp action=install
chef-run -t 'roles:www AND chef_environment:dev' -a ipaddress service httpd action=restart
or
chef-run 'Q@roles:www AND chef_environment:dev' -a ipaddress service httpd action=restart

Windows domain in http_proxy causes failure

Description

https_proxy='https://domain\user:1234@hostname:8080/' be chef-run vagrant@ubuntu1 package ntp action=install raises the following stack trace:

2018-05-30 16:09:49 -0600: Error encountered while running the following:
  vagrant@ubuntu1 package ntp action=install -i ./.vagrant/machines/ubuntu1/virtualbox/private_key
Backtrace:
ChefDK::PolicyfileInstallError: Failed to generate Policyfile.lock
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/chef-dk-148826310ae9/lib/chef-dk/policyfile_services/install.rb:113:in `rescue in generate_lock_and_install'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/chef-dk-148826310ae9/lib/chef-dk/policyfile_services/install.rb:92:in `generate_lock_and_install'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/chef-dk-148826310ae9/lib/chef-dk/policyfile_services/install.rb:62:in `run'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/cli.rb:403:in `create_local_policy'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/cli.rb:228:in `perform_run'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/cli.rb:152:in `block in run'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/telemeter.rb:85:in `block in timed_capture'
        /Users/tball/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/benchmark.rb:293:in `measure'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/telemeter.rb:85:in `timed_capture'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/telemeter.rb:74:in `timed_run_capture'
        /Users/tball/github/chef-workstation/components/chef-run/lib/chef-run/cli.rb:150:in `run'
        /Users/tball/github/chef-workstation/components/chef-run/bin/chef-run:22:in `<top (required)>'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bin/chef-run:23:in `load'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bin/chef-run:23:in `<main>'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bin/ruby_executable_hooks:15:in `eval'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bin/ruby_executable_hooks:15:in `<main>'
Caused by: URI::InvalidURIError: bad URI(is not URI?): https://domain\user:1234@hostname:8080/
        /Users/tball/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/uri/rfc3986_parser.rb:67:in `split'
        /Users/tball/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/uri/rfc3986_parser.rb:73:in `parse'
        /Users/tball/.rvm/rubies/ruby-2.5.1/lib/ruby/2.5.0/uri/common.rb:237:in `parse'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/gems/chef-config-14.1.12/lib/chef-config/config.rb:1015:in `proxy_uri'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/gems/chef-14.1.12/lib/chef/http/basic_client.rb:103:in `proxy_uri'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/gems/chef-14.1.12/lib/chef/http/basic_client.rb:133:in `http_client_builder'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/gems/chef-14.1.12/lib/chef/http/basic_client.rb:112:in `build_http_client'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/gems/chef-14.1.12/lib/chef/http/basic_client.rb:50:in `http_client'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/gems/chef-14.1.12/lib/chef/http/basic_client.rb:69:in `request'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/gems/chef-14.1.12/lib/chef/http.rb:372:in `block in send_http_request'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/gems/chef-14.1.12/lib/chef/http.rb:411:in `block in retrying_http_errors'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/gems/chef-14.1.12/lib/chef/http.rb:409:in `loop'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/gems/chef-14.1.12/lib/chef/http.rb:409:in `retrying_http_errors'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/gems/chef-14.1.12/lib/chef/http.rb:365:in `send_http_request'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/gems/chef-14.1.12/lib/chef/http.rb:149:in `request'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/gems/chef-14.1.12/lib/chef/http.rb:115:in `get'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/chef-dk-148826310ae9/lib/chef-dk/policyfile/community_cookbook_source.rb:88:in `full_community_graph'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/chef-dk-148826310ae9/lib/chef-dk/policyfile/community_cookbook_source.rb:56:in `universe_graph'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/chef-dk-148826310ae9/lib/chef-dk/policyfile_compiler.rb:291:in `block in remote_artifacts_graph'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/chef-dk-148826310ae9/lib/chef-dk/policyfile_compiler.rb:290:in `each'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/chef-dk-148826310ae9/lib/chef-dk/policyfile_compiler.rb:290:in `remote_artifacts_graph'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/chef-dk-148826310ae9/lib/chef-dk/policyfile_compiler.rb:266:in `artifacts_graph'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/chef-dk-148826310ae9/lib/chef-dk/policyfile_compiler.rb:234:in `block in graph'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/chef-dk-148826310ae9/lib/chef-dk/policyfile_compiler.rb:233:in `tap'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/chef-dk-148826310ae9/lib/chef-dk/policyfile_compiler.rb:233:in `graph'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/chef-dk-148826310ae9/lib/chef-dk/policyfile_compiler.rb:229:in `graph_solution'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/chef-dk-148826310ae9/lib/chef-dk/policyfile_compiler.rb:176:in `install'
        /Users/tball/.rvm/gems/ruby-2.5.1@chef-workstation/bundler/gems/chef-dk-148826310ae9/lib/chef-dk/policyfile_services/install.rb:100:in `generate_lock_and_install'
        ... 14 more

Chef Workstation Version

0.1.126

Platform Version

Mac OSX

Configuration values are not respected when defaults are used in options

Description

When a custom configuration value is defined in config.toml, and the CLI option sets a default value to the configuration value, the customized default value is ignored.

Chef Workstation Version

0.1.120

Platform Version

n/a

Replication Case

  1. Set config option connection.winrm.ssl to true
  2. run chef-run -h
  3. output will contain a default cookbook repo path other than the provide value.

Client Output

grep ssl ~/.chef-workstation/config.toml
ssl=true

chef-run -h
-- snip

    -s, --[no-]ssl                     Use SSL for WinRM. Current default: false

Ruby #! path is assumed to be default on windows install

Description

On a windows install, changing only the destination drive, the #! path of tools in bin does not respect the install path. Tools end up with '#!C:/opscode/chef-workstation/embedded/bin/ruby.exe --disable-gems' instead of the destination install path (D:/opscode in this case)

Chef Workstation Version

chef-workstation 0.2.48 (latest installer download as of 2019-02-27)

Platform Version

Windows 10 Pro w/ git-bash terminal

Remove dep_selector/Gecode

Description

Policyfiles no longer use the gecode solver, and Berks can optionally use molinillo. The reason we still have the gecode solver is because it's used in the Chef Server and in some cases gecode picks weird dependency solutions, so we want Berks to pick those same solutions as well. The result of this is that we eat a huge amount of pain compiling gecode everywhere just to support a workflow that's pretty broken. We should instead encourage users to find a cookbook locking mechanism that works for them (policyfiles, environments). Another way to go would be to switch Chef Server to molinillo and have a major release.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.