Could not load the ‘vagrant’ driver from the load path

When you execute the kitchen converge command to launch a virtual machine on your workstation with the Vagrant driver, you may get the error message: >>>>> ——Exception——- >>>>>> Class: Kitchen::ClientError >>>>>> Message: Could not load the ‘vagrant’ driver from the load path. Please ensure that your driver is installed as a gem or included in …

Vagrant installation

 Vagrant Installation Warning! The new versions of Vagrant delete the contents of the /opt/vagrant directory. If you want to keep old versions of Vagrant, first move them out of the /opt directory. Download Vagrant from https://www.vagrantup.com/ and follow the instructions to install it. Select DOWNLOAD… Select the operating system of your workstation. For Ubuntu: Debian RedHat: Centos …

Create the AWS credentials file from a Chef Data Bag

When a process on a server instance needs access to an AWS account, the user who will execute the AWS CLI commands needs to be able to automatically authenticate in AWS. For automatic AWS authentication, the AWS CLI creates two files in the .aws directory: config and credentials. The location of this directory depends on the …

Ruby Gem Management

Ruby gems are Ruby programs and libraries with a name, version and the platform that can execute them. List the installed gems on your system gem list Detailed list that includes the author, homepage, license, install location and a short description gem list -d Install the latest version of the gem gem install GEM_NAME Install a …

Bootstrap Chef nodes to connect them to the Chef server

A Chef node is a physical or virtual machine with an operating system that is connected to the Chef server. Once the node has made the connection to the Chef server, the installed Chef Client can execute Chef cookbooks to configure the machine. Bootstrapping is the process to connect the node the first time to …

Dynamically set Chef resource attributes

When you need to set a Chef resource attribute based on the current state of the environment, there is a way to dynamically provide the value. Set the value of a boolean variable with a test, Declare the Chef resource and assign a reference to it to a variable, Set the resource attribute based on …

No instances for regex `’, try running `kitchen list’ in Chef Test Kitchen

When I tried to execute the “kitchen list” command in Chef Test Kitchen the following error came up: No instances for regex `’, try running `kitchen list’ I could not find the reason for the error, so I opened the .kitchen.yml file in the Atom editor, added a space to one of the comments, and saved the …

Berks update fails with ‘Missing artifacts’ error message

When you add cookbooks as dependencies with the “depends” statement to the metadata.rb file of your Chef cookbook, to be able to test your cookbooks in Chef Test Kitchen, you also have to specify the location of those cookbooks in the Berksfile file. For all the cookbooks that are available on the Chef Supermarket, one line source …

Chef Attributes

Chef attributes are global variables that are available for every cookbook on the node. There are multiple formats to declare and use an attribute. For important notes on the syntax, please see Undefined method or attribute error in a Chef recipe. To override the value of an attribute that is defined in another cookbook, use the …