Printing command output
2014-11-21 21:37:38 GMT
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
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>
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-126.96.36.199-SNAPSHOT-enterprise-production-Linux-amd64-b20140711_1047/silent-install" code <<-EOH sh silent-install.sh BI30.xml 2>&1 >> /tmp/console.out EOH end
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.
In my .basrc I have this: export KNIFE_CHEF_SERVER=http://188.8.131.52: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.
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
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?
In Chef 11 I followed these to setup keys between my Chef server and workstation.
Seems like everything changed for Chef 12. Where are corresponding instruction to setup up a chef workstation to talk to a Chef 12 server?