diff --git a/docs-chef-io/content/workstation/ctl_chef.md b/docs-chef-io/content/workstation/ctl_chef.md index 6ecb9fe6d..4fa5da536 100644 --- a/docs-chef-io/content/workstation/ctl_chef.md +++ b/docs-chef-io/content/workstation/ctl_chef.md @@ -24,7 +24,10 @@ The chef executable is a command-line tool that does the following: {{< note >}} -By default, the cookbook cache is located in `~/.chef-workstation` on macOS and Linux, and in `%LOCALAPPDATA%\chef-workstation` on Windows. +1. To run chef commands in Chef Workstation, you need an active license installed on the system. Please refer to the license command +[documentation](/workstation/ctl_chef/#chef-license) or run `chef license --help` to know more. + +1. By default, the cookbook cache is located in `~/.chef-workstation` on macOS and Linux, and in `%LOCALAPPDATA%\chef-workstation` on Windows. On macOS or Linux, set the desired location of the cache directory by setting the `CHEF_WORKSTATION_HOME` environment variable in your `.bashrc` or `zshrc` file. For example, `CHEF_WORKSTATION_HOME="~/.workstation"`. On Windows, use the `setx` [command](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/setx) @@ -777,6 +780,22 @@ This subcommand has the following options: None. +## chef license + +{{% chef-workstation/ctl_chef_license %}} + +### Syntax + +{{% chef-workstation/ctl_chef_license_syntax %}} + +### Options + +{{% chef-workstation/ctl_chef_license_options %}} + +### Examples + +None. + ## chef report cookbooks Use the `chef report cookbooks` subcommand to generate a cookbook-oriented report for your Chef Infra environment. diff --git a/docs-chef-io/content/workstation/knife_setup.md b/docs-chef-io/content/workstation/knife_setup.md index 3a3bd6f45..0ec380bfe 100644 --- a/docs-chef-io/content/workstation/knife_setup.md +++ b/docs-chef-io/content/workstation/knife_setup.md @@ -154,6 +154,11 @@ In a script for Windows, use: `%USERPROFILE%\chef-repo\.chef`. Use `knife configure` command to generate your initial `config.rb` file in your home directory. See [knife configure](/workstation/knife_configure/) for details. +## License Prerequisite + +To run knife commands in Chef Workstation, you need an active license installed on the system. Please refer to the license command +[documentation](/workstation/ctl_chef/#chef-license) or run `chef license --help` to know more. + ## Setting Your Text Editor Some knife commands, such as `knife data bag edit`, require that information be edited as JSON data using a text editor. For example, the following command: diff --git a/docs-chef-io/layouts/shortcodes/chef-workstation/ctl_chef_license.md b/docs-chef-io/layouts/shortcodes/chef-workstation/ctl_chef_license.md new file mode 100644 index 000000000..8e889c7f5 --- /dev/null +++ b/docs-chef-io/layouts/shortcodes/chef-workstation/ctl_chef_license.md @@ -0,0 +1,5 @@ +Use the `chef license` subcommand to update license information on the +system or to display the already installed license(s). Chef Workstation +requires an active license to allow execution of `chef` and `knife` commands. +More information on Chef licensing can be obtained in +[About Chef Licenses](/chef_license/) page. \ No newline at end of file diff --git a/docs-chef-io/layouts/shortcodes/chef-workstation/ctl_chef_license_options.md b/docs-chef-io/layouts/shortcodes/chef-workstation/ctl_chef_license_options.md new file mode 100644 index 000000000..cebbf69ce --- /dev/null +++ b/docs-chef-io/layouts/shortcodes/chef-workstation/ctl_chef_license_options.md @@ -0,0 +1,9 @@ +This subcommand has the following options: + +`--chef-license-key LICENSE` + +: Add a new license key to accept and store in the system + +`-h`, `--help` + +: Show help for the command. \ No newline at end of file diff --git a/docs-chef-io/layouts/shortcodes/chef-workstation/ctl_chef_license_syntax.md b/docs-chef-io/layouts/shortcodes/chef-workstation/ctl_chef_license_syntax.md new file mode 100644 index 000000000..fc97f7b74 --- /dev/null +++ b/docs-chef-io/layouts/shortcodes/chef-workstation/ctl_chef_license_syntax.md @@ -0,0 +1,23 @@ +This subcommand has the following syntax: + +```bash +chef license +``` + +Run this command to display a summary of license(s) installed +on the system. If no licenses are detected, the command will +prompt the user for license information. + +```bash +chef license add +``` + +Run this command to create & install a Free/ Trial license or +install a Commercial license on the system. + +```bash +chef license list +``` + +Run this command to list details of the license(s) installed +on the system.