Azure devops self-host deploy agent - azure-devops

If I am using a self-hosted deployment agent for my azure devops Ci\CD pipeline , and the pipeline is regarding to deploy Azure databricks notebook and also to build Azure sql database project and deploy dacpac ,
what component is required to be installed in that self-host agent ?

what component is required to be installed in that self-host agent ?
Prerequisites:
• Windows 7, 8.1, or 10 (if using a client OS)
• Windows 2008 R2 SP1 or higher (if using a server OS)
• PowerShell 3.0 or higher
• .NET Framework 4.6.2 or higher
Note - the minimum required .NET version for build agents is 4.6.2 or
higher. If you're building from a Subversion repo, you must install
the Subversion client on the machine.
You should run agent setup manually the first time.
Prepare permissions
Information security for self-hosted agents
Authenticate with a personal access token (PAT)
Confirm the user has permission
Download and configure the agent
Before you install a self-hosted agent you might want to see if a
Microsoft-hosted agent pool will work for you. In many cases this is
the simplest way to get going.
For more information refer - https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops&tabs=browser#install

Related

How to get VS build agent capabilities without installing the full Visual Studio application?

I've installed the latest VS Build Tools (2022), but my on-prem build agent isn't picking up the VisualStudio-related capabilities. I've been under the impression that we no longer need to install the full application in order to get these capabilities.
An example from this blog post:
I've added all workloads to my offline layout, and I've included them in my installation.
I know this is possible, because earlier I accidentally included Python and VS 2019 Build Tools in my Node.js installation configuration. The VS-related capabilities were found by the agent then.
But I'm trying to get 2022, so I uninstalled 2019.
How can I get the 2022 VS-related capabilities to be installed and detected by my build agent, without installing the full Visual Studio product?
You need to upgrade the agent to a recent enough version. You can download the agent from the azure-pipelines-agent repository's releases page. Or manually specify the capabilities.
You may need to set a special environment flag on the agent to prevent it from automatically being downgraded to whatever version shipped with your version if Azure DevOps Server or Team Foundation Server.
And then you'll also need to install the latest version of the vsbuild/msbuild and vstest tasks
Required agent version
You will need to install the most recent agent from the azure-pipelines-agent repository for it to auto-detect Visual Studio 2022, or alternatively add the capabilities to the agent manually.
You may need to force Azure DevOps Server to not downgrade back to its preferred agent version. You can do so by setting the following environment variable at the system level on your server before launching the agent:
AZP_AGENT_DOWNGRADE_DISABLED=true
These tricks will work for most tasks in the azure-pipelines-tasks repository, as long as it doesn't depend on a UI extension or service connection type that isn't available in your version of Azure DevOps Server.
https://jessehouwing.net/adding-visual-studio-2022-to-azure-devops-server-2020/

We are trying to build SSIS solution using CI pipeline in Azure and it is failing because our solution in password protected

Is there any way we can pass the password for the solution to get built properly with no error?
If you install the SQL Server Integration Services (SSIS) DevOps Tools Azure DevOps extension, there's an option to specify the password for your project.
Project password
Password of the SSIS project and its packages. This argument is only valid when the protection level of the SSIS project and packages is EncryptSensitiveWithPassword or EncryptAllWithPassword. For package deployment model, all packages must share the same password specified by this argument.
Please make sure to use Version 1.* , since the project password is a Version 1.* property.
Enhancements in version 1.*:
Remove the dependency on Visual Studio and SSIS designer. Build task can run on Microsoft-hosted agent or self-hosted agent with Windows OS and .NET framework 4.6.2 or higher.
No need of installing out-of-box components.
Support protection level EncryptionWithPassword and EncryptionAllWithPassword.

Azure DevOps Self-hosted Agent Capabilities Ubuntu

I'm building a packer image for Azure Devops based on Ubuntu 20.04 for self-hosting. But I can't figure out how I should be adding capabilities. I've installed things like Java and Android SDK and set environment variables for their paths. I can see these when I run printenv but they aren't picked up by the agent. I've stopped & re-started the service, the only way I can get capabilities is by adding them to the .env in the folder where the devops agent is installed and stopping / restarted. How should this work ?

Installing deployment azure agent on server fails: System.IO.FileNotFoundException: Could not load file or assembly 'DotNetAgent, Version=1.0.0.0

I do not know whether SO is the best place for this problem, so if you know a better location, let me know, than I will move it there.
We had a properly running Azure Devops deployment pool running with an agent on our VPS. But my PAT expired so I installed a new agent (yes I know, I could have just extended the expire date of my PAT, but I failed to realize that at the time).
But when I install the agent through the script that DevOps provides I get the following error message:
System.IO.FileNotFoundException: Could not load file or assembly 'DotNetAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=87b69d96e75fbfca'. The system cannot find the file specified.
File name: 'DotNetAgent, Version=1.0.0.0, Culture=neutral, PublicKeyToken=87b69d96e75fbfca'
I have already tried:
to update the MSBuild tool on the VPS.
remove all agents from VPS
remove all my PATs from DevOps and generate a new one while copying the script in DevOps
Edit 1
added system information
Windows Server 2012 R2 64-bit
Powershell engine version 4 0 -1 -1 (used this)
This version detection tool detects I have these versions of asp.net framework installed
.NET FW 2.0 SP 2 (CLR:2.0)
.NET FW 3.0 SP 2 (CLR:2.0)
.NET FW 3.5 SP 1 (CLR:2.0)
.NET FW 4.6.2 General release (CLR:4.0)
.NET FW 4.7 General release (CLR:4.0)
.NET FW 4.7.1 General release (CLR:4.0)
.NET FW 4.7.2 General release (CLR:4.0)
.NET FW 4.8 General release (CLR:4.0)
Edit 2 added bounty for whichever answer is correct or leads me to the correct solution
It is said in Microsoft site that Starting December 2019, the minimum required .NET version for build agents is 4.6.2 or higher.
You can check if .NET Framework 4.6.2 or higher is installed on your machine.
See below prerequisites to install on-premise agent:
Windows 7, 8.1, or 10 (if using a client OS)
Windows 2008 R2 SP1 or higher (if using a server OS)
PowerShell 3.0 or higher
.NET Framework 4.6.2 or higher
Check the document here for more information.
The PAT token is only used during the installation of the agent. You donot need to install a new agent when the PAT is expired. See below note from microsoft document here.
Note:
when using PAT as the authentication method, the PAT token is only used during the initial configuration of the agent. Later, if the PAT expires or needs to be renewed, no further changes are required by the agent.
Update:
You can check out this link and try downloading a different version(eg. an older version) of the deployment agent package.
After the deployment agent package is downloaded, create a new folder (eg. c:/mydeployagent), unzip the package to this folder, then run below command from the powershell;
.\config.cmd --deploymentgroup --deploymentgroupname "your deployment group name" --agent $env:COMPUTERNAME --runasservice --work '_work' --url 'https://dev.azure.com/yourOrganization/' --projectname 'Your project Name'
In the end we were not able to fix it, also not with the help of Microsoft devs. They did offer to look into it in more detail, but only at a very costly fee and without guarantees for success.
So we ended up setting up a new VPS and migrating all our applications to the new VPS and now everything is working again. This was cheaper in terms of spent hours by us and the IT support agency we use, compared to what Microsoft wanted as payment for just looking into it.

azure devops windows self hosted agent installation on classic machines

I would like to know can we install and configure the windows self hosted agent on Azure Classic Machines? I have already created in ARM machines. I don't have classic machines from my end for testing but having at my client environment. We can't create Classic machines as well now (As it has been deprecated). Before requesting my client, I just want to get some clarity this is possible in the classic machines or not ?
Before requesting my client, I just want to get some clarity this is
possible in the classic machines or not ?
Classic mode is just one deployment model, just as Lex Li commented, the types of virtual machines doesn't matter in your scenario. Only the operating system makes sense for installation of self-hosted agents.
Check prerequisites of self-hosted agent:
Windows 7, 8.1, or 10 (if using a client OS)
Windows 2008 R2 SP1 or higher (if using a server OS)
PowerShell 3.0 or higher
.NET Framework 4.6.2 or higher
Only tips above have effect on the installation and usage of windows self agents. Hope it helps to resolve your puzzle.