OLD- DevOps Engineering part 1. (Win) – Make your Windows computer easier to use

Set up your computer Display the file extensions On Windows 11 Open the File Explorer Click the arrow next to View and select Show Mark File name extensions and Hidden items On Windows 10 Open File Explorer On the View tab select File name extensions Hidden items On Windows 7 (if you accidentally run into …

`block in filter_instances’: undefined method `empty?’ for nil:NilClass (NoMethodError)

When you try to execute any of the “kitchen” commands in Chef Test Kitchen you may get the following error message. lib/kitchen/config.rb:182:in `block in filter_instances’: undefined method `empty?’ for nil:NilClass (NoMethodError) This happened in my cookbook, when I have removed the value from the “excludes:” option in the .kitchen.yml file, but left the “excludes:” option …

Serialize SSH and RSA private keys to store them in a Chef Data Bag

To send RSA private keys to instances, store them in encrypted data bags. The data bag item is a JSON file that contains keys and values inline. Use base64 encoding Base64 encoding converts binary data to ASCII format to represent special characters, like line breaks as ASCII text. The result will be larger, 8 / …

HTTP Request Returned 409 Conflict: Client already exists

The Chef server maintains the list of registered nodes and clients in its database.  When you launch a new instance with Chef you may encounter the following error message: *** Input CHEF_CLIENT_NODE_NAME is undefined, using: IP-0AFE6965 … *** Starting chef-client *** Finished chef-client Printing Log … […] INFO: Client key C:\chef\client.pem is not present – …

DevOps Engineering part 5. – Create an enterprise cookbook

In this exercise we will create a Chef cookbook for a corporation. It will be robust and include all the necessary elements to be used in a large enterprise. If your company already has established standards, as you progress with this tutorial, copy the appropriate file from an existing cookbook. If this is the first …

DevOps Engineering part 4. – Connect to the Chef server

Find a Chef Server To work in a corporate environment, your organization needs access to a Chef server. To learn Chef and test your cookbooks for free, you can create an account on the “hosted” Chef server, maintained by the Chef company. The plan allows five nodes at a time, so you can even launch a small …

DevOps Engineering part 3. – Working with AWS

Personalize your workstation Set up your account in the AWS console If you are not an AWS account administrator, ask your AWS account administrator to do the following for you Create an account in AWS Add the account to the appropriate user group Generate a password with a request to change it at the first login Generate an AWS Access …

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 …