![]() ![]() Upon installation, it asks me the following question. ![]() Many thanks to Isa Farnik from Opscode for help on this one.A few days ago, RubyInstaller 2.4 for Windows was released. Therefore, this is what the working Chef resource/provider code, which silently installs Ruby using the Ruby installer, looks like: windows_package "Ruby 1.9.3-p448" do When you use single quotes, problems disappear because single quoting is very literal. Double quotes create problems, especially if you don't fully understand which characters have to be escaped. The second tweak was with the quoting of Ruby strings.And using that "Display Name" ensures that if Chef runs again, it won't re-install the same Ruby if it is already present. That is what has to go after windows_package. (This is the "Display Name", and it is also in the Windows Registry for that piece of installed software). When you find it, you will see a very specific name for Ruby in the list of installed programs. When you install Ruby by hand using the installer, you have to go to the Windows Control Panel, and find the Ruby program to uninstall it. This problem was solved with two very subtle tweaks: Has anybody installed Ruby on Windows using Chef and the rubyinstaller, and can you provide a recipe?.Is there a way to see exactly which command is being run on the command line to install Ruby? e.g.Am I missing something in the windows_batch or windows_package syntaxes which prevents me from installing Ruby silently, unattended, and automatically using Chef?.It stays like this until the request times out. This is what the last few lines looked like: INFO: Processing windows_package action install (myrecipe::default line 53)ĭEBUG: :relay_output_from_backend => INFO: Installing windows_package version latest\r\n"]Į INFO: Installing windows_package version latestĭEBUG: :relay_output_from_backend => INFO: Starting installation.this could take awhile.\r\n"]Į INFO: Starting installation.this could take awhile. I tried the part above with the local source option commented out, and then tried it again with the remote source option commented out. Options "/silent /dir='C:/Ruby193' /tasks='modpath'" ![]() windows_package "rubyinstaller-1.9.3-p429" do I then tried replacing the windows_batch fragment with windows_package. And nothing was installed on the Windows server. And I knew that the installer hung because I got a message on the knife workstation saying that the Ruby installer had started, but it eventually timed out. I know this because when I RDP'ed into the Windows server, the rubyinstaller-1.9.3-p429.exe file was sitting there in c. However, the windows_batch hangs and the installation goes nowhere. In this situation, the remote_file works and the ruby installer is downloaded. I uploaded the recipe to the Chef server, and then ran the following to trigger a Chef run: > knife winrm '' 'chef-client -c c:/chef/client.rb' -m -x Administrator -P 'password' I have tried using windows_batch in the following recipe fragment: remote_file File.join("C:","rubyinstaller-1.9.3-p429.exe") do I would like to use Chef to automate this. I'm able to do this silently, unattended, and manually by running (on the Windows box in a command line window): C:\> C:/rubyinstaller-1.9.3-p429.exe /silent /dir='c:\Ruby193' /tasks=’modpath’ I'm trying to set up a Windows 2008r2 server on Amazon AWS with Ruby installed. My Chef workstation is running MRI Ruby 1.9.3 and gems knife-ec2 (v0.6.4) and knife-windows (v0.5.12). I'm new to Chef, so my question may seem somewhat uninformed. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |