Enable optional IIS modules in base VM image.
Some testing scenarios may require optional IIS modules to be enabled (e.g. authentication methods), which are disabled by default. We can enable them from build script using DISM or Server Manager, but that consumes time during each build. Also, there exists theoretical possibility that module will require machine to reboot after configuration.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on 07 Dec, 2014 11:02 PM
Have you tried
Install-WindowsFeature
(http://technet.microsoft.com/library/jj205467.aspx) to see if it has acceptable performance?2 Posted by Pavel Frolov on 08 Dec, 2014 09:04 AM
I've tried Install-WindowsFeature and Enable-WindowsOptionalFeature
cmdlets. Both takes about 2 minutes to enable 3 IIS modules. Maybe I can
reduce that tine by using PowerShell background jobs (e.g. starting
asynchronous job in “init” script and waiting for completion in
“before_test” script).
By the way, TrustedInstaller service, which is needed by both
Install-WindowsFeature and Enable-WindowsOptionalFeature, is disabled in VM
image for some reason. That said, before enabling optional Windows
features, one must enable TrustedInstaller service:
Set-Service TrustedInstaller -StartupType Manual
Support Staff 3 Posted by Feodor Fitsner on 08 Dec, 2014 07:38 PM
2 minutes is not bad I can tell :)
Alternatively, we could deploy fully-loaded IIS. What modules are you interested in first?
TrustedInstaller and many others are disabled to speedup boot time and minimize OS RAM/CPU overhead.
4 Posted by Pavel Frolov on 09 Dec, 2014 09:22 AM
Actually, I need IIS during testing phase to test some HTTP client code
against HTTP server using various authentication schemes (Basic, Digest,
Negotiate). For each scheme there exist optional IIS module which must be
enabled. Unfortunately as I found out, Digest and Negotiate methods
requires Windows domain environment, and while it is possible to deploy AD
DS with PowerShell, this operation will take unacceptable amount of time
and will require reboot in the end.
Ultimately, I decided to automate just Basic authentication tests. I've
used PowerShell background job to install IIS module while my application
is building. As s result, by the time my test script starts executing, IIS
module is already enabled! So, for now there is almost no overhead and I'm
satisfied with that.
But I think, fully-loaded IIS is a better alternative from usability
standpoint, especially if it doesn't involve additional overhead during VM
provisioning. And if it does involve overhead we could make it a separate
option in “services” for those developers who need it, i.e., "services:
iis-full".
Support Staff 5 Posted by Feodor Fitsner on 09 Dec, 2014 06:47 PM
Right, will add an issue for that.
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:50 AM.