Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy software builds from Azure DevOps to internal servers?

We have our software hosted in Git on Azure DevOps and built using a build pipeline (which primarily uses a Cake script). We are now looking to deploy this software using the Azure DevOps release pipeline. However, all of our application servers are behind our firewall, inside of our network, and don't have any port open except for 80 and 443 for the web applications. We have dev, staging, and production servers for our apps (including some for load balancing). All I really need is to copy the artifact, backup the current code to a separate folder on the server, deploy and unzip the artifact file in the root deployment folder, and restart IIS on those servers.

My company is rather large and bureaucratic so there are some hoops we have to jump through for due diligence before we even attempt this new process. In that spirit, I am trying to find the best solution. If you can offer your advice, and in particular, offer any other solution we did not think of, that would be helpful:

  1. The obvious solution would be to stand up servers on Azure cloud and move completely to the cloud. I know this is a solution, and this may be where we go, but my request is for non-cloud solution options so I can present this properly and make a recommendation.
  2. Use a Hyper VPN tunnel to securely transfer the files and restart IIS. Probably the easiest and simplest method in regards to our already built build process on AzDO. Technically, this is the one I am least comfortable with.
  3. Use build agents inside the network, connect to them from AzDO, have them build the software, and then have them deploy it or other agents. Lots of work to set it up but so far the least intrusive to our security. I also am not a fan because I wanted AzDO to handle builds and deployments.
  4. Open the SFTP and SSH ports for each server and transfer the files that way. Maybe the least secure way but very simple?

If you have a better solution for this problem or a more common solution, let me know. If you think I should one of the 4 above solutions, let me know. If you can expand on any of the options above, please do.

like image 469
Ross Gustafson Avatar asked Apr 03 '19 13:04

Ross Gustafson


People also ask

How do you connect on premise to Azure DevOps?

Visual Studio 2019Choose Connect to a Project to select a project to connect to. Connect to a Project shows the projects you can connect to, along with the repos in those projects. Select Add Azure DevOps Server to connect to a project in Azure DevOps Services. Enter the URL to your server and select Add.

Can Azure DevOps be used for on premise?

The on-premises offering, Azure DevOps Server, is built on a SQL Server back end. Customers usually choose the on-premises version when they need their data to stay within their network. Or, when they want access to SQL Server reporting services that integrate with Azure DevOps Server data and tools.


1 Answers

ADO agents only require external connectivity, so they talk to ADO, not vice versa. So you only need 443 outbound to a couple of ADO urls.

Reading: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops#communication
https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops#im-running-a-firewall-and-my-code-is-in-azure-repos-what-urls-does-the-agent-need-to-communicate-with

like image 105
4c74356b41 Avatar answered Nov 09 '22 11:11

4c74356b41