Is there a good way to cache the status from dism when the Windows Features I want installed are with Octopus Deploy as dism is super slow?
Thanks for reaching out!
I’m not sure I’m following the " when the Windows Features I want installed are with Octopus Deploy" part. Could you please explain this a bit in more detail?
So I’m using the “Windows – Ensure Features Installed” step (https://library.octopusdeploy.com/step-template/actiontemplate-windows-ensure-features-installed) to make sure appropriate windows features are installed for my software and that uses dism behind the scenes.
I have in the past used dism and found it was slow for our Indian subcontractors, so I suspect the same is happening here. What I want to do is to cache the required features against the last time the step was run in Octopus (ideally on that environment) so it only runs dism for changes so it all works a bit quicker.
Let me know if it still isn’t clear and we can have a chat about it.
Thanks for the explanation, I believe now I understand your scenario.
I have to admit I have almost 0 experience with dism in production scenarios (mostly used it for local labs), so please keep that in mind when reading my approach.
If you wanna stick with dism, what you could do is create some sort of logfile on the Tentacle on each run, that logs which features were intalled in the Tentacle. Then in your process, before executing dism, you would read which features were installed the last time, and only install the new ones.
Now, what I would personally do is use Powershell DSC instead. Using the Windows Feature DSC Resource you could easily install only the missing features on each run, without needing any extra logic. DSC won’t care about “what was installed before”. You’ll only tell DSC "Ok, I want features 1,2,3 installed on this Tentacle, and DSC would check if each is installed, and only install the missing ones.
Hope that helps,
Thanks for that, I’ll take a look at the powershell DSC option.