Robin discusses the technologies that are used in this class and configuring your workstation to follow along with the course demos.
- [Instructor] Now that you understand what we'll be covering in this class, let's make sure that your system meets the minimum requirements if you choose to follow along with the course exercises. This essentially is going to make sure that your system can run virtual machines. Virtual machines can be quite taxing on your system's hardware, so we want to make sure that you can actually support the architecture needed to spin up these instances we'll be configuring with Chef. The first system requirement is to ensure that your system supports virtualization.
This is usually enabled in your BIOS, but I encourage you to look it up on the web to see if your system has hardware virtualization enabled. You want to make sure that you can actually run virtual box machines, by checking their minimum requirements. Take a look at the attached setup documentation if you want to ensure that you have the proper links to verify all these requirements. You'll make sure that you have five gigabytes of hard-disk space available, and at least half a gig of RAM available for each virtual machine you'd like to run.
You can also run through the class using something like VMware Fusion, but the exercises you'll see me demonstrating will use VirtualBox for virtualization. Now, we're here to learn Chef. I'm really excited to jump into the content with you. But I want you to understand we'll be using a couple third-party tools like Vagrant and VirtualBox, in order to play around with the Chef Development Kit. Now, I'll do my best to help you with any troubleshooting steps I encounter going through the videos, but I do recommend that if you run into a specific issue with Vagrant or VirtualBox, that you check out their open issues and bug tracker pages.
Also, to make sure that the class runs as smoothly as possible, ensure that you do have the same versions that I'm using in the videos. You'll also want to make sure that you have an SSH client available. We'll be connecting to our instances via SSH later in the class. Now there are a couple of ways to go about doing this. On a MAC or Linux based machine, you can probably get away with the terminal. If you're on a Windows machine and trying to connect with an SSH client, you can also use the Chef Development Kit's built-in Git for Windows.
An SSH client that's included with the tooling. Here's a list of the versions of the tools I'll be utilizing in this class. I'm going to demonstrate installing these tools momentarily. But understand that these versions are what I have verified to be working on my system at the time this course was filmed. Updated versions of these tools do exist. So if you experience any difficulties using them, you might consider upgrading to the latest versions from the appropriate vendor.
For example, I'm aware that on Windows 10 systems you may want to consider upgrading to the latest version of VirtualBox for virtual machine creation to execute properly. Before I demonstrate installing these tools, I want to let you know a little bit about the class workflow. For the first half of the class, I'm going to be logging directly into a Vagrant initialized virtual machine that I can configure with Chef directly. This will allow us to understand how Chef works, and the workflow that we'll be going through when we apply our Chef code.
In the second half of class, I'm actually going to go through and manage an instance via a Chef server instead. This will involve talking to a Chef server from your local machine. So to summarize, in the first half of class we'll be directly working inside of a VM, and in the second half we'll actually be managing this virtual machine via a Chef server. The first thing we want to make sure we have installed, is the Chef Development Kit.
This will contain all of the tools we'll be using in the class. We'll head over to the browser to downloads.chef.io. On downloads.chef.io you'll see a list of all the software that Chef software creates. There's a lot going on here, but we're going to be utilizing the Chef Development Kit. Open up that link, and you'll be presented with all the major releases that you could install. Now you're welcome to grab the latest version of the tools here, but understand this class has been demoed with the 1.3.43 version of the toolkit.
Clicking on that link, I have the option to download and install the appropriate installation package for your system. So feel free to download the version that works best for you. Once you've downloaded the Chef Development Kit, you can go ahead and go through the installation process. And this may take a moment to actually get through because it includes the entire Ruby programming language. Now that the installation has been successful, you can verify that the toolkit has been installed.
Now to do this on a Nikspace system, you can just head over to the terminal. In the terminal, you can run the chef --version command. And you should see the same version of the Chef Development Kit that you downloaded. Now on a Windows-based machine, you're welcome to try this through powershell. On Windows, you can also launch the Chef Development Kit through the desktop, and check the version there. The second tool we'll need to install is VirtualBox.
VirtualBox is what will enable us to actually create virtual machines. You can grab it from virtualbox.org. On virtualbox.org, you should be able to locate the download section quite easily. Here you'll see the binaries for all the latest versions of Virtualbox, which is great. However, keep in mind we're going to be using a specific version of VirtualBox. So if you want to grab the same versions I'm using in this class, be sure to take a look down further on the page for the older build section.
And from there, you can locate the same version I'm using for this class. This is going to be the 5.1.8 version. And again, see the setup documentation if you have questions about the versions or the links to grab these tools. You can see a number of different platforms are listed. And once you've located the correct installation package, feel free to download and begin installing it. Launching the VirtualBox installer, it will again take a moment to install.
Feel free to head through the installation process, there should be nothing non-standard here. Now that VirtualBox has been installed, you can again check that it is ready to go inside of your terminal or powershell window. To check the version of VirtualBox that's installed you can run the vboxmanage command. And again, ask for --version. Now, you're welcome to try these demos with a newer version of VirtualBox, but again, if you run into any problems check and make sure you're using this version of the tool.
Finally, the last tool we'll want to use is Vagrant. Vagrant will allow us to easily provision VirtualBox machines that need a certain standard for our testing purposes. In addition, at the end of the class, I'll show you some interesting things you can use Vagrant for when it comes to testing with Chef. You can grab Vagrant from vagrantup.com. There's a couple methods for installation you can use by heading over to vagrantup.com, or if you're on Windows, you might consider the Chocolatey Package Manager.
On vagrantup.com, you should easily be able to locate the download section where you could grab the latest version of Vagrant if you'd like. However, I'll be using a slightly older version of Vagrant that you can find under the download older versions of Vagrant link. Now again, you can use the latest version if you'd like, but I'll be using Vagrant 1.8.6 for this course. Once you've downloaded the correct version of Vagrant, you'll want to go ahead and again go through the installation process.
Finally, we can go through and make sure that the Vagrant installation was successful. Back in my terminal window we can go ahead and run the vagrant --version command to make sure that the tool has been properly installed. And again, you can check the versions I have here on the screen to make sure you're all set up for class.
This intermediate-level course provides insights into the Chef architecture through practical examples and demos, including the deployment of a PHP application on top of a LAMP stack. Instructor Robin Beck walks through recipe development and the various prebuilt cookbooks available from the Chef community Supermarket, and reviews best practices for building wrapper cookbooks that allow you to access recipes from different cookbooks. He also shows how to work more efficiently with knife commands for managing clients, cookbooks, and data.
- Building a setup recipe
- Using cookbooks to organize recipes
- Using community recipes
- Uploading cookbooks
- Using the database cookbook
- Adding PHP to the mix
- Searching with knife
- Testing cookbooks with Kitchen