Configure Chef Workstation and its components
This page describes how to configure Chef Workstation and Knife to connect to Chef Infra Server.
Configure Chef Workstation
To configure Chef Workstation for your environment:
chef-cli config
Configure Knife
Knife requires configuration to connect to Chef Infra Server. You can configure Knife automatically or manually.
Configure Knife automatically
To configure Knife to connect to Chef Infra Server:
knife configure
This command prompts you for your Chef Infra Server credentials and creates the necessary configuration files.
Configure Knife manually
To manually configure Knife to connect to Chef Infra Server:
Create the
~/.chef/credentialsfile:mkdir -p ~/.chef touch ~/.chef/credentialsAdd your Chef Infra Server credentials to the
~/.chef/credentialsfile:[default] chef_server_url = "https://chef-server.example.com/organizations/org-name" client_name = "username" client_key = "~/.chef/certificate_file.pem"Replace the following:
https://chef-server.example.com/organizations/org-name: Your Chef Infra Server URL and organization nameusername: Your Chef Infra Server username~/.chef/certificate_file.pem: Path to your client certificate file
Configure self-signed certificates
If you’ve configured Chef Infra Server with self-signed certificates, fetch and verify them:
Fetch the Chef Infra Server SSL certificates:
knife ssl fetchVerify the certificates:
knife ssl check