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-2621 Add license command usage notes #3132

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion docs-chef-io/content/workstation/ctl_chef.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down
5 changes: 5 additions & 0 deletions docs-chef-io/content/workstation/knife_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.