Bryan Baugher | 21 Nov 22:37 2014
Picon

Printing command output

Hi everyone,


Whats the easiest way to print command output while its running? I've found older mailing list questions about this and things on SO but they mostly point to setting chef logging to debug which is not what I want. I would like to always print the output for this particular command as it often takes awhile to run and has valuable information.

Bryan
Jeff Blaine | 21 Nov 22:33 2014
Picon

Point of service resource *_command attrs?

I can't figure out what the *_command attributes are actually for.

Setting init_command, start_command ... etc... to a value seems
pointless when the chosen underlying provider has all of its hardcoded
information that it uses.

  service 'foo' do
    init_command '/bin/true'
    start_command '/bin/true'
    action [:enable, :start]
  end

  ==> "unable to locate the init.d script!"

Any ideas?

--

-- 
Jeff Blaine
kickflop.net
PGP/GnuPG Key ID: 0x0C8EDD02

Bryan Baugher | 21 Nov 20:39 2014
Picon

Push Jobs Questions

Hello everyone,


Is the push jobs code available on github anywhere? Also are there any plans to add a kind of concurrency option (i.e. don't run command X on all nodes at the same time)?

Bryan
Brad Knowles | 21 Nov 06:53 2014

Windows system standard program for unzip-ing archives?

Folks,

So, I've been trying to write some cross-platform Chef code for a customer, and one of the things we need to do
is to take a zip archive of a package written in Java, and deploy that.  The zip archive is completely
self-contained, we don't need to install it as an OS-level package or anything -- we just need to un-zip it
into an appropriate directory structure, and then run the appropriate included .sh or .BAT files.

This worked fine on RHEL5.  But I was astonished to find that there is apparently no standard tool to handle
this kind of thing on Win2k3 or Win2k8.

Am I missing something obvious here?  I mean, I can install a package easily enough, but this is a ...
sensitive ... customer, and there might have to be a lengthy delay in getting that approved through the
change control board.

Any and all ideas or thoughts would be appreciated.  Thanks!

--
Brad Knowles <brad <at> shub-internet.org>
LinkedIn Profile: <http://tinyurl.com/y8kpxu>

vinod_patil | 21 Nov 06:42 2014
Picon

IBM Biginsights 3.0 silent installation using Chef is failing


I am doing silent installation of Biginsights 3.0 using Chef. Strange thing is
that if I invoke the installation without Chef recipe i.e manually
"./silent-install.sh install.xml" it works fine. But when I invoke it through
Chef recipe , it fails. It does not install bigsql1,sheets and due that it
fails. I am pasting the error. It is not getting required files as bigsql1
installation is not completing successfully.

[ERROR] DeployManager - bigsql1 failed
com.ibm.xap.mgmt.ConfigurationException: initialize failed because
/opt/ibm/biginsights/hdm/components/bigsql1/binary/bigsql1-dist.tar.gz is not
found
    at
com.ibm.xap.mgmt.bigsql.BigSQL1Deployer.installInitialize(BigSQL1Deployer.java:73)
    at
com.ibm.xap.mgmt.DeployManager$InstallThread.doInstall(DeployManager.java:2760)
    at
com.ibm.xap.mgmt.DeployManager$InstallThread.work(DeployManager.java:2818)
    at com.ibm.xap.mgmt.DeployManager$WorkerThread.run(DeployManager.java:2725)

Any help will be appreciated. I am sure somewhere Chef is failing to invoke
bigsql1 install script and most probably it is terminal issue.

Here is my recipe code 

bash "BI3.0" do
user "biadmin"
group "biadmin"
cwd
"/home/biadmin/biginsights-3.0.0.1-SNAPSHOT-enterprise-production-Linux-amd64-b20140711_1047/silent-install"
code <<-EOH
sh silent-install.sh BI30.xml 2>&1 >> /tmp/console.out
EOH
end

John de la Garza | 20 Nov 21:36 2014

chefvm and KNIFE_CHEF_SERVER

If anyone could make sense of my last post and has a similar issue, I have found
a possible solution:

https://coderwall.com/p/dt1idw/share-your-chef-s-knife-rb-config-with-vagrant

This has helped me get the knife.rb info into my Vagrant file, without
relying on
a static env variable.  The knife.rb is dynamically changed when I run
chefvm.  This was what I needed.

John de la Garza | 20 Nov 21:15 2014

chefvm and KNIFE_CHEF_SERVER

In my .basrc I have this:  export KNIFE_CHEF_SERVER=http://33.33.33.1:8889,
which is a local chef-zero server

in my .chefvm/configurations/chef-east/knife.rb I have this:
chef_server_url  "https://chef-east.foo.in", which our production chef
server

Vagrant seems to rely on KNIFE_CHEF_SERVER from the environment here:
chef.chef_server_url = ENV['KNIFE_CHEF_SERVER']

So when I run 'chefvm use <some other server>' it sets up the chef_server_url
from the .chefvm/configurations/chef-east/knife.rb correctly but the
env var: KNIFE_CHEF_SERVER, stays the same

Am I doing something wrong here?  I would have thought vagrant would have
used the chef_server_url setting  in the
.chefvm/configurations/chef-east/knife.rb.

Right now when I run chefvm use <some_server>, I have to manually change
the KNIFE_CHEF_SERVER env var.

Simon Detheridge | 20 Nov 18:08 2014

How do I change 'interval' and 'splay' using chef-dk on Windows

So, I'm bootstrapping a Windows node with 'knife bootstrap windows' using chef-dk

Chef is using the windows_service init recipe. I've set chef_client/interval and chef_client/splay as
default attributes.

I can't find how to apply these to the Windows service. As far as I can tell, the service is looking at
c:\chef\client.rb for its settings. However, if I ensure these are written into a file in client.d, Bad
Things happen when I run chef-client::config because my bootstrapping chef decides it's going to act
like a daemon and never terminates once the chef run finishes.

If I skip running the config recipe, the setting is ignored because a client.rb isn't written that includes
stuff in client.d. If I manually write out a new client.rb using a different cookbook (probably not
recommended) there's no way to restart the chef service to reload it. (It doesn't support restart. Can't
use net stop/start as it waits for the bootstrapping chef to exit before stopping, so there's no way to
restart it again.)

Am I missing a trick, somewhere?

Thanks,

--

-- 
Simon Detheridge - CTO, Widgit Software
26 Queen Street, Cubbington, CV32 7NA - Tel: +44 (0)1926 333680

John de la Garza | 20 Nov 17:47 2014

uploading environments

When reading the docs on how to upload environments, I am seeing two ways.

1. knife upload environments
2. knife environment from file environments/*.json

Is there a reason to use one way over the other?

Fouts, Chris | 20 Nov 16:34 2014

Chef 12 cert keys

In Chef 11 I followed these to setup keys between my Chef server and workstation.

http://sachinsharm.wordpress.com/2013/10/11/installsetup-and-configure-chef-serverworkstationnode-on-centosrhel-6-4/

 

Seems like everything changed for Chef 12. Where are corresponding instruction to setup up a chef workstation to talk to a Chef 12 server?

 

Chris

koteswara rao Sakhamuri | 20 Nov 11:30 2014
Picon

Issue with datadog mysql

Hi Chefs,
I'm facing issue with mysql in datadog. Please help me to find out the solution. Am i doing anything wrong? od do i have to include the information of DB like database credentials etc.

========================================================
192.168.204.75
192.168.204.75 NoMethodError
192.168.204.75 -------------
192.168.204.75 undefined method `[]' for nil:NilClass
192.168.204.75
192.168.204.75 Cookbook Trace:
192.168.204.75 ---------------
192.168.204.75   /var/chef/cache/cookbooks/datadog/recipes/mysql.rb:24:in `block in from_file'
192.168.204.75   /var/chef/cache/cookbooks/datadog/recipes/mysql.rb:23:in `from_file'
192.168.204.75   /var/chef/cache/cookbooks/keas-datadog/recipes/mysql.rb:3:in `from_file'
192.168.204.75   /var/chef/cache/cookbooks/keas-percona/recipes/default.rb:19:in `from_file'
192.168.204.75
192.168.204.75 Relevant File Content:
192.168.204.75 ----------------------
192.168.204.75 /var/chef/cache/cookbooks/datadog/recipes/mysql.rb:
192.168.204.75
192.168.204.75  17:  #       "replication: 0",
192.168.204.75  18:  #       "galera_cluster: 1"
192.168.204.75  19:  #     ]
192.168.204.75  20:  #   },
192.168.204.75  21:  # ]
192.168.204.75  22:
192.168.204.75  23:  datadog_monitor 'mysql' do
192.168.204.75  24>>   instances node['datadog']['mysql']['instances']
192.168.204.75  25:  end
192.168.204.75  26:
192.168.204.75  27:
192.168.204.75  28:
192.168.204.75
192.168.204.75
192.168.204.75 Running handlers:
192.168.204.75 [2014-11-20T15:50:04+05:30] ERROR: Running exception handlers
192.168.204.75 Running handlers complete
192.168.204.75 [2014-11-20T15:50:04+05:30] ERROR: Exception handlers complete
192.168.204.75 [2014-11-20T15:50:04+05:30] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
192.168.204.75 Chef Client failed. 0 resources updated in 2.890363666 seconds
192.168.204.75 [2014-11-20T15:50:04+05:30] ERROR: undefined method `[]' for nil:NilClass
192.168.204.75 [2014-11-20T15:50:04+05:30] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsucce
sfully (exit code 1)


Regards,
Sakhamuri.

Gmane