popularity question answers views user  
1
chef-client Windows service

I feel like I’m missing something….but, I’m not seeing a “Windows Service” wrapper for chef-client anywhere…

Does this exist? How else can we force chef-client to check-in periodically on Windows?

more →
1 783  
1
Mount a network drive to windows using Chef-solo

I need to mount a network drive on a windows vm. I am currently using chef solo to automate the process.

This is what I have in my recipe file:

mount "W:" do
  action :mount
  device "\\\\blazer\\INTAPPS"
end

This does not work and I get the following error messages:

Unable to detect IP6Address ...
chef-client does not have administrator priviledges on node BESTVM.ms.otpp.net. This might cause unexpected resource failures....

I can manually map the drive on the windows vm, but then I need to provide a domain-name-qualified user name and password. Is there a way I can provide the domain name, user name, password to the mount resource? is there an alternate way to mount the drive using chef?

I also tried the following command (as suggested in http://docs.opscode.com/ctl_chef_client.html)

runas /user:my_user_name "cmd /C chef-client"

After I entered password, a window appears and then dissapears. So I don’t exactly know what is happenning in it.

I am an absolute new by to chef, so a detailed answer would be very much appreciated.

Thanks.

more →
2 47  
0
windows user provider password hashing requirements

What kind of hashes does the windows user provider support for passwords?

After a quick research I’m under the impression that the underlying NetUser* APIs use plain text password. Wish I’m mistaken!

more →
0 216  
0
Using Chef to backup Windows Servers configs - AD,DNS,IIS,DHCP, Exchange the lot

I have been looking at Chef as a tool for backing up config my windows servers. But from what I can see this is geared more towards *nix doesnt look like there are many scripts for backing windwos configurations up for change management.

Has anybody got any experience using this in a windows environment? Or does anybody know of any other tools that can be used for windows.

Thanks Bill

more →
0 159  
0
ArgumentError: invalid byte sequence in US-ASCII

When I ran “chef-client” on nodes(windows 2008, windows 7) with mysql::server, I got the following error:

[2012-08-08T09:55:04+08:00] INFO: Chef 10.12.0 [2012-08-08T09:55:22+08:00] INFO: Run List is [recipe[mysql::server]] [2012-08-08T09:55:22+08:00] INFO: Run List expands to [mysql::server] [2012-08-08T09:55:22+08:00] INFO: Starting Chef Run for node08a.gdeii.com.cn [2012-08-08T09:55:22+08:00] INFO: Running start handlers [2012-08-08T09:55:22+08:00] INFO: Start handlers complete. [2012-08-08T09:55:22+08:00] INFO: Loading cookbooks [chef_handler, mysql, openss l, windows] [2012-08-08T09:55:22+08:00] INFO: Storing updated cookbooks/mysql/recipes/server .rb in the cache. [2012-08-08T09:55:23+08:00] INFO: Could not find previously defined grants.sql r esource [2012-08-08T09:55:23+08:00] INFO: Processing remote_file[c:/chef/cache/mysql-con nector-c-6.0.2-win32.msi] action create (mysql::client line /chef/cache/cookbook s/mysql/recipes/client.rb) [2012-08-08T09:55:23+08:00] INFO: Processing windows_package[MySQL Connector C 6 .0.2] action nothing (mysql::client line /chef/cache/cookbooks/mysql/recipes/cli ent.rb) [2012-08-08T09:55:23+08:00] INFO: Processing windows_path[C:\Program Files (x86) \MySQL\MySQL Connector C 6.0.2\bin] action add (mysql::client line /chef/cache/c ookbooks/mysql/recipes/client.rb) [2012-08-08T09:55:23+08:00] INFO: Processing env[PATH] action modify (c line /ch ef/cache/cookbooks/windows/providers/path.rb) [2012-08-08T09:55:23+08:00] INFO: Processing windows_package[MySQL Connector C 6 .0.2] action nothing (mysql::client line /chef/cache/cookbooks/mysql/recipes/cli ent.rb) [2012-08-08T09:55:23+08:00] INFO: Processing windows_path[C:\Program Files (x86) \MySQL\MySQL Connector C 6.0.2\bin] action add (mysql::client line /chef/cache/c ookbooks/mysql/recipes/client.rb) [2012-08-08T09:55:23+08:00] INFO: Processing env[PATH] action modify (c line /ch ef/cache/cookbooks/windows/providers/path.rb) [2012-08-08T09:55:23+08:00] INFO: Processing windows_package[MySQL Connector C 6 .0.2] action install (mysql::client line /chef/cache/cookbooks/mysql/recipes/cli ent.rb) [2012-08-08T09:55:23+08:00] INFO: Processing gem_package[mysql] action install ( mysql::client line /chef/cache/cookbooks/mysql/recipes/client.rb) NOTE: Gem::SourceIndex.from_gems_in is deprecated with no replacement. It will b e removed on or after 2011-10-01. Gem::SourceIndex.from_gems_in called from C:/opscode/chef/embedded/lib/ruby/gems /1.9.1/gems/chef-10.12.0/lib/chef/provider/package/rubygems.rb:265 . [2012-08-08T09:55:24+08:00] INFO: Processing ruby_block[copy libmysql.dll into r uby path] action create (mysql::client line /chef/cache/cookbooks/mysql/recipes/ client.rb) [2012-08-08T09:55:24+08:00] INFO: Processing remote_file[c:/chef/cache/mysql-5.5 .21-win32.msi] action create (mysql::server line /chef/cache/cookbooks/mysql/rec ipes/server.rb) [2012-08-08T09:55:24+08:00] INFO: Processing windows_package[MySQL Server 5.5] a ction nothing (mysql::server line /chef/cache/cookbooks/mysql/recipes/server.rb) [2012-08-08T09:55:24+08:00] INFO: Processing windows_package[MySQL Server 5.5] a ction install (mysql::server line /chef/cache/cookbooks/mysql/recipes/server.rb)

[2012-08-08T09:55:24+08:00] INFO: Processing directory[C:\Program Files (x86)\My SQL\MySQL Server 5.5] action create (mysql::server line /chef/cache/cookbooks/my sql/recipes/server.rb) [2012-08-08T09:55:24+08:00] INFO: Processing windows_path[C:\Program Files (x86) \MySQL\MySQL Server 5.5\bin] action add (mysql::server line /chef/cache/cookbook s/mysql/recipes/server.rb) [2012-08-08T09:55:24+08:00] INFO: Processing env[PATH] action modify (c line /ch ef/cache/cookbooks/windows/providers/path.rb) [2012-08-08T09:55:24+08:00] INFO: Processing windows_batch[install mysql service ] action run (mysql::server line /chef/cache/cookbooks/mysql/recipes/server.rb) [2012-08-08T09:55:24+08:00] INFO: Processing execute[install mysql service] acti on run (dynamically defined) [2012-08-08T09:55:24+08:00] INFO: execute[install mysql service] ran successfull y [2012-08-08T09:55:24+08:00] INFO: Processing service[mysql] action nothing (mysq l::server line /chef/cache/cookbooks/mysql/recipes/server.rb) [2012-08-08T09:55:24+08:00] ERROR: service[mysql] (mysql::server line /chef/cach e/cookbooks/mysql/recipes/server.rb) has had an error [2012-08-08T09:55:24+08:00] ERROR: service[mysql] (c:/chef/cache/cookbooks/mysql /recipes/server.rb:101:in from_file') had an error: service[mysql] (mysql::server line /chef/cache/cookbooks/mysql/recipes/server.rb ) had an error: ArgumentError: invalid byte sequence in US-ASCII C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/windows-pr-1.2.1/lib/windows/e rror.rb:435:instrip' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/windows-pr-1.2.1/lib/windows/e rror.rb:435:in get_last_error' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/win32-service-0.7.2/lib/win32/ service.rb:962:instatus' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/provider /service/windows.rb:137:in current_state' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/provider /service/windows.rb:39:inload_current_resource' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource .rb:453:in run_action' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.r b:49:inrun_action' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.r b:85:in block (2 levels) in converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.r b:85:ineach' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.r b:85:in each' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.r b:85:inblock in converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource collection.rb:94:in block in execute_each_resource' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource _collection/stepable_iterator.rb:116:incall' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource collection/stepable_iterator.rb:116:in call_iterator_block' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource _collection/stepable_iterator.rb:85:instep' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource collection/stepable_iterator.rb:104:in iterate' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource _collection/stepable_iterator.rb:55:ineach_with_index' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource collection.rb:92:in execute_each_resource' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.r b:80:inconverge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/client.r b:330:in converge' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/client.r b:163:inrun' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/applicat ion/client.rb:254:in block in run_application' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/applicat ion/client.rb:241:inloop' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/applicat ion/client.rb:241:in run_application' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/lib/chef/applicat ion.rb:70:inrun' C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-10.12.0/bin/chef-client:2 6:in <top (required)>' C:/opscode/chef/bin/chef-client:19:inload' C:/opscode/chef/bin/chef-client:19:in `<main>‘ [2012-08-08T09:55:24+08:00] ERROR: Running exception handlers [2012-08-08T09:55:24+08:00] FATAL: Saving node information to c:/chef/cache/fail ed-run-data.json [2012-08-08T09:55:24+08:00] ERROR: Exception handlers complete [2012-08-08T09:55:24+08:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stack trace.out [2012-08-08T09:55:24+08:00] FATAL: ArgumentError: service[mysql] (mysql::server line /chef/cache/cookbooks/mysql/recipes/server.rb) had an error: ArgumentError: invalid byte sequence in US-ASCII

Do anyone know how to solve it ???? Many thanks

more →
0 168  
0
Error in Quck start of setting up of a Java Web Application

I am trying to set up the Chef architecture for the first time on my Windows 7 (32-bit) machine. For cloud information, I am using AWS credentials. In the initial step , when Chef tries to set up the architecture using my AWS credentials, I am getting errors. In the logs, I found these erros:

[2012-08-14T22:16:02+00:00] ERROR: Running exception handlers [2012-08-14T22:16:03+00:00] FATAL: Saving node information to /var/chef/cache/failed-run-data.json [2012-08-14T22:16:03+00:00] ERROR: Exception handlers complete [2012-08-14T22:16:03+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out [2012-08-14T22:16:03+00:00] FATAL: Chef::Exceptions::ShellCommandFailed: execute[update-java-alternatives] (java::openjdk line 27) had an error: Expected process to exit 0, but it exited with 1 —— Begin output of update-java-alternatives -s java-6-openjdk —— STDOUT: STDERR: update-java-alternatives: file does not exist: /usr/lib/jvm/.java-6-openjdk.jinfo —— End output of update-java-alternatives -s java-6-openjdk —— Ran update-java-alternatives -s java-6-openjdk returned 1

more →
0 181  
0
Desktop Background change for windows

Hey Guys,

I need a cookbook to change the desktop background for all kind of windows machines. this is an urgent requirement for my project.Please help me friends.

please provide me cookbook link that changes the desktop BG.

thanks,

Raam

Nobody knows about this..?i need it very urgently..

more →
0 83  
0
invalid chef_server_url when bootstrap windows with ssh

i have a private chef server hosted on RHEL5, a work station on Debian 6. Now i use the work station to bootstrap a windows XP node with ssh(freeSshD).

Downloading chef-client-latest.msi and install… Ok. write validation.pem … Ok. write client.rb… Ok. run chef-client … failed when connecting chef-server

Because of invalid chef-server-url in client.rb.

echo.log_level :info
10...205 echo.log_location STDOUT
10...205 echo. 10...205 echo.chef_server_url “http://localhost:4000”
10...205 echo.validation_client_name “chef-validator"
10...205 echo.client_key "c:/chef/client.pem"
10...205 echo.validation_key "c:/chef/validation.pem"
10...205 echo. 10...205 echo.file_cache_path "c:/chef/cache"
10...205 echo.file_backup_path "c:/chef/backup"
10...205 echo.cache_options ({:path => "c:/chef/cache/checksums”, :skip_expires => true})
10...205 echo. 10...205 echo.# Using default node name (fqdn)
10...205 echo.encrypted_data_bag_secret “c:/chef/encrypted_data_bag_secret” 10...205 ) 1>C:\chef\client.rb

I try to specify chef_server_url as a parameter like this

sudo knife bootstrap windows ssh 10...205 -x administrator -P ‘password’ -s http://10...108:4000

but it still not work.

should i config this chef_server_url in some config file?

more →
1 175  
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