TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

(Reasonably) secure Azure Pipelines on-prem deployments

31 pointsby Mossy93 months ago

7 comments

jiggawatts2 months ago
This article is NOT good advice and should be completely disregarded by any serious sysadmins.<p>You absolutely should not <i>remote</i> into the web server box from the agent box! This goes entirely against the grain of how modern Azure DevOps pipelines deployments are designed to work... hence the security issue that the hapless blogger is trying to unnecessarily solve.<p>The correct approach is to install the DevOps Agent <i>directly</i> onto the IIS web hosts, linking them to a named Environment such as &quot;Production Web App Farm A&quot; or whatever. See: <a href="https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;azure&#x2F;devops&#x2F;pipelines&#x2F;process&#x2F;environments-virtual-machines?view=azure-devops&amp;tabs=windows" rel="nofollow">https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;azure&#x2F;devops&#x2F;pipelines&#x2F;pro...</a><p>In your pipelines, you can now utilise Deployment Jobs linked to that named environment: <a href="https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;azure&#x2F;devops&#x2F;pipelines&#x2F;process&#x2F;deployment-jobs?view=azure-devops" rel="nofollow">https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;azure&#x2F;devops&#x2F;pipelines&#x2F;pro...</a><p>Deployment jobs have all sorts of fancy built-in capabilities such as pre-deployment tasks, rolling and canary strategies, post-deployment tasks, health checks, etc...<p>They&#x27;re designed to dynamically pick up the current &quot;pool&quot; of VMs linked to the environment through the agents, so you don&#x27;t need to inject machine names via pipeline parameters. Especially when you have many apps on a shared pool of servers, this cuts down on meaningless boilerplate.<p>All of the above works even with annoying requirements such as third-party applications where active-passive mode must be used for licensing reasons. (I&#x27;m looking at <i>you</i> ESRI and your overpriced software). The trick is to &#x27;tag&#x27; the agents during setup, which can then be used later in pipelines to filter &quot;active&quot; versus &quot;passive&quot; nodes.
评论 #43298374 未加载
bob10292 months ago
If you have the choice, I&#x27;d strongly consider using Kestrel and self contained deployments.<p>IIS isn&#x27;t &quot;bad&quot;, but it&#x27;s definitely way more complicated than these newer hosting models.<p>Controlling 100% of the hosting environment from code is a really nice shift in responsibility. Takes all the mess out of your tooling and processes. Most of the scary is resolved at code review time.
评论 #43301404 未加载
评论 #43299245 未加载
评论 #43298681 未加载
bragh2 months ago
If you are anyway forced to use IIS for hosting for some reason, then why not use msdeploy.exe for deployment? I have recently used this guide with great success <a href="https:&#x2F;&#x2F;dennistretyakov.com&#x2F;setting-up-msdeploy-for-ci-cd-deployments-to-iis&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dennistretyakov.com&#x2F;setting-up-msdeploy-for-ci-cd-de...</a><p>Can&#x27;t find the documentation for it now, but in some version of msdeploy they also added a way to automatically bring the site offline while deployment was done so that the deployment is not blocked by files in use.
评论 #43298223 未加载
egamirorrim2 months ago
It&#x27;s mind blowing to me that people still ship software by copying a file to a machine and restarting a service.<p>I&#x27;m very unfamiliar with IIS hosting though, does it support any kind of containerisation&#x2F;deployment immutability at all?
评论 #43298211 未加载
评论 #43298972 未加载
评论 #43298810 未加载
评论 #43300851 未加载
评论 #43298282 未加载
评论 #43301467 未加载
评论 #43301177 未加载
Mossy92 months ago
Author here - very surprised to see this on the front page after posting it a few days ago. Thanks for the resurrect!<p>For those wondering how anyone is dealing with such an ancient process, I&#x27;ve written a piece about the history of automation in our org that might shed some light: <a href="https:&#x2F;&#x2F;rewiring.bearblog.dev&#x2F;automation-journey-of-a-legacy-organization&#x2F;" rel="nofollow">https:&#x2F;&#x2F;rewiring.bearblog.dev&#x2F;automation-journey-of-a-legacy...</a>
Kwpolska2 months ago
If you’re doing ASP.NET Core, you should be able to get away without restarting the IIS app pool. You can just create a `app_offline.htm` file, wait some time until the process fully shuts down, deploy the new code, and finally remove the .htm file.
评论 #43300141 未加载
junto2 months ago
If you’re still forced to deal with IIS and Windows Services deployments then I’d highly suggest moving to Octopus Deploy for this. It saves so much headache. Starter edition license is just $360 per year.
评论 #43299958 未加载
评论 #43299686 未加载