Skip to content
Merged
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
287 changes: 106 additions & 181 deletions content/install.md
Original file line number Diff line number Diff line change
@@ -1,260 +1,185 @@
+++
title = "Install Chef Workstation"
title = "Chef Workstation install guide"
draft = false


[menu]
[menu.install]
title = "Install"
identifier = "install.md Install Chef Workstation"
identifier = "install.md Chef Workstation install guide"
weight = 10
+++

{{< readfile file="/content/reusable/md/workstation_modularize.md" >}}

## System requirements

Chef Workstation has the following requirements:
The Chef Workstation native installers provide an efficient way to install Chef Workstation on Windows, Debian, or RPM-based Linux distributions.
You can download and install the pre-built `.msi`, `.deb`, or `.rpm` packages using your existing package management tools, simplifying the deployment process for managing system configurations.

- Linux and Windows x86-64 (64-bit) systems only
- Chef Habitat 1.6.0 or later installed
- Minimum 2GB available disk space for installation
- Internet connectivity for package downloads (or access to internal Habitat Builder)
## Supported platforms

## Prerequisites
Chef Workstation is supported on:

We use Chef Habitat to distribute and install Chef Workstation and its components.
- Currently supported Linux distributions and versions running Linux kernel 2.6.32 and later on x86-64 (amd64)
- Currently supported Windows versions greater than or equal to Windows 10 and Windows Server 2016

Comment thread
nikhil2611 marked this conversation as resolved.
To install and configure Chef Habitat so you can install and manage Chef Workstation, follow these steps:
## Chef Workstation requirements

1. [Install Chef Habitat](https://docs.chef.io/habitat/latest/install/)
- **RAM**: Chef Workstation requires a minimum of 1 GB of RAM.
- **Disk space for binaries**:
- Linux: The Chef Workstation binaries are stored in `/hab` and require a minimum of 2.8 GB of disk space.
- Windows: The Chef Workstation binaries are stored in `C:\hab` and require a minimum of 3.3 GB of disk space.

1. [Create a personal access token in Habitat Builder](https://docs.chef.io/habitat/builder/saas/builder_profile/#create-a-personal-access-token)
## Prerequisites

1. Run [`hab cli setup`](https://docs.chef.io/habitat/latest/install/hab_setup/) and follow the instructions in the setup script and add your personal access token so you can authenticate with Habitat Builder.
- Chef Infra Client isn't installed on your target system.
- On Debian-based systems, the `dpkg` package manager is installed on your target system.
- On RPM-based systems, the RPM and either the DNF or Yum package managers are installed on your target system.
- For Amazon Linux 2, use the RPM and Yum package managers.
- You have a valid Progress Chef license key.
- Your target system is connected to the internet.

## Install Chef Workstation

Chef Workstation supports several installation methods to accommodate different deployment scenarios.
### Install Chef Workstation on Debian-based systems

### Install with binary linking (recommended)
To install Chef Workstation on a Debian-based system, follow these steps:

The recommended installation method includes binary linking, which creates symbolic links to the package binaries in your system PATH. This allows you to execute the command directly without the full Habitat exec syntax:
1. Download the Debian-based installer using one of the following methods:

```shell
hab pkg install chef/chef-workstation --binlink --force
```
- Download using `wget`:

This command uses the following options to binlink Workstation to your system's PATH:
```shell
wget -O "chef-workstation-enterprise-<VERSION>-linux.deb" "https://chefdownload-commercial.chef.io/stable/chef-workstation-enterprise/download?eol=false&license_id=<LICENSE_ID>&m=x86_64&p=linux&pm=deb&v=<VERSION>"
```

- `--binlink` binlinks the package binary to your system PATH.
- `--force` overwrites existing binlinks.
- Download using `curl`:

### Install from the unstable channel
```shell
curl -o "chef-workstation-enterprise-<VERSION>-linux.deb" "https://chefdownload-commercial.chef.io/stable/chef-workstation-enterprise/download?eol=false&license_id=<LICENSE_ID>&m=x86_64&p=linux&pm=deb&v=<VERSION>"
```

To install a pre-release version, install from the unstable channel:
Replace:
- `<VERSION>` with the version number to install.
- `<LICENSE_ID>` with your Chef license ID.

```shell
hab pkg install chef/chef-workstation --channel unstable
```
1. Install Chef Workstation:

### Install a specific version of Chef Workstation 26
```shell
sudo dpkg -i chef-workstation-enterprise-<VERSION>_amd64.deb
```

If you need to install a particular version of Chef Workstation, specify the version and timestamp in the package identifier:
Replace `<VERSION>` with the version number of the downloaded package, for example `chef-workstation-enterprise-26.1.0-1_amd64.deb`.

```shell
hab pkg install chef/chef-workstation/<VERSION>/<TIMESTAMP>
```
### Install Chef Workstation on RPM-based systems

For example, to install version 26.0.15 with timestamp 20260320102857, run the following command:
To install Chef Workstation on an RPM-based system, follow these steps:

```shell
hab pkg install chef/chef-workstation/26.0.15/20260320102857
```
1. Download the RPM-based installer using one of the following methods:

### Install additional versions of Chef Workstation's component tools
- Download using `wget`:

You can install multiple versions of Chef Workstation's component tools side-by-side with the versions included with Chef Workstation, including Chef Infra Client.
```shell
wget -O "chef-workstation-enterprise-<VERSION>-linux.rpm" "https://chefdownload-commercial.chef.io/stable/chef-workstation-enterprise/download?eol=false&license_id=<LICENSE_ID>&m=x86_64&p=linux&pm=rpm&v=<VERSION>"
```

To install an additional version of a Workstation component alongside the default version, run the following command:
- Download using `curl`:

```shell
hab pkg install <PACKAGE_IDENT_WITH_VERSION>
```
```shell
curl -o "chef-workstation-enterprise-<VERSION>-linux.rpm" "https://chefdownload-commercial.chef.io/stable/chef-workstation-enterprise/download?eol=false&license_id=<LICENSE_ID>&m=x86_64&p=linux&pm=rpm&v=<VERSION>"
```

Replace `<PACKAGE_IDENT_WITH_VERSION>` with the full package identifier with the version, for example `chef/chef-infra-client/18.10.17`.
Replace:
- `<VERSION>` with the version number to install.
- `<LICENSE_ID>` with your Chef license ID.

To execute the specific version, run the `hab pkg exec` command, specify the full package identifier including the package version, and the command you want to run:
1. Install Chef Workstation:

```shell
hab pkg exec <PACKAGE_IDENT_WITH_VERSION> <COMMAND>
```
```shell
sudo dnf install chef-workstation-enterprise-<VERSION>.x86_64.rpm
```

For example, to run Chef Infra Client 18.10.17:
Alternatively:

```shell
hab pkg exec chef/chef-infra-client/18.10.17 chef-client
```
```shell
sudo rpm -Uvh chef-workstation-enterprise-<VERSION>.x86_64.rpm
```

To run Chef Infra Client 19.2.12, run:
Replace `<VERSION>` with the version number of the downloaded package, for example `chef-workstation-enterprise-26.1.0-1.x86_64.rpm`.

```shell
hab pkg exec chef/chef-infra-client/19.2.12 chef-client
```
### Install Chef Workstation on Windows

To run the binlinked version:
To install Chef Workstation on Windows, follow these steps:

```shell
chef-client
```
1. Download the installer in an elevated PowerShell session:

### Verify the installation
```powershell
Invoke-WebRequest -Uri "https://chefdownload-commercial.chef.io/stable/chef-workstation-enterprise/download?eol=false&license_id=<LICENSE_ID>&m=x86_64&p=windows&pm=msi&v=<VERSION>" -OutFile "chef-workstation-enterprise-<VERSION>_x86_64.msi"
```

After installation, verify that Chef Workstation is installed correctly:
Replace:
- `<VERSION>` with the version number to install.
- `<LICENSE_ID>` with your Chef license ID.

```shell
chef-workstation -v
```
1. Install Chef Workstation using one of the following methods:

or
- Run the following command in an elevated PowerShell or Command Prompt session:

```shell
chef -v
```
```powershell
msiexec /i chef-workstation-enterprise-<VERSION>_x86_64.msi
```

A successful installation displays the installed version of Chef Workstation and the versions of its component tools.
- Double-click the `.msi` file and follow the on-screen installation wizard.

### Use the bundled tools
Replace `<VERSION>` with the version number of the downloaded package, for example `chef-workstation-enterprise-26.1.0-1_x86_64.msi`.

Chef Workstation provides two primary methods for executing the bundled tools.
## Verify the installation

#### Method 1: Use direct executables with binary linking

Binary linking creates symbolic links to package executables in a system-wide location, allowing you to invoke tools directly without the Habitat exec prefix. This method provides a more familiar command-line experience similar to traditional package installations.

To enable binary linking during installation, include the `--binlink` flag:
After installation, verify that Chef Workstation is installed correctly by running one of the following commands:

```shell
hab pkg install chef/chef-workstation --binlink
```

If you have already installed Chef Workstation without binary linking, you can enable it afterward:

```shell
hab pkg binlink chef/chef-workstation
chef-workstation -v
```

Once binary linking is enabled, you can invoke tools directly from the command line:
Alternatively:

```shell
kitchen -v
chef-cli -v
chef-client --version
berks -v
inspec version
knife -v
```

#### Method 2: Use Habitat exec

The `hab pkg exec` command provides explicit control over which package and version is used to run a command. Use this method when you need to ensure a specific version is used or when binary linking isn't available.

The general syntax is:

```shell
hab pkg exec <PACKAGE_IDENT> <COMMAND>
chef -v
```

The following table provides examples of common tool invocations using the Habitat exec method:

| Tool | Command | Version Command |
|-------------------|------------------------------------------------------------|-----------------------|
| Test Kitchen | hab pkg exec chef/chef-test-kitchen-enterprise kitchen | kitchen -v |
| Chef CLI | hab pkg exec chef/chef-cli chef-cli | chef-cli -v |
| Chef Infra Client | hab pkg exec chef/chef-infra-client chef-client | chef-client --version |
| Berkshelf | hab pkg exec chef/berkshelf berks | berks -v |
| Ohai | hab pkg exec chef/ohai ohai | ohai --version |
| Cookstyle | hab pkg exec chef/cookstyle cookstyle | cookstyle -v |
| Chef Vault | hab pkg exec chef/chef-vault chef-vault | chef-vault -v |
| Fauxhai | hab pkg exec chef/fauxhai fauxhai | fauxhai -v |
| Chef InSpec | hab pkg exec chef/inspec inspec | inspec version |
| knife | hab pkg exec chef/knife knife | knife -v |
The output displays the installed Chef Workstation version.

## Install Chef Workstation tools
## Install individual components

The following applications are included with Chef Workstation but can also be installed as standalone applications.

To install a Workstation tool as a standalone application, follow these steps:
The following tools are included with Chef Workstation but can also be installed individually using Chef Habitat.
If you only need specific tools rather than the full Workstation package, install them as standalone applications:

1. Install a package using [`hab pkg install`](https://docs.chef.io/habitat/habitat_cli/#hab-pkg-install):

```sh
hab pkg install <PACKAGE_IDENT> --binlink --force
```

Replace `<PACKAGE_IDENT>` with the package identifier:

- `chef/berkshelf`
- `chef/chef-cli`
- `chef/chef-infra-client`
- `chef/chef-test-kitchen-enterprise`
- `chef/chef-vault`
- `chef/cookstyle`
- `chef/fauxhai`
- `chef/inspec`
- `chef/knife`
- `chef/ohai`
```shell
hab pkg install <PACKAGE_IDENT> --binlink --force
```

The `--binlink --force` options overwrite any existing package symbolic links in the system's PATH directory with the new version so you can run it directly in the command line.
Replace `<PACKAGE_IDENT>` with the package identifier:

1. Verify that the correct version runs:

```sh
berks -v
chef-cli -v
chef-client -v
chef-vault <args>
cookstyle -v
fauxhai -v
knife -v
ohai -v
```

## Troubleshooting

### Binlinks not found

If commands aren't found after installation, verify that Chef Habitat created the binlinks:

```sh
ls -la /bin | grep chef
```

If binlinks are missing, recreate them:

```sh
hab pkg binlink --force chef/chef-workstation
```

### Permission errors

Ensure you're running installation commands with `sudo` for system-wide access.

### Habitat channel issues

If the package can't be found, verify channel availability:

```sh
hab pkg search chef/chef-workstation --channel unstable
```
- `chef/berkshelf`
- `chef/chef-cli`
- `chef/chef-infra-client`
- `chef/chef-test-kitchen-enterprise`
- `chef/chef-vault`
- `chef/cookstyle`
- `chef/fauxhai`
- `chef/inspec`
- `chef/knife`
- `chef/ohai`

## Next steps

- [Set up Workstation](set_up)
- [Add a license](license)
- Optional: [Get started with Chef Workstation](get_started)

## More information
## See also

- [Chef Habitat documentation](https://docs.chef.io/habitat/)
- [Upgrade Chef Workstation and its components](upgrade)
- [Chef Download API documentation](https://docs.chef.io/download/)
- [Upgrade Chef Workstation](upgrade)
- [Uninstall Chef Workstation](uninstall)
- [Chef Workstation tools](tools)
3 changes: 2 additions & 1 deletion content/tools/berkshelf.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
title = "About Berkshelf"
draft = false


linkTitle = "Berkshelf"
summary = "Berkshelf is a dependency manager for Chef cookbooks."

[menu]
[menu.tools]
Expand Down
2 changes: 2 additions & 0 deletions content/tools/knife/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
title = "About knife"
draft = false

linkTitle = "knife"

[menu]
[menu.tools]
title = "About knife"
Expand Down
Loading
Loading