popularity question answers views user  
0
Run list with same cookbook, but different attributes

HI,

I have a use case where I need to install both Java versions (64 and 32 bit). Can I run the same cookbook, once with a version attribute “32” and second run of the very same cookbook with a version attribute “64”? When I look @ the JSON file on my chef server for the node, I cannot see how to define the same version attribute for the two cookbooks separately.

Regards, Sebastian

more →
1 8  
0
Library method executed before recipe executed

I have a trouble when I created a library method to check availability of server. It is actually executed as soon as compilation finishes before the cookbook’s execution.
The associated files can be viewed here https://gist.github.com/anonymous/dda3a5441cff398ed9f8.

more →
0 1  
1
Opensource Chef 11 server behind a firewall

Hi,

I just upgraded our old Chef server to Chef 11, But I’m struggling to get my clients to reach the server. Our Chef-server is hosted internally, while our clients are in the cloud. Between them there’s a firewall that blocks all connections from the internet to the internal network.

Since Chef-client now connects to port 80 or 443, I’m unable to setup a portforward to Chef-client to work without exposing the Chef Webinterface.

Is there a way to tell Chef to use other ports for all communication? I tried setting the following in chef-server.rb. But this works only halve, the clients are added to the node-list, but the cookbook transfer fails because it wants to connect to https://chef-server.tld/bookshelf/organization….

nginx['non_ssl_port'] = 8140
nginx['enable_non_ssl'] = true

Any ideas?

more →
0 12  
0
no version specified, and no candidate version available for hadoop....

i want to install Hadoop using the chef.

  1. chef-server settings
  2. chef-client settings
  3. hadoop raised on chef-server # knife cookbook upload hadoop
  4. I was running on the client # chef-client
  5. i look forward to being installed hadoop. but I saw the following error.

FATA: Chef::Exceptions::Package: package[hadoop] (hadoop:default line 37) had an error: Chef::Exceptions::Package: No version specified, and no candidate version available for hadoop.

/var/chef/cookbooks/hadoop/recipes/default.rb are as follows:

  1 #
  2 # Cookbook Name:: hadoop
  3 # Recipe:: default
  4 #
  5 # Copyright 2009, Opscode, Inc.
  6 #
  7 # Licensed under the Apache License, Version 2.0 (the "License");
  8 # you may not use this file except in compliance with the License.
  9 # You may obtain a copy of the License at
 10 #
 11 #     http://www.apache.org/licenses/LICENSE-2.0
 12 #
 13 # Unless required by applicable law or agreed to in writing, software
 14 # distributed under the License is distributed on an "AS IS" BASIS,
 15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 16 # See the License for the specific language governing permissions and
 17 # limitations under the License.
 18 #
 19 
 20 include_recipe "java"
 21 
 22 execute "apt-get update" do
 23   action :nothing
 24 end
 25 
 26 template "/etc/apt/sources.list.d/cloudera.list" do
 27   owner "root"
 28   mode "0644"
 29   source "cloudera.list.erb"
 30   notifies :run, resources("execute[apt-get update]"), :immediately
 31 end
 32 
 33 execute "curl -s http://archive.cloudera.com/debian/archive.key | apt-key add -" do
 34   not_if "apt-key export 'Cloudera Apt Repository'"
 35 end
 36 
 37 package "hadoop"

I need help.

more →
0 12  
0
Chef Freelancers

Hi,
Where is the best place to find Chef freelancers?

We would like to automate the installation of TIBCO BusinessWorks (an enterprise integration platform) and it’s dependencies. It needs to work on both Windows and Linux. There are different installers for each platform and for the 32bit and 64bit versions.

I’m new to chef, I get the basic concepts, but don’t know enough about best practices and “the right way to do it”.

more →
0 12  
0
Can't install chef-client on Debian 5.0 system

Hi

I’m having real trouble getting chef-client installed on one of our devices. It’s more a gem problem, but not sure where best to ask this question…

192.168.1.136 ERROR: While executing gem … (Gem::DependencyError) 192.168.1.136 Unable to resolve dependencies: chef requires net-ssh (~> 2.1.3)

But, further up the script:–

192.168.1.136 Successfully installed net-ssh-2.6.7 192.168.1.136 Successfully installed net-ssh-gateway-1.2.0 192.168.1.136 Successfully installed net-ssh-multi-1.2.0

Any ideas?

Thanks!

more →
0 13  
0
How to reuse class/module

I used to have a separate rube files for highly common use sources, for example, FileOperate.rb, Log.rb etc. I tried to just put these file under the same folder with default.rb but chef could not recognize them. I tried convert them to library sources, but it was very hard to use and could not support arguments. How can I reuse some highly common source? I also tried to put them in an independent cookbook, but did not make it.

more →
0 9  
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 25  
0
Using JSON files to manage Chef

Hello everyone,

I am currently using Chef on an architecture with a chef-server and a lot of nodes. For some reason, we’d like to set all the configuration on json file (role, environments, nodes and data_bags) but the knife command “from file” does not offer the possibility to update an object by reading this json file. It actually destroys the object and create another, which can be inconvenient for the nodes. Is there an alternative solution to do so ?

more →
0 8
doc
 
0
knife bootstrap proxy

Hi,

How do i specify a username/password for a proxy server via knife.

I have tried the following:

C:\chef-repo>knife bootstrap windows winrm xx —run-list “recipe[jenkins_windows]” -x xx -P xxx —config “C:\chef-r epo.chef\knife.rb” —bootstrap-proxy “http://PROXY_USER:PROXY_PASS@PROXY_IP:80/”

But..

Accessed denied. Credentials are missing.

Any ideas?

more →
4 41