Self-hosted agents for Azure Devops Services pipeline using SCA
PeterDanielsCO
Posts: 2 New member
Hi,
I'm building a Devops POC for a client. They have:
1) Azure Devops (on <org>.visualstudio.com)
2) TFSVC - repo - hosted in above devops organization.
I've put together a Demo of SCA where the check-in to the TFSVC repo triggers a build in an Azure Devops pipeline that uses the "RedGate SQL Change Automation: Build" Azure Devops plugin. This creates a nuget package build artifact. All good to here.
I would like to implement release and deployment in the pipeline - first target will be a dev-integration/test DB. However, Azure Devops services does not have access to our corp network and therefore can't connect to our SQL Servers.
1) Can you confirm that the best way to implement this is to install and configure a self-hosted build agent? I was kinda hoping we could leverage something like our existing Power BI on-prem data gateway.
2) Will you help me configure this build agent? The MS docs have been difficult for me so far.
Hoping to get this POC in place soon, so we can get some leverage to buy SQL Toolbelt licenses.
TIA,
-Peter
I'm building a Devops POC for a client. They have:
1) Azure Devops (on <org>.visualstudio.com)
2) TFSVC - repo - hosted in above devops organization.
I've put together a Demo of SCA where the check-in to the TFSVC repo triggers a build in an Azure Devops pipeline that uses the "RedGate SQL Change Automation: Build" Azure Devops plugin. This creates a nuget package build artifact. All good to here.
I would like to implement release and deployment in the pipeline - first target will be a dev-integration/test DB. However, Azure Devops services does not have access to our corp network and therefore can't connect to our SQL Servers.
1) Can you confirm that the best way to implement this is to install and configure a self-hosted build agent? I was kinda hoping we could leverage something like our existing Power BI on-prem data gateway.
2) Will you help me configure this build agent? The MS docs have been difficult for me so far.
Hoping to get this POC in place soon, so we can get some leverage to buy SQL Toolbelt licenses.
TIA,
-Peter
Tagged:
Best Answer
-
Sergio R Posts: 610 Rose Gold 5Hi Peter,
1 - Yes, the best way is to use a Self-Hosted agent
If you wish to you can also open inbound TCP port 1433 (or other non-standard port) connections to your SQL Server from the Microsoft Hosted Agent: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops#agent-ip-ranges
Alternatively, you could also release to an Azure SQL Database (you would also need to setup firewall rules to allow connect from the Hosted agent)
2 - This document provides the instructions on setting up a Self-Hosted agent: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops
Sergio
Product Support Engineer
Redgate Software Ltd
Please see our Help Center for detailed guides on how to use our tools
Answers
Also, the MS docs are not great. I found them to have a number of confusing pieces, so I provided some feedback to them.
Oddly, I discovered that you can't run the agent intall config.cmd in powershell ISE. You have to run it in a regular powershell console. Also, I had to hand-type my PAT since it refused to successfully copy/paste.
Anyway, the agent is up, and enlisted in the Azure devops pipeline release tasks of "create releas" and "deploy release".
Ready to demo.