Tag: chef

Chef Test Kitchen – Verifications

There are a few gotchas I find trying to use test kitchen. Hope this is the place I try to run test kitchen inside a cookbook (using the single-repo-per-cookbook mentality), but then test kitchen fails to find the recipe and throws an error. When I place the kitchen.yml outside the cookbook directory, it works just […]

ERROR: undefined method `closed?' for nil:NilClass

I have workstation and chef server on different machine and docker running on other machine.When i bootstrap from workstation to run chef-client inside docker container. it give me error as after installing chef client on docker Conatiner. knife bootstrap 10.88.201.19 -p 49153 -x root -P hyl4fL3X7OaH -r role[role_apache] 10.88.201.19 Starting Chef Client, version 11.18.6 10.88.201.19 […]

Knife Container issue

My Docker, chefDk and workstation all on same node and chef server on different machine After running knife container init demo/apache2 -r recipe[“some_recipe”] It create a Docker-file and Docker Context with demo/apache2 tag name having Ubuntu image. After this ,when i run knife container build demo/apache2 it throw the following error [2015-02-27T11:05:32+00:00] INFO: Client key […]

Installing chef server in Centos 6.6 docker container

I am running centos 6.5 minimal with the latest version of docker. I created a container from a centos 6.6 image and that is running fine. I then installed chef server 12 onto the container but when i run reconfigure it errors out: [2015-03-06T01:32:47+00:00] ERROR: Running exception handlers Running handlers complete [2015-03-06T01:32:47+00:00] ERROR: Exception handlers […]

how to use test-kitchen in multi node environment?

test-kitchen doesn’t support multi vm tasks, I tried to define a few nodes in Vagrantfile but it is too slow – start 5 virtual virtualbox VMs at once. Perhaps I need to use docker but the whole configuration becomes too complex, especially comparing usual test-kitchen setup. What’s the easiest way to test chef cookbooks with […]

chef-solo not applying recipe changes

I’m trying to vagrant up, edit ..\default.rb then run sudo chef-solo and have my new recipe version be run by chef. This is not working for me. After my initial vagrant run, chef does not apply updates to recipes. I can modify ..\default.rb all I want, but chef-solo runs the original version. vagrant setup script […]

Chef-Client fails to get the ruby gem during chef provisioning

I am following the chef blog: https://www.chef.io/blog/2014/11/12/chef-provisioning-infrastructure-as-code/ On trying the command chef-client -z <myenv>.rb, it fails with the following exception Running handlers: [2015-05-12T08:58:25-07:00] ERROR: Running exception handlers Running handlers complete [2015-05-12T08:58:25-07:00] ERROR: Exception handlers complete [2015-05-12T08:58:25-07:00] FATAL: Stacktrace dumped to /scratch/ChefWorkstation/.chef/local-mode-cache/cache/chef-stacktrace.out Chef Client failed. 0 resources updated in 1.536536008 seconds [2015-05-12T08:58:25-07:00] ERROR: cannot load such […]

Unable to activate chef-provisioning-docker-0.6 because chef-provisioning-1.1.1 conflicts with chef-provisioning (~> 0.9)

I have the following code in my Vagrantfile config.vm.provision “chef_zero” do |chef| chef.add_recipe ‘docker’ chef.add_recipe ‘chef-provisioning’ chef.add_recipe ‘chef-provisioning::docker’ This fails with a recipe compile error Gem::ConflictError. Console shows ==> default: Gem::ConflictError ==> default: —————— ==> default: Unable to activate chef-provisioning-docker-0.6, because chef-provisioning-1.1.1 conflicts with chef-provisioning (~> 0.9) ==> default: ==> default: ==> default: Cookbook Trace: […]

How to run multiple supporting apps (tomcat) on my local mac which I don't modify?

I work on app A. In order for me to work in app A, I depend on multiple apps B, C and D. (All of them runs on tomcat). I had to build and run my app A, but not necessarily apps B, C & D. So is there a easy way to spin up […]

CHEF provisioning: SystemStackError: stack level too deep

I’m making a node provisioner with CHEF, I want to create and configure Docker containers inside it. Currently I get a CHEF node with Chefdk and chef-provisioner-docker, but when I trigger the recipe to create containers (machine) I get a Stack level too deep withc I dont understand why. Stacktrace: [2016-02-16T11:12:21-05:00] INFO: Forking chef instance […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.