Specify virtualenv python version using Chef’s application_python cookbook

I’m using Opscode’s application_python cookbook, and trying to deploy a Django application. I need to use Python 2.7 for this project, but it appears that the virtualenv creation is done with python2.6 by default, which I don’t plan on installing on the system. Therefore, I get the following error when running chef-client: [Fri, 08 Jun … Read more

chef-solo with docker: Prevent services from starting during build

I am trying to reuse existing cookbooks within docker containers, but most recipes will start the service during the chef client run (e.g. tomcat, apache2). As chef-solo runs during image creation the chef run will simply fail. How can I prevent a cookbook from starting a service? I am using the following Dockerfile FROM jr42/chef-solo-centos … Read more

Adding/Enabling windows feature using chef

I am writing chef cookbook to add/enable some of the windows feature. For enabling I am using powershell_script resource and below is the powershell script. Import-Module Servermanager Add-WindowsFeature Print-LPD-Service For some reason, during chef-client run windows feature is not enabled. But the recipe ran successfully. When I manually executed the command in powershell shell it … Read more

could not find recipe epel for cookbook yum

i am having trouble with nginx cookbook.. and it dependency on yum-epel. Getting error : ” Chef::Exceptions::RecipeNotFound could not find recipe epel for cookbook yum” $ knife cookbook show nginx nginx 2.7.6 2.7.5 2.7.4 1.8.0 $ knife cookbook show yum-epel yum-epel 0.6.6 0.6.0 $ knife cookbook show yum yum 3.10.0 3.6.0 3.5.4 3.5.3 3.5.2 Been … Read more

Problem configuring Cookbooks in chef

I’ve been trying to setup a chef server and supply it with the cookbooks form the opscode github page http://github.com/opscode/cookbooks.git I’ve cloned this repo and set it in both my server config and knife config server.rb cookbook_path [ ‘/opt/chef/cookbooks’, ‘/opt/chef/site-cookbooks’ ] knife.rb cookbook_path [ ‘/opt/chef/cookbooks’, ‘/opt/chef/site-cookbooks’] Both directories contain the cookbooks from the repo, but … Read more

Overriding attributes with Chef Solo

I’m trying to install Maven 3 using Chef Solo and the following cookbook: http://community.opscode.com/cookbooks/maven The cookbook installs Maven 2 by default, and the first time I ran it, it installed Maven 2 as expected. Later on I modified my solo.json file to look like this: { “maven”: { “version”: “3” }, “run_list”: [ “recipe[java]”, “recipe[maven]” … Read more

A chef recipe to install ruby 1.9.3 system wide without rvm nor rbenv

I’m looking for an Opscode Chef cookbook that installs system-wide Ruby version 1.9.3, patch-level latest at the time of the run_list execution. Have done some research and there is a Brightbox PPA available at least for Ubuntu flavors. I wonder if there is a well written cross-platform Chef cookbook that replace old 1.8.7 Ruby by … Read more