popularity question answers views user  
2
Abandoned cookbooks

There seem to be cookbooks that have been uploaded at one point in time, and have never been updated, nor respond to any inquiries regarding updates.

I have taken on primary maintenance of one such cookbook, have updated it considerably, and would like to share it back.

Is there a method or process to determine ‘ownership’ of a given cookbook, and delegate that to another interested party if it is neglected?

Thanks, -M

more →
0 339  
0
2 cookbooks with the same name?

If I wanted to contribute a cookbook to manage X (let’s say X=nginx) but one already exists on the community site, how could I name it to ensure it’s unique? From the URL structure of the community site, I’d guess there can only be one X cookbook. Something like username-nginx or some strange convention such as nginx-alt? Thoughts?

more →
1 596  
0
Correct way to handle cookbooks depenency?

http://stackoverflow.com/questions/8027310/chef-error-loaderror-no-such-file-to-load-win32-open3

Currently if we specified a cookbook path which contains all the cookbooks, even if we are NOT using it, it still cause you an error. So you need to put the cookbooks you needed ONLY in the folder.

But the problem appear when some cookbooks depends on other (e.g. wordpress depends on php), so we need to copy the cookbooks one by one manually..

Are there better way to do it?

more →
1 650  
0
How to use ark on a node

Hi,
i added the ark cookbook in the run list of my hosted chef node.
Now i want to use ark in another cookbook, that comes right after the ark cookbook.

I included the ark recipe in the recipe of the cookbook that comes right after the ark cookbook. The code looks like this:

include_recipe “ark”

dowloading olio

subversion “checkout-olio” do

repository "https://svn.apache.org/repos/asf/incubator/olio/"
revision "HEAD"
destination "/usr/local"
action :checkout

end

install faban

ark “install-faban” do

url "http://java.net/projects/faban/downloads/download/faban-kit/faban-kit-022311.tar.gz"
version "1.0"
path "/usr/local"
append_env_path true

end

When i upload this file and run the client the following error occurs: NoMethodError: undefined method `url' for Chef::Resource::Ark

Can somebody please tell me where the problem is?

more →
0 293  
0
apache2 with vhost using mod_proxy commands

I have just started using chef and I hit a bit of a stumbling block using the apache2 cookbook for a fresh apache install. My goal is to setup an apache virtual host to proxy to some other web app.

I started by creating a cookbook ‘mysite’ which has a recipe & template as shown below (some details omitted).

recipe mysite – include_recipe “apache2” include_recipe “apache2::mod_proxy” include_recipe “apache2::mod_proxy_http”

web_app “sigdev” do server_name node[‘hostname’] template “mysite.conf.erb” end

template mysite.conf.erb –

<VirtualHost *:80> ServerName <%= @params[:server_name] %> ProxyRequests Off ProxyPreserveHost On

# remote app ProxyPass /app <%= @params[:app_url] %> ProxyPassReverse /app <%= @params[:app_url] %> </VirtualHost>

When chef-client runs, a failure is reported because apache fails to start

[2012-08-30T11:47:21-04:00] ERROR: service[apache2] (apache2::default line 220) has had an error [2012-08-30T11:47:21-04:00] ERROR: service[apache2] (/var/cache/chef/cookbooks/apache2/recipes/default.rb:220:in `from_file') had an error: service[apache2] (apache2::default line 220) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’ —— Begin output of /sbin/service httpd start —— STDOUT: Starting httpd: [FAILED] STDERR: Warning: DocumentRoot [/opt/web/home] does not exist Syntax error on line 18 of /etc/httpd/sites-enabled/sigdev.conf: Invalid command ‘ProxyRequests’, perhaps misspelled or defined by a module not included in the server configuration —— End output of /sbin/service httpd start —— Ran /sbin/service httpd start returned 1

I have tried various combinations of including the recipes to enable mod_proxy and using the apache_mod definition in my recipe. No matter what I try, it keeps failing at the end of the apache::default cookbook where it starts the apache service.

I have looked in the mods-enabled directory and mod_proxy was not enabled which is why the service fails to start. However, I can’t seem to get it to enable mod_proxy before starting the service.

I found that there were a few ways to get past this problem.

1) After chef-client fails, manually enable the mod_proxy module. The next run will work without a problem. This requires manual intervention though. 2) Override the default modules using a role. This works without any manual intervention but it feels wrong… 3) Change the apache2 service in the apache2 default recipe to ‘action :nothing’. This still results in the service being started since the initial run queues a restart of the service. I would rather not have to modify the cookbook but it seems like the best option that I can find.

Is there a better way to handle this?

more →
0 420  
0
Latest Windows Cookbook (1.5.0) blows up on tasks

I had to revert to 1.4.0 after I was unable to fix a situation in which no matter what I did, I got this when I attempted to create a task:

NoMethodError

undefined method `[]‘ for false:FalseClass

Cookbook Trace:

c:/chef/cache/cookbooks/windows/providers/task.rb:91:in `load_current_resource'

Something was declaring something false, it appears.

This was with every conceivable variation of the recipe. Reverting to 1.4.0 fixed the problem. Was there something I was doing wrong with a new feature etc, or is this a bug? Thanks.

more →
0 75  
0
Cookbook Install error

My Platform : Windows 8 and Git 1.8.0-preview20121022 and Chef Client 10.16.2

When I run knife cookbook site install database, i get the following error,

… Cookbook postgresql version 2.1.0 successfully installed Installing openssl to d:/kitchen/chef-repo/cookbooks Checking out the master branch. Pristine copy branch (chef-vendor-openssl) exists, switching to it. Downloading openssl from the cookbooks site at version 1.0.0 to d:/kitchen/chef- repo/cookbooks/openssl.tar.gz Cookbook saved: d:/kitchen/chef-repo/cookbooks/openssl.tar.gz Removing pre-existing version. Uncompressing openssl version 1.0.0. removing downloaded tarball 5 files updated, committing changes ERROR: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’ Begin output of git commit -m “Import openssl version 1.0.0” — openssl —– STDOUT: # On branch chef-vendor-openssl STDERR: End output of git commit -m “Import openssl version 1.0.0” — openssl —— Ran git commit -m “Import openssl version 1.0.0” — openssl returned 1 ….

I get this error only on windows, but when I tried the same command on Linux it works perfectly.

Guessing its an issue with Windows Git ???

Any help in this regard will be of great help.

~Kamesh

more →
0 58  
0
Best practices manage multiple projects on open source chef-server

I need to manage multiple projects, should I use one big cookbook for each project?
To group recipes as per application per cookbook might be good for reuse, but it might become difficult to maintain the low level works if we have more than a few projects.

more →
0 60  
0
Cookbook upload

i downloaded the apache2 cookbook in the cookbooks directory from there i am trying to upload it to hosted chef server
with this
knife cookbook upload apache2

This is the error i am getting. Uploading apache2 [1.6.0] ERROR: OpenSSL::SSL::SSLError: SSL_connect returned=6 errno=0 state=SSLv3 read finished A

Any help. Thanks in advance Jayant

more →
0 34  
0
knife cookbook upload --all returns internal server error

When I run: knife cookbook upload --all

This is returned:

Uploading apache2      [1.6.2]
Uploading apt          [1.9.2]
Uploading build-essential [1.4.0]
Uploading chef_handler [1.1.4]
Uploading dmg          [1.1.0]
Uploading git          [2.5.0]
Uploading mysql        [3.0.0]
Uploading openssl      [1.0.2]
Uploading php          [1.1.8]
Uploading runit        [1.1.4]
Uploading sudo         [2.1.2]
Uploading users        [1.5.0]
Uploading vim          [1.0.2]
Uploading windows      [1.8.10]
Uploading xml          [1.1.2]
Uploading yum          [2.2.0]
ERROR: Server returned error for https://chef.lbox.com/sandboxes/000000000000a7f169ffc8cbaefb57e7, retrying 1/5 in 3s
ERROR: Server returned error for https://chef.lbox.com/sandboxes/000000000000a7f169ffc8cbaefb57e7, retrying 2/5 in 8s
ERROR: Server returned error for https://chef.lbox.com/sandboxes/000000000000a7f169ffc8cbaefb57e7, retrying 3/5 in 16s
ERROR: Server returned error for https://chef.lbox.com/sandboxes/000000000000a7f169ffc8cbaefb57e7, retrying 4/5 in 18s
ERROR: Server returned error for https://chef.lbox.com/sandboxes/000000000000a7f169ffc8cbaefb57e7, retrying 5/5 in 53s
ERROR: internal server error
Response: internal service error

I checked the server logs with chef-server-ctl tail

But it doesn’t seem like anything is there:

find: `/var/log/chef-server/erchef': Permission denied
find: `/var/log/chef-server/chef-expander': Permission denied
find: `/var/log/chef-server/rabbitmq': Permission denied
find: `/var/log/chef-server/chef-solr': Permission denied
find: `/var/log/chef-server/chef-pedant': Permission denied
find: `/var/log/chef-server/bookshelf': Permission denied
find: `/var/log/chef-server/chef-server-webui': Permission denied
find: `/var/log/chef-server/nginx': Permission denied
2013-05-15_17:50:58.23488 FATAL:  terminating connection due to administrator command
2013-05-15_17:50:58.23488 FATAL:  terminating connection due to administrator command
2013-05-15_17:50:58.23489 FATAL:  terminating connection due to administrator command
2013-05-15_17:50:58.23489 received TERM from runit, sending INT instead to force quit connections
2013-05-15_17:50:58.23490 LOG:  shutting down
2013-05-15_17:50:58.23491 LOG:  received fast shutdown request
2013-05-15_17:50:58.23491 LOG:  database system is shut down
2013-05-15_17:51:36.71153 LOG:  database system was shut down at 2013-05-15 17:50:58 GMT
2013-05-15_17:51:36.74589 LOG:  database system is ready to accept connections
2013-05-15_17:51:36.75655 LOG:  autovacuum launcher started

Any suggestions on why I can’t upload cookbooks? Where can I go to see more detailed errors? I’m at a loss. Thank you.

more →
0 24