Menu
Chef Server on AWS
Quick Start Reference Deployment Guide

Setting up the Workstation and chef-repo

  1. Use the Remote Desktop Protocol (RDP) client to connect to the Chef workstation. You can obtain the public DNS name or IP for the instance tagged as ChefWorkstation in the Amazon EC2 console. Use chefadmin for the user name and the password you provided when you launched the stack in step 3.

  2. On the desktop, open the context (right-click) menu for Chef Development Kit, and choose Run as administrator.

    
                        Launching the Chef Development Kit (ChefDK) from the Desktop

    Figure 8: Launching the Chef Development Kit (ChefDK) from the Desktop

    This will bring up the ChefDK console, which runs via Windows PowerShell.

    
                        The ChefDK Console

    Figure 9: The ChefDK Console

  3. At the prompt, change to the root of drive C:

    Copy
    CD c:\
  4. Run the following command to generate the chef-repo. This will be the Git repository used to store and version-control your cookbooks.

    Copy
    chef generate repo chef-repo
  5. Retrieve the public DNS name from the instance tagged as ChefServer from the Amazon EC2 console (e.g., ec2-x-x-x-x.compute-1.amazonaws.com). Use the Google Chrome web browser installed on the workstation to navigate to the Chef Management Console. You’ll need to add "https://" in the address bar, followed by the DNS name for the Chef Server. Log in to the site by using the chefadmin user name and the password you specified when you launched the AWS CloudFormation stack in step 3.

    
                        Logging in to the Chef Management Console

    Figure 10: Logging in to the Chef Management Console

  6. From the top toolbar, choose the organization name (which will be aws) and choose Manage Organizations from the list.

    
                        Managing your Chef Organization

    Figure 11: Managing your Chef Organization

  7. Highlight the organization name. Choose the gear icon in the upper right, and then choose Starter Kit.

    
                        Downloading the Chef Starter Kit

    Figure 12: Downloading the Chef Starter Kit

  8. Choose Download Starter Kit, and then choose Proceed in the confirmation box.

    
                        Proceeding with the Download

    Figure 13: Proceeding with the Download

  9. Back in the ChefDK console, run the following PowerShell commands to unzip the Chef Starter Kit. If you downloaded the archive to another location, update the source path as needed.

    Copy
    $source = 'C:\users\chefadmin\downloads\chef-starter.zip' $dest = 'c:\chef-starter' Expand-Archive -Path $source -DestinationPath $dest
  10. Copy the .chef folder from the extracted Chef Starter Kit to the root of your chef-repo folder:

    Copy
    $source = 'c:\chef-starter\chef-repo\.chef' Copy-Item -Path $source -Destination .\chef-repo -Recurse
  11. Set the location of ChefDK console to the chef-repo folder:

    Copy
    CD .\chef-repo

    After this point, you must run all knife commands from this directory location. Do not switch (CD) to another location, or the knife commands will fail.

  12. Run the knife ssl fetch command to add the self-signed certificate on the Chef Server to the trusted certs folder in your chef-repo. Replace the DNS name with the public DNS name of your Chef Server.

    Copy
    knife ssl fetch https://ec2-x-x-x-x.compute-1.amazonaws.com

    For production environments, you can replace the self-signed certificate with one that is issued from a trusted certification authority (CA).