Failed to install cookbooks from lockfile

During Chef cookbook testing with Test Kitchen only one “converge” action can update the Policyfile.lock.json at a time. If you test multiple recipes in the same cookbook, wait for the “Updating policy lock using /usr/local/bin/chef-cli update” message before starting the next converge otherwise we get the error message: STDOUT: Installing cookbooks from lockSTDERR: Error: Failed […]

Move AWS EC2 instance to another subnet or availability zone

When we move an EC2 instance from one subnet to another or to another availability zone the EC2 Metadata Service stops working on the instance. We get the error message: Unable to get IAM security credentials from EC2 Instance Metadata Service. To enable the EC2 Metadata Service again, we need to update the routing configuration […]

Cannot modify the instance class because there are no instances of the requested class available in the current instance’s availability zone

When you change the instance type of an AWS RDS instance, the availability zone of the instance has to have available capacity of the selected type. Some older availability zones (us-east-1a) have more old instance types than new types available. If the instance type you selected is not available in the current zone of the […]

Exit from Bash script on error without closing the terminal window

To terminate the script in case of an error, we can use the “-e” option. When a bash script is “sourced”, called from an alias with a leading dot like my-alias=’. /my-script to execute in the same process, or a function is executed from a terminal window and the script exits on an error, it […]

Error: Failed to install cookbooks from lockfile

When the CI/CD pipeline loads dependency cookbooks from GitHub and the kitchen converge process throws the error: Error: Failed to install cookbooks from lockfileReason: (CookbookOmnifetch::NotACookbook) The resource at ‘/…’ does not appear to be a valid cookbook. Does it have a metadata.rb? make sure the remote revisions of the dependency cookbook match in the caller […]

Install and configure iTerm2

Download iTerm2 from Double click the downloaded ZIP file to extract the application, Move the iTerm application to Applications. iTerm2 configuration Use .bashrc for configuration When you start iTerm, it reads its own config file, ~/.zshrc To keep using the standard ~/.bashrc config file Create the ~/.zshrc file and have only one line in it:source ~/.bashrc Set case-insensitive […]

chef push always regenerates the revision id and Policyfile.lock.json

If the chef update and chef push commands always regenerate the Policyfile.lock.json file and the revision_id in it, make sure the Chef cookbook contains the chefignore file and it also references all possible Policyfile lock files: If a cookbook file changes, a new Policyfile.lock.json is generated during chef push. chef update and chef push always check […]

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

When we launch a test instance with Chef Test Kitchen, we may get the error message: —–> Starting Test Kitchen (…)—–> Creating …——Exception——->>>>>> Class: Kitchen::ActionFailed>>>>>> Message: 1 actions failed.>>>>>> Failed to complete #create action: [undefined method `[]’ for nil:NilClass] on …>>>>>> ———————->>>>>> Please see .kitchen/logs/kitchen.log for more details>>>>>> Also try running kitchen diagnose –all for […]

Tejes vajas fonott császárzsemle

Igazi békebeli fonott császárzsemle receptet találtunk Gábornál. Hozzávalók TangZhong (előtészta)260 ml tej40 g lisztösszemelegítve. Az élesztőhöz230-250 ml tejben24 g élesztőegy csipet cukorral felfuttatjuk A tésztához650 g finom liszt10- 12 g só12 g cukor35 g vaj Előkészítés Felfuttatjuk az élesztőt Előtészta:Mielőtt forrni kezdene a tej, lecsökkentjük a hőmérsékletet és gyors keverés mellett lassan beleöntjük a lisztet. […]