Skip to content

CHEF-12701: Create Chef Infra Licensing Information & Troubleshooting Page #4298

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

Closed
wants to merge 3 commits into from
Closed
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
188 changes: 188 additions & 0 deletions content/license.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
+++
title = "License"
draft = false
gh_repo = "chef-web-docs"

[menu]
[menu.infra]
title = "License"
identifier = "chef_infra/License"
parent = "chef_infra"
weight = 80
+++


## Licensing Information

Before running Chef Infra, you must accept the Chef EULA and add a license key.

Chef Infra accepts a license key using one of two methods:

- by setting a license key with an [environment variable or using the Infra CLI](#license-key)
- by retrieving a license key from a [Chef Local License Service URL](#chef-local-license-service)

For more information on Chef licenses, see [Chef's licensing documentation](/licensing/).

You can [request a trial license](https://www.chef.io/license-generation-free-trial) if you'd like to try out Infra.

## Accept the Chef EULA

You must accept the [Chef End User License Agreement (EULA)](https://www.chef.io/end-user-license-agreement) before running Chef Infra using one of two methods.

- [command line option](#command-line-option)
- [environment variable](#environment-variable)

If no command line argument or environment variable is set, Chef Infra requests acceptance through an interactive prompt. If the prompt can't be displayed, then the product will fail with exit code 172.

If the product attempts to persist the accepted license and fails, Chef Infra sends a message to STDOUT and continues to run. In a future invocation, you will need to accept the license again.

### Command line option

Use the `--chef-license <value>` argument to accept the Chef EULA.

Replace `<value>` with one of the following options.

`accept`
: Accept the license and attempts to persist a marker file locally. Persisting these marker files means future invocations don't require accepting the license again.

`accept-silent`
: Similar to `accept`, but no messaging is sent to STDOUT.

`accept-no-persist`
: Similar to `accept-silent`, but no marker file is persisted. Future invocation will require accepting the license again.

### Environment variable

Use the `CHEF_LICENSE="<value>"` environment variable to accept the Chef EULA.

Replace `<value>` with one of the following options.

`accept`
: Accept the license and attempts to persist a marker file locally. Persisting these marker files means future invocations don't require accepting the license again.

`accept-silent`
: Similar to `accept`, but no messaging is sent to STDOUT.

`accept-no-persist`
: Similar to `accept-silent`, but no marker file is persisted. Future invocation will require accepting the license again.

## License key

You can add a license key to Chef Infra using one of three methods:

- [interactive license dialog](#interactive-license-dialog)
- [command line option](#command-line-option-1)
- [environment variable](#environment-variable-1)

{{< note >}}

Existing commercial customers of Progress Chef may use an asset serial number from the [Progress support portal](https://community.progress.com/s/products/chef) as a license key.

{{< /note >}}

### Interactive license dialog

The easiest way to provide a license key to Chef Infra is to run Chef Infra.
Start a run and Infra will start an interactive licensing dialog
if no license key is already set and it doesn't detect an automated method of setting the license key.

1. To start the interactive licensing dialog, start a run

1. At the first prompt, select **I already have a license ID**.

```bash
------------------------------------------------------------
License ID Validation

To continue using Chef Infra, a license ID is required.
(Free, Trial, or Commercial)

If you generated a license previously, you might
have received it in an email.

If you are a commercial user, you can also find it in the
https://community.progress.com/s/products/chef portal.
------------------------------------------------------------

Please choose one of the options below (Press ↑/↓ arrow to move and Enter to select)
‣ I already have a license ID
I don't have a license ID and would like to generate a new license ID
Skip
```

1. Enter your license key at the second prompt.

```bash
Please choose one of the options below I already have a license ID
Please enter your license ID: <LICENSE_KEY>
✔ [Success] License validated successfully.
------------------------------------------------------------
License Details
Asset Name : Infra
License ID : <LICENSE_KEY>
Type : Trial
Status : Active
Validity : Unlimited
No. Of Units : 10 Targets
------------------------------------------------------------
```

Chef Infra validates the license key, displays information about the license entitlements, and then executes the run.
Chef Infra stores license keys for future use and will not prompt you for the license key for the duration of your license.

### Command line option

You can set the license key in the command line using the `--chef-license-key` option.
You may provide this argument to most Chef Infra CLI main commands.

### Environment variable

You can set the license key using the `CHEF_LICENSE_KEY` environment variable.
Chef Infra will read the license key from the variable and attempt to validate the key.
If successful, Infra saves the key and will not prompt you for it the next time you run Infra.

```bash
export CHEF_LICENSE_KEY=<LICENSE_KEY>
```

## Chef Local License Service

For large or isolated (air-gapped) fleets, Chef Infra can retrieve a license key from a [Chef Local License Service](/licensing/local_license_service/).
With Chef Local License Service, Infra users do not need to know a license key---only the service URL(s).

Chef Infra sends a request to the Local License Service for a list of license keys and then uses that response to license itself during execution.
Infra will not prompt you for a license key.
Chef Infra does not store license keys for long-term use when they are retrieved from a Chef Local License Service.

Use one of the following methods to set a Local License Service URL.

- [command line option](#command-line-option-2)
- [environment variable](#environment-variable-2)

### Command line option

Use the `--chef-license-server` command line option to set a Chef Local License Service URL.

```bash
--chef-license-server https://license-server.example.com
```

### Environment variable

Use the `CHEF_LICENSE_SERVER` environment variable to set a Chef Local License Service URL.

```bash
export CHEF_LICENSE_SERVER=https://license-server.example.com
```

#### Multiple license servers

You can set multiple Chef Local License Services, which provides resiliency and redundancy for managing licenses.

Enter up to five Chef Local License Service URLs as a comma-separated list. Chef Infra will try each URL and use the first one that works.

```bash
export CHEF_LICENSE_SERVER=https://license-server-01.example.com,https://license-server-02.example.com
```

This capability is basic and you must synchronize the license servers, otherwise you may get inconsistent results.
66 changes: 66 additions & 0 deletions content/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
+++
title = "Troubleshooting"
draft = false
gh_repo = "chef-web-docs"

[menu]
[menu.infra]
title = "Troubleshooting"
identifier = "chef_infra/Troubleshooting"
parent = "chef_infra"
weight = 80
+++

## License is not entitled to use Infra

The license key set with Chef Infra is not entitled to use Chef Infra. Each license key is entitled to one or more Chef products. To view the products that your key is entitled to, run the `chef-client license list` command, which will list your license entitlements.

To resolve this issue, set a license key that is entitled to Chef Infra.

See the [Chef Licensing documentation](/licensing/) for more information.

## Unable to connect to the licensing server. Infra requires server communication to operate

Chef Infra cannot connect to Chef's licensing service or a user-deployed Chef Local License Service.
This service is responsible for validating the Chef license key set with Chef Infra.

Check the following possible causes of this issue:

- Network Connectivity

Ensure that the machine running Chef Infra has proper network connectivity. It should be able to connect to Chef's licensing service or a user-deployed Chef Local License Service. This includes checking firewall settings and network configuration.

- Service Availability

If you're using a user-deployed Chef Local License Service, verify that it's correctly configured and operational. Any misconfigurations or issues with the Chef Local License Service could lead to connection problems.

- URL Configuration

If you're using a Chef Local License Service to manage Chef licenses, verify that the URL to the server is correct.

If you configured the URL using an environment variable, check the value for environment variable `CHEF_LICENSE_SERVER` to confirm the configured URL.

If you configured the URL using the `--chef-license-server` Infra CLI option, reset the URL using the same Infra CLI option.

- Logs and Debugging

Check the logs generated by Chef Infra by using `--log-level debug` for more detailed error messages. Pay close attention to the URL that Chef Infra is attempting to connect to.

If the issue persists, please reach out to Chef's Customer Success managers or Support Team.

## Invalid File Format Version

Chef licensing data is stored on the `$HOME/.chef/licenses.yaml` file.

The file format version used in the `licenses.yaml` file is unsupported or invalid.
The `licenses.yaml` file must have the latest supported file format version.

Restore the file to the original state to resolve this issue.

## License file contents are corrupted

Chef licensing data is stored on the `$HOME/.chef/licenses.yaml` file.

The `licenses.yaml` file is malformed and corrupt.

Restore the file content to its original state to resolve this issue.
Loading