This write-up includes steps to:
- Install a Chef Server
- Installing and setting up a Chef Workstation
Note that the installation scripts for the Server and Workstation are specific to Ubuntu 14.04 64-bit. For any other OS, a different installation file will need to be used, but the remaining steps should mostly be the same.
Chef recommends having an FQDN for the Chef Server. If not available, there is a workaround where the workstation can connect to the server using its IP address.
Copy the script chef_server.sh to the ~/ directory and run as root. The script does the following:
- Downloads and installs the package for Chef Server version 12.0.0
- Configures and tests the installation
- Creates an admin user
- Creates a Chef organization
- Installs and configures Chef Manage (the web UI component of Chef Server)
- Generates 2 .pem (private SSH key) files: one for the admin user and another for the organization which is created
Saving files and accessing the web UI:
- Save the 2 .pem files in a location from where they can be copied over to the workstation
- Access the Chef Server UI by entering the URL of the server (either FQDN or IP address).
- Click on “Click here to sign in” and login with the admin/changeme (set in the chef_server.sh script)
- Download Knife config file:** click through Adminstration –> ec-org (or the name of the organization you created)** then on the left menu, click on “Generate Knife Config”
- Save the downloaded knife.rb file along with the 2 .pem files to copy to the workstation
- If you did not use an FQDN for the chef server, you will need to modify the chef_server_url property in the knife.rb file to use the IP address
If you have used vagrant to provision the workstation, you can copy over these 3 config files generated earlier:
The script chef_workstation.sh assumes these files are in the /vagrant directory, and it will have to be modified if the files are in a different location.
Copy the script chef_workstation.sh to the ~/ directory and run as root. The script does these:
- Downloads and installs Chef Development Kit version 0.3.5
- Installs Git
- Clones the chef-repo directories from Github
- Copies the 3 config files mentioned above to the appropriate directory (chef-repo/.chef)
At this point the workstation is ready to be used!
Please continue to KBEC-00294 for further instructions on usage of your Chef Server and Workstation
Written by Kishan Iyer