tag:blogger.com,1999:blog-5841005254859736061.post9106481606891523053..comments2022-09-10T06:28:25.773-07:00Comments on Release Engineer - organizing chaos in the world of IT: Single chef-client run with multiple reboots on WindowsWhy did I have to make another profile?http://www.blogger.com/profile/08131179997260010692noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-5841005254859736061.post-1069801562674390352015-03-17T11:31:32.295-07:002015-03-17T11:31:32.295-07:00Alex, I have actually broken this up a bit more th...Alex, I have actually broken this up a bit more thanks to berkshelf. I have a base default server, then the win_task, then the RDSH install, then XenDesktop 7.6 VDA, then applications. <br /><br />example of default server<br />if node[:os_version] >= '6.2'<br /> %w{ File-Services CoreFileServer WindowsServerBackup NetFx3ServerFeatures NetFx3 ServerManager-Core-RSAT ServerManager-Core-RSAT-Role-Tools RSAT-AD-Tools-Feature RSAT-ADDS-Tools-Feature }.each do |feature|<br /> windows_feature feature do<br /> action :install<br /> not_if {reboot_pending?}<br /> end<br /> end <br />else<br /> powershell_script "default" do<br /> code <<-EOH<br /> Import-Module ServerManager<br /> Add-WindowsFeature FS-FileServer<br /> Add-WindowsFeature Backup<br /> Add-WindowsFeature Backup-Tools<br /> Add-WindowsFeature Net-Framework-Core<br /> Add-WindowsFeature Powershell-ISE<br /> Add-WindowsFeature WSRM<br /> Add-WindowsFeature GPMC<br /> Add-WindowsFeature RSAT-AD-Tools<br /> Add-WindowsFeature RSAT-ADDS-Tools<br /> EOH<br /> not_if {reboot_pending?}<br /> end<br />end<br /><br />windows_reboot 30 do<br /> reason 'A System Restart has been requested. Rebooting now..'<br /> only_if {reboot_pending?}<br />end<br />Pigram86https://www.blogger.com/profile/05795502022926085033noreply@blogger.comtag:blogger.com,1999:blog-5841005254859736061.post-78246669020357720812015-03-16T21:08:06.979-07:002015-03-16T21:08:06.979-07:00Todd, thanks. I made a few changes to the repo to ...Todd, thanks. I made a few changes to the repo to make usecase clearer. Also, the windows_feature in the windows cookbook allows for easy installations with /noreboot flag out of the box.<br /><br />BTW. I think this may be the first real reply on this blog (achievement unlocked) :pWhy did I have to make another profile?https://www.blogger.com/profile/08131179997260010692noreply@blogger.comtag:blogger.com,1999:blog-5841005254859736061.post-23618949561327250562015-02-25T12:03:13.125-08:002015-02-25T12:03:13.125-08:00Alex,
Great write up. You have every instance of ...Alex,<br /><br />Great write up. You have every instance of a pending reboot that I can think of except for installing multiple patches with /quite /norestart. I normally zip up the patches and create a .cmd, then call the .cmd from a batch recipe (https://github.com/pigram86/cookbook-w2k8_postsp1hotfixes). At the end of the .cmd, I provide a shutdown /r as {reboot_pending?} doesn't catch it. Also on pattern2.rb, all clients after 11.12 have an issue with RDSH and continuing the run. I insert a windows_task job to create a chef-client every 15 minutes prior to the RDSH section being run. I use this https://github.com/pigram86/cookbook-win_tasks for the win tasks. I have found that its best to use a domain service account to set the task. I use attribute files (one of each domain) for username and passwords, as well as a recipe per domain. Cumbersome, but it works. Without this, I would have to either repair the Client or uninstall/reinstall. Pigram86https://www.blogger.com/profile/05795502022926085033noreply@blogger.com