Today at work, I did a demo of Chef running on Azure. It went badly despite my rehearsal in the morning: Visual Studio Code, which I like when running on my laptop, seemed a nice lightweight choice as the editor. During the demo the server was clearly suffering, so much so I even struggled to bring up the Task Manager. I should at least mention the configuration. This is it:
So not mega-brilliant, but for the little it was being asked to do, quite reasonable I thought. And it has an (Azure) SSD. Check this out then: cpu effectively sitting at 100% just after I start VSC, and going back to idle just after I exit:
Also, this is on Windows Server 2016 evaluation as you see from the screenshot above. Now let’s see how VSC behaves on a VM (admittedly a desktop) running Windows 8.1 Enterprise:
This is the setup:
I installed and started VSC… and it was very quick, and didn’t use any CPU, well:
Here we see that although there are a number of instances, they are each at 1%, worst case. And the editor is entirely usable:
Lesson for me: don’t use VSC on a Windows Server, or at least 2016. As a parting shot, let’s see if Brackets behaves OK on the 2016 server.
And that’s fine, defined as CPU goes up at the point of installation, and then goes back to idle, give or take:
So I’ll run the .rb with this content, as per the Chef website…
powershell_script 'Install IIS' do
code 'Add-WindowsFeature Web-Server'
not_if "(Get-WindowsFeature -Name Web-Server).Installed"
service 'w3svc' do
action [:enable, :start]
file 'c:\inetpub\wwwroot\Default.htm' do
Looking at the diagnostics in the output below, then we see that Install IIS, and the 2 w3svc commands, are skipped over, but the file does not exist, so Chef creates it, and confirms the content:
If I now point at the location of the created page: