From 9378144f319f61a0fd47e64ef8ed9b9750e50621 Mon Sep 17 00:00:00 2001 From: Vikram Karve Date: Fri, 30 Jun 2023 17:36:19 +0530 Subject: [PATCH 1/6] Add license command usage notes Signed-off-by: Vikram Karve --- docs-chef-io/content/workstation/ctl_chef.md | 16 +++++++++++++ .../chef-workstation/ctl_chef_license.md | 5 ++++ .../ctl_chef_license_options.md | 9 ++++++++ .../ctl_chef_license_syntax.md | 23 +++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 docs-chef-io/layouts/shortcodes/chef-workstation/ctl_chef_license.md create mode 100644 docs-chef-io/layouts/shortcodes/chef-workstation/ctl_chef_license_options.md create mode 100644 docs-chef-io/layouts/shortcodes/chef-workstation/ctl_chef_license_syntax.md diff --git a/docs-chef-io/content/workstation/ctl_chef.md b/docs-chef-io/content/workstation/ctl_chef.md index 6ecb9fe6d..5e566eead 100644 --- a/docs-chef-io/content/workstation/ctl_chef.md +++ b/docs-chef-io/content/workstation/ctl_chef.md @@ -777,6 +777,22 @@ This subcommand has the following options: None. +### chef license + +{{% chef-workstation/ctl_chef_license %}} + +#### Syntax + +{{% chef-workstation/ctl_chef_generate_license_syntax %}} + +#### Options + +{{% chef-workstation/ctl_chef_generate_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/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..e923b4bed --- /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] +(https://docs.chef.io/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. From 5c23c3e272610241a6f854e7fb684bdc786782c4 Mon Sep 17 00:00:00 2001 From: Vikram Karve Date: Fri, 30 Jun 2023 17:40:58 +0530 Subject: [PATCH 2/6] fix shortcode typo Signed-off-by: Vikram Karve --- docs-chef-io/content/workstation/ctl_chef.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs-chef-io/content/workstation/ctl_chef.md b/docs-chef-io/content/workstation/ctl_chef.md index 5e566eead..787f76f97 100644 --- a/docs-chef-io/content/workstation/ctl_chef.md +++ b/docs-chef-io/content/workstation/ctl_chef.md @@ -783,11 +783,11 @@ None. #### Syntax -{{% chef-workstation/ctl_chef_generate_license_syntax %}} +{{% chef-workstation/ctl_chef_license_syntax %}} #### Options -{{% chef-workstation/ctl_chef_generate_license_options %}} +{{% chef-workstation/ctl_chef_license_options %}} #### Examples From 16f606cf55a3a7768ba40d280f0e57a753be6485 Mon Sep 17 00:00:00 2001 From: Vikram Karve Date: Fri, 30 Jun 2023 17:47:08 +0530 Subject: [PATCH 3/6] fix markdown heading typo Signed-off-by: Vikram Karve --- docs-chef-io/content/workstation/ctl_chef.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs-chef-io/content/workstation/ctl_chef.md b/docs-chef-io/content/workstation/ctl_chef.md index 787f76f97..17d92887b 100644 --- a/docs-chef-io/content/workstation/ctl_chef.md +++ b/docs-chef-io/content/workstation/ctl_chef.md @@ -777,19 +777,19 @@ This subcommand has the following options: None. -### chef license +## chef license {{% chef-workstation/ctl_chef_license %}} -#### Syntax +### Syntax {{% chef-workstation/ctl_chef_license_syntax %}} -#### Options +### Options {{% chef-workstation/ctl_chef_license_options %}} -#### Examples +### Examples None. From 7c4b562cd4cb8f775a3f46cb1316b5188c6b8920 Mon Sep 17 00:00:00 2001 From: Vikram Karve Date: Fri, 30 Jun 2023 17:56:04 +0530 Subject: [PATCH 4/6] fix link Signed-off-by: Vikram Karve --- .../layouts/shortcodes/chef-workstation/ctl_chef_license.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 index e923b4bed..8e889c7f5 100644 --- a/docs-chef-io/layouts/shortcodes/chef-workstation/ctl_chef_license.md +++ b/docs-chef-io/layouts/shortcodes/chef-workstation/ctl_chef_license.md @@ -1,5 +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] -(https://docs.chef.io/chef_license/) page. \ No newline at end of file +More information on Chef licensing can be obtained in +[About Chef Licenses](/chef_license/) page. \ No newline at end of file From 098f3e6aba84d716a3307231e814e84a66229fe8 Mon Sep 17 00:00:00 2001 From: Vikram Karve Date: Fri, 30 Jun 2023 19:58:05 +0530 Subject: [PATCH 5/6] Add license section in knife doc Signed-off-by: Vikram Karve --- docs-chef-io/content/workstation/knife_setup.md | 5 +++++ 1 file changed, 5 insertions(+) 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: From c4d6038ad32981668ff6967f0e8de4ce3fcfbbaf Mon Sep 17 00:00:00 2001 From: Vikram Karve Date: Fri, 30 Jun 2023 20:02:58 +0530 Subject: [PATCH 6/6] Add license section in chef exec doc Signed-off-by: Vikram Karve --- docs-chef-io/content/workstation/ctl_chef.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs-chef-io/content/workstation/ctl_chef.md b/docs-chef-io/content/workstation/ctl_chef.md index 17d92887b..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)