Reg tar tool download and install in chefsolo-windows


#1

Hi all,
i need to download and install tar tool for windows,am using chef solo configuration, so i have edited a script in path /plugin/knife-chefsolo0.1/lib/chef/solo-bootstrap/chef-solowindows.erb,
here i ve added :

:install_tartoolpowershell -NoProfile -NonInteractive -Command “Import-Module ServerManager; Add-WindowsFeature NET-Framework-Features"for %%F in ( “C:\Program Files\TarTool_Beta\ICSharpCode.SharpZipLib.dll” “C:\Program Files\TarTool_Beta\TarTool.exe”) do if exist %%F (set found=1)
@if not defined found (@echo TarTool not found - Installing TarTool…cscript //nologo <%= bootstrap_directory %>\wget.vbs /url:”!TARTOOL_URL!" /path:"%LOCAL_DESTINATION_TARTOOL_PATH%" /extract:"yes"
DEL %LOCAL_DESTINATION_TARTOOL_PATH%goto change_recipe_extraction_path
) else (@echo Machine contains TarTool - Skipping TarTool installationgoto change_recipe_extraction_path)
:change_recipe_extraction_path> <%= bootstrap_directory %>\find_app_solo_path.rb (<%= find_app_solo_path %>)
I T DOESNOT GET DOWNLOAD AND EXTRACT ?Any idea guys?

Regards,Indra


#2

also error log here:
Installing chef…
I, [2015-02-10T21:18:02.958770 #16714] INFO – : 185.19.29.6 C:\chef\wget.vbs(40, 1) ADODB.Stream: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another

echo. if url.include? “.tar.gz” or url.include? “.tgz"
echo. system(”“C:/Program Files/TarTool_Beta/TarTool.exe” #{path} #{recipes_path}/cookbooks")
echo. elsif url.include? “.tar” echo. system("“C:/Program Files/TarTool_Beta/TarTool.exe” -x #{path} #{recipes_path}/cookbooks")

echo. elsif url.include? “.tar.bz2” or url.include? “.bz2"
echo. system(”“C:/Program Files/TarTool_Beta/TarTool.exe” -j #{path} #{recipes_path}/cookbooks")
echo. else
echo. puts “Entering else loop"
I, echo. system(”“C:/Program Files/TarTool_Beta/TarTool.exe” #{path} #{recipes_path}/cookbooks")
I, echo. end
I, echo. rescue Errno::ETIMEDOUT
I, echo. puts “Timedout while trying to download #{url}.Trying again"
I, echo. attempts += 1
I, echo. retry unless attempts > 11
I, echo. exit -1
I, echo. end
I, echo. end
I, echo. end
I, echo. end
I, echo.end
Thanks From: Indra k indra.k@cloudenablers.com
To: "chef@lists.opscode.comchef@lists.opscode.com
Sent: Wednesday, 11 February 2015 12:01 PM
Subject: [chef] reg tar tool download and install in chefsolo-windows

Hi all,
i need to download and install tar tool for windows,am using chef solo configuration, so i have edited a script in path /plugin/knife-chefsolo0.1/lib/chef/solo-bootstrap/chef-solowindows.erb,
here i ve added :

:install_tartoolpowershell -NoProfile -NonInteractive -Command “Import-Module ServerManager; Add-WindowsFeature NET-Framework-Features"for %%F in ( “C:\Program Files\TarTool_Beta\ICSharpCode.SharpZipLib.dll” “C:\Program Files\TarTool_Beta\TarTool.exe”) do if exist %%F (set found=1)
@if not defined found (@echo TarTool not found - Installing TarTool…cscript //nologo <%= bootstrap_directory %>\wget.vbs /url:”!TARTOOL_URL!" /path:"%LOCAL_DESTINATION_TARTOOL_PATH%" /extract:"yes"
DEL %LOCAL_DESTINATION_TARTOOL_PATH%goto change_recipe_extraction_path
) else (@echo Machine contains TarTool - Skipping TarTool installationgoto change_recipe_extraction_path)
:change_recipe_extraction_path> <%= bootstrap_directory %>\find_app_solo_path.rb (<%= find_app_solo_path %>)
I T DOESNOT GET DOWNLOAD AND EXTRACT ?Any idea guys?

Regards,Indra