Remove Policyfile.rb from your Chef cookbook

When you test your cookbook in Chef Test Kitchen and get the following error, delete the “Policyfile.rb” from your Chef cookbook directory. $$$$$$ You must set your run_list in your policyfile instead of kitchen config. The run_list your config will be ignored. $$$$$$ Ignored run_list: [“recipe[…::…]”] Preparing dna.json Exporting cookbook dependencies from Policyfile /tmp/… Error: Invalid […]

 Go to post page

September 30th, 2016 by Laszlo Pinter

Beginner’s guide to DevOps Engineering – Chef Data Bags

There are secrets in most of the Chef cookbooks that we want to protect. We don’t want to give out user names, passwords and AWS keys.  In Chef the best place to hide these secrets is the Encrypted Data Bag. A Data Bag is a JSON file that we can encrypt, so we can store it […]

 Go to post page

September 23rd, 2016 by Laszlo Pinter

Unable to satisfy the following requirements error message in Chef Test Kitchen

When Berkshelf in the Chef Test Kitchen cannot resolve the cookbook dependencies, it displays the following error message during converge: Unable to satisfy the following requirements To help Berks to start a fresh calculation, delete the Berksfile.lock file and enter the following into the command window: berks install

 Go to post page

September 13th, 2016 by Laszlo Pinter

Beginner’s guide to DevOps Engineering Part 2.

Set up the DevOps development environment Create and test your first cookbook in 5 minutes  Set up the Chef working folder Create a folder for the Chef development(C:\Chef) In the Chef folder create a sub-folder cookbooks Double click the cookbooks folder to navigate into it In Windows Explorer right click the white area and select […]

 Go to post page

September 12th, 2016 by Laszlo Pinter

Beginner’s guide to DevOps Engineering Part 1.

DevOps engineering (Release engineering) is a relatively new profession. There is a very high demand for experienced DevOps engineers, because more and more large corporations want to migrate their data centers into the Cloud. In this series I will introduce you to the tools of the trade through the development of a Chef cookbook. The […]

 Go to post page

August 31st, 2016 by Laszlo Pinter

Enable file sharing on Windows servers in Amazon Web Services (AWS)

When you create an EC2 instance in Amazon Web Services (AWS) the security group (firewall) blocks all ports that are not explicitly opened. To make file sharing possible on Windows servers, open the following ports in the security group of the server: TCP 139 TCP 445

 Go to post page

August 22nd, 2016 by Laszlo Pinter

Chef script stops when it calls a custom resource

When you execute a Chef recipe that calls a custom resource and the execution stops without any output from the custom resource, make sure the custom resource does not reference a misspelled property with the #{PROPERTY_NAME} syntax.

 Go to post page

August 17th, 2016 by Laszlo Pinter

How to copy files to the clipboard

When you work in the graphical user interface (GUI) of your operating system, and want to copy the contents of a file to the clipboard, you can use the following commands: On OS X run: cat FILE_NAME | pbcopy On Linux run: cat FILE_NAME | xclip On Windows (via Cygwin/Git Bash) run: cat FILE_NAME | clip

 Go to post page

August 15th, 2016 by Laszlo Pinter

How can I tell if a Chef cookbook is frozen

If a Chef cookbook is “frozen”, the cookbook is protected against accidental overwrite. When someone tries to overwrite it the “Version … of cookbook COOKBOOK_NAME is frozen. Use –force to override” message appears. To check if a Chef cookbook is frozen on the Chef server execute the following command knife cookbook show COOKBOOK_NAME latest | grep […]

 Go to post page

August 10th, 2016 by Laszlo Pinter

Upgrade Chef Client on Windows

If you have already installed Chef Client on a Windows box and want to upgrade to the latest version Open a Command Prompt and run as Administrator, Execute the following command, choco upgrade chef-client After the upgrade close the Command Prompt and open a new one to get the latest environment variables.

 Go to post page

August 10th, 2016 by Laszlo Pinter