Contributors20 minutesRecall that your workstation is the computer from which you author your cookbooks and administer your network. Although you're configuring Windows Server, your workstation can be any OS you choose – be it Linux, macOS, or Windows.
| Remember, you can also use a virtual machine as your workstation. Just make sure your VM meets the system requirements. |
1. Install the Chef Workstation
In the first module, Learn the Chef basics, you used the tools provided by Chef Workstation to configure a virtual machine directly. Now it's time to install Chef Workstation on your workstation so that you can manage a node remotely.
Install the Chef Workstation
2. Open a command prompt
In this module, you'll run Chef commands from a command prompt to manage your node remotely.
Linux or macOS
If you're running Linux or macOS as your workstation, open a terminal window like you normally would.
Windows
If you're running Windows as your workstation, open the Chef Workstation desktop shortcut. The desktop shortcut brings up a PowerShell session that's configured to work with Chef.

3. Verify your Chef Workstation installation
Next, ensure that you can access Chef Workstation from the command line. Run chef --version to verify the version. This module was last tested on the versions shown here.
Terminal: ~
$ | chef --versionChef Development Kit Version: 2.5.3chef-client version: 13.8.5delivery version: master (73ebb72a6c42b3d2ff5370c476be800fee7e5427)berks version: 6.3.1kitchen version: 1.20.0inspec version: 1.51.21
|
4. Set up your text editor
Now's a good time to make sure your favorite text editor is set up. As you did in the previous module, choose a text editor that provides features such as syntax highlighting and line numbering.
Here are a few popular graphical text editors.
If you're on Linux or macOS and prefer using a command-line text editor, emacs, nano, and vim are popular.
5. Create a working directory
Create a directory to hold your work as you progress through the Learn Chef modules. Chef users commonly create a directory for their organization and a subdirectory for each project, as is common when working with Git.
For the Learn Chef modules, we'll use ~/learn-chef as the root directory.
Terminal: ~
$$ | mkdir ~/learn-chefcd ~/learn-chef
|
You can use a different directory if you'd like – just be sure to adjust the paths you see in the modules.
| In the Learn Chef modules, we use the ~ character in directory names, which is a common shortcut for the user's home directory on Linux, but also works in PowerShell. On Windows, ~ refers to your home directory, for example, C:\Users\Administrator. |
6. Install and configure Git
In this module, you'll obtain starter code from GitHub. You do not need to create a GitHub account, but you'll need a Git client.
Git is popular here at Chef and with the Chef community. Even if you use another revision control system, you may find it useful to install the Git client so that you can participate in the community's many open-source projects.
Install Git
Linux or macOS
If you're running Linux or macOS as your workstation, download and install Git now.
After you install Git, run git --version to verify the installation.
Terminal: ~
$ | git --versiongit version 2.7.4
|
Windows
If you're running Windows as your workstation, Chef Workstation comes with Git for Windows.
From your Chef Workstation PowerShell session, run git --version to verify the installation.
Windows PowerShell: ~
PS > | git --versiongit version 2.8.2.windows.1
|
Configure Git
When you create a cookbook, Chef generates a number of starter files for you. Chef also creates a Git repo and performs an initial commit. This action occurs on your local files only, but the commit requires details about your Git identity.
Your Git identity includes your user name and email address. Git includes this information in every commit so others can identify the author.
Run the following commands to set your Git identity. Replace John Doe and johndoe@example.com with your name and email address, respectively.
Terminal: ~
$$ | git config --global user.name "John Doe"git config --global user.email johndoe@example.com
|
7. Verify your RDP client
Although not required, you may find it useful to have an RDP client installed on your workstation. This enables you to connect to your Windows Server instance to verify your work.
- Windows users
Windows comes with an RDP client. Run mstsc from the command prompt to bring up Remote Desktop.
- macOS users
Download Microsoft Remote Desktop from the Apple App Store. The RDP client from Microsoft's web site might not work.
- Linux users
Remmina is a popular RDP client for Linux.