Skip to main content

License Chef Workstation

Chef Workstation requires a valid Progress Chef license for certain operations. This page describes licensing requirements and how to configure a license for Chef Workstation components.

Licensing requirements

Different Chef Workstation components have different licensing requirements:

  • Knife 19: Requires a license for bootstrapping Chef Infra Client 18 and earlier
  • Test Kitchen Enterprise: Uses a license to execute tests but doesn’t enforce licensing

Get a license

You can use any license that includes Chef Workstation entitlement. This includes free, trial, or commercial licenses.

To get a license, visit the Progress Chef community portal.

For more information, see the Chef licensing documentation.

Add a license to Workstation

If you’ve set a license for Chef Workstation, Test Kitchen Enterprise and Knife 19 automatically read and use it to execute tests or during bootstrap operations.

You can apply a license to Chef Workstation in two ways:

  • Set the license key in an environment variable
  • Save the license key in the licenses.yml file

Set the license as an environment variable

To configure the license key in your shell:

export CHEF_LICENSE_KEY="<LICENSE_KEY>"

Replace <LICENSE_KEY> with your license key.

Save the license in the licenses.yml file

You can add your license to the ~/.chef/licenses.yml file. For example:

---
:file_format_version: 4.0.0
:licenses:
- :license_key: <LICENSE_KEY>
  :license_type: :free
  :update_time: '2024-10-23T15:02:53+05:30'
  :license_server_url: https://services.chef.io/licensing

Replace <LICENSE_KEY> with your license key.

Add a license to Test Kitchen Enterprise

Test Kitchen Enterprise doesn’t enforce licensing, but it uses a license to execute tests.

How Test Kitchen Enterprise uses licenses

During the converge phase, Test Kitchen Enterprise transfers the license to the virtual machine (VM) and adds it as an argument to Chef Infra Client. Chef Infra Client validates the license and saves it on the provisioned VM for future use.

During the verification phase, the kitchen-inspec plugin transmits the license to Chef InSpec, which validates it with Chef’s licensing service.

Chef Infra Client 19 and Chef InSpec 7 support optional licensing. Test Kitchen Enterprise can prompt you for a license, activate it, and store it securely on disk. The license can also be transmitted to the provisioned VM during the verification phase.

Add a license

Test Kitchen Enterprise automatically reads a license that’s configured for Chef Workstation through:

  • The ~/.chef/licenses.yml file
  • The CHEF_LICENSE_KEY environment variable

You can also configure a license specifically for Test Kitchen Enterprise with:

  • The kitchen.yml configuration file
  • The test-kitchen CLI

Add a license with the kitchen.yml file

To include the license in your kitchen.yml file:

provisioner:
  name: chef_infra
  product_name: chef
  chef_license: accept-no-persist
  chef_license_key: <LICENSE_KEY>

Replace <LICENSE_KEY> with your license key.

The chef_license setting indicates acceptance of the End User License Agreement.

Add a license using the CLI

To add a license using the test-kitchen CLI:

  1. Run the license command:

    sudo kitchen license
    
  2. At the first prompt, select I already have a license ID.

  3. Enter your license key at the second prompt.

    Test Kitchen Enterprise validates the license and saves it to disk.

Verify your Test Kitchen Enterprise license

To verify that a valid license is saved on disk:

kitchen license

This command verifies that a license exists on disk, validates it with the licensing server, and displays the license details. If there isn’t a valid license, it prompts you to activate one.

To display details of all licenses stored on disk:

kitchen license list

Add a license to Knife

Knife 19 requires a license for bootstrapping Chef Infra Client 18 and earlier. Chef Infra Client 19 RC3 doesn’t require a license because it’s distributed through pre-signed URLs.

How Knife uses licenses

During bootstrap operations, Knife transfers the license to the target node and adds it as an argument to Chef Infra Client. Chef Infra Client validates the license and saves it on the provisioned node for future use.

Add a license

Knife automatically reads a license that’s configured locally for Chef Workstation through:

  • The ~/.chef/licenses.yml file
  • The CHEF_LICENSE_KEY environment variable

You can also configure a license specifically for Knife with:

  • The knife license CLI command
  • The --chef-license-key command line option

Add a license using the CLI

To add a license using the knife license CLI:

  1. Run the license command:

    knife license
    
  2. At the first prompt, select I already have a license ID.

  3. Enter your license key at the second prompt.

Knife validates the license and saves it to disk.

Verify your Knife license

To verify that a valid license is saved on disk:

knife license

This command verifies that a license exists on disk, validates it with the licensing server, and displays the license details. If there isn’t a valid license, it prompts you to activate one.

To display details of all licenses stored on disk:

knife license list

Add a license key with a command line option

When bootstrapping a node, you can save the license key and pass it to Chef Infra Client with the --chef-license-key command line option. For example:

knife bootrap <URL> \
  --chef-license-key <LICENSE_KEY>
  ...

More information

Thank you for your feedback!

×