Switching to a new Chef server

The administrator of the Chef organization Download the validation key Do this only once for the organization. This step resets the validation key, so the existing server images will not be able to connect to the Chef organization. On the Administration tab on the left select Organizations > Reset validation Key Click the Reset Key […]

Waiting for SSH service on …:22, retrying in 3 seconds

When you try to launch a new EC2 instance in AWS using Chef Test Kitchen and the process times out with the message:   Waiting for SSH service on …:22, retrying in 3 seconds $$$$$$ [SSH] connection failed, terminating (#<Net::SSH::AuthenticationFailed: Authentication failed for user …@…>) >>>>>> ——Exception——- >>>>>> Class: Kitchen::ActionFailed >>>>>> Message: 1 actions failed. […]

Failed to complete #create action: [undefined method `version’ for nil:NilClass] on default…

When you execute kitchen converge to launch an EC2 instance in AWS with Chef Test Kitchen, you get the error message: >>>>> ——Exception——- >>>>>> Class: Kitchen::ActionFailed >>>>>> Message: 1 actions failed. >>>>>> Failed to complete #create action: [undefined method `version’ for nil:NilClass] on default-windows-2012r2 >>>>>> ———————- >>>>>> Please see .kitchen/logs/kitchen.log for more details >>>>>> Also […]

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 […]

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 […]

Getting started with InSpec

InSpec is an open-source testing framework to verify your infrastructure satisfies the design requirements. In this article, we will learn to install and use InSpec with Chef. Install InSpec Navigate to https://downloads.chef.io/inspec, and download the installer for the operating system of your workstation, Execute the downloaded installer. Allow InSpec to verify Red Hat Enterprise Linux instances InSpec needs […]