Setup for ASP.NET web application
Asked Answered
L

2

9

We have some ASP.NET web application which used in 2 ways:

  • enterprise solution (msi-like installer)
  • cloud solution (use same installer)

Currently we use home-grown installer, but consider if we can replace it with something more convenient and suitable for CI/CD development cycle.

What technologies/products can be used? Currently I think about webdeploy, but not sure how it can be applied for enterprise setup...

Lamppost answered 20/3, 2017 at 8:5 Comment(0)
P
4

This is quite a broad question, but I think it deserves an answer.

1. (partially) Open source solution

One way to configure CI cycle is to use Jenkins along with MS deployment functionality. This article shows how to quickly set up a job to integrate Jenkins with msdeploy tool.

Basically it configures a job to perform the deployment using Powershell:

msdeploy.exe -allowUntrusted=true -verb:sync -source:contentpath='D:\WS\ExampleProject' -dest:contentpath=F:\webfolder,computerName=exampleproject.example.com,Username='yourdomain\username',Password='password' -skip:objectName=dirPath,absolutePath="config" -skip:objectName=filePath,absolutePath="web.config"

It also tells that the executing user should be an administrator on target server, but this can be circumvented through proper configuration of Web Deployment Handler as indicated in this article.

One intermediary step that can be done before Jenkins integration (which I recommend) is to configure Web deployment. This allows to quickly check that deployment can be performed onto target server IIS using Visual Studio and any configured user that is allowed to deploy. It also allows to quickly see the difference between current code base (web pages, JS files, binaries) and target server deployed package.

2. Visual Studio 2017 DevOps solution

Microsoft recently released VS 2017 which contains a great support for DevOps which handles most the issues related to CI/CD. I cannot find a reference, but I remember that this feature is available for Enterprise version only. Also, the good news is that it is not tightened to Microsoft technologies.

A presentation related to the subject can be found here.

I think WebDeploy can be used without significant problems. From my experience with it:

  • backup limitation: can be done only at Web Site level, not Web application level
  • deployment time: is quite small - actual files copy + Web site backup (if configured) + application pool recycle.
Pigeonhole answered 24/3, 2017 at 12:46 Comment(0)
H
0

Recently I saw a vendor offering customers who wanted on-premises deployments the same Docker image that they use for cloud deployments. Seemed like a good, clean, solution.

Another option is nuget packages - host your own repository. Then deploy with a tool like Octopus Deploy. I'm not terribly familiar with it, but both solutions look to be easy after an initial hump in setup.

Hemianopsia answered 29/3, 2017 at 1:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.