<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nosa Japhet Omorodion on Medium]]></title>
        <description><![CDATA[Stories by Nosa Japhet Omorodion on Medium]]></description>
        <link>https://medium.com/@japhet.omorodion?source=rss-479f242841b8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*LE5loS3uj-xYye6mVk7V_g@2x.jpeg</url>
            <title>Stories by Nosa Japhet Omorodion on Medium</title>
            <link>https://medium.com/@japhet.omorodion?source=rss-479f242841b8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 16:03:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@japhet.omorodion/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Running Self-hosted Agents on Azure DevOps]]></title>
            <link>https://medium.com/@japhet.omorodion/running-self-hosted-agents-on-azure-devops-443b242d4b28?source=rss-479f242841b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/443b242d4b28</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-services]]></category>
            <category><![CDATA[azure-devops]]></category>
            <dc:creator><![CDATA[Nosa Japhet Omorodion]]></dc:creator>
            <pubDate>Sat, 20 Mar 2021 19:13:58 GMT</pubDate>
            <atom:updated>2021-03-20T19:13:58.635Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*gxY5MEon6TZAKDuFcUzIag.jpeg" /></figure><p>Before I jump into this article, I will like to note that it is particularly geared towards DevOps engineers or Software Engineers performing DevOps related roles.</p><blockquote>The prerequisites for this article are;</blockquote><blockquote><em>- Knowledge of Linux and Basic Linux commands<br>- Familiarity with Cloud Platforms( AWS, Azure, GCP)</em></blockquote><p>Let’s start with the problem definition, Azure DevOps like every other service oriented tools comes with its “free quota limits”, with azure pipeline agents, the limit is set at 1500 minutes for build and releases. After exhausting this quota, you will need to procure additional minutes for parallel jobs or leverage your skills to use self-hosted agents. Here is where using self-hosted agents comes to play.</p><p><strong>What are Azure Pipeline Agents?</strong></p><p>When your pipeline runs, the system begins one or more jobs. An agent is computing infrastructure with installed agent software that runs one job at a time. you’ve got a convenient option to run your jobs using a azure-hosted agent. With azure-hosted agents, maintenance and upgrades are taken care of for you. Each time you run a pipeline, you get a fresh virtual machine. The virtual machine is discarded after one use. Azure-hosted agents can run jobs directly on the VM(Virtual Machines) or in a container.</p><p><strong>What are Self-hosted Agents?</strong></p><p>This is an agent that you set up and manage on your own to run jobs. A self-hosted agent it can be hosted within an on-premise VM or a Cloud VM(AWS EC2, Azure VM, Google Compute Engine). You can use self-hosted agents in Azure Pipelines or Team Foundation Server (TFS). Self-hosted agents give you more control to install dependent software needed for your builds and deployments. Also, machine-level caches and configuration persist from run to run, which boosts speed.</p><p>Now that we have the basics covered. Let’s jump into it! Here are the steps we would follow;</p><ol><li><a href="https://linuxtechlab.com/how-to-create-linux-virtual-machine-in-microsoft-azure/">Spin up a Virtual Machine; You should use a minimum configuration to start with, say 2Gig Ram and 20 Gig HDD/SDD</a></li></ol><p>2. <a href="https://docs.microsoft.com/en-us/azure/virtual-machines/linux/attach-disk-portal">Attach a disk to your VM — You can skip this step if you like, but it is highly recommended you attach and mount a disk to your virtual machine, it will serve has the “_work” directory of your installed agent.</a></p><p>3. Install your build pipeline dependencies e.g, Git, .NET Runtime, Node, Docker, Gradle, Java Run time.</p><p>4. Install and configure the agent.</p><h3>Installing and configuring the Agent</h3><h4>1. Authenticate with a personal access token (PAT)</h4><p>You can generate your PAT from your organization Devops at <a href="https://dev.azure.com/%7Byour_organization%7D).">https://dev.azure.com/{your_organization}</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JUNFEnZ-mOtjzRuQsLzRUw.png" /><figcaption>Setting Personal Access Tokens and setting Permissions.</figcaption></figure><ol><li>Click on Personal access tokens</li><li>Click on <strong>+ NEW Token</strong>, Set the permission to Agent Pool(read, manage).</li><li>Select <strong>Show all scopes</strong> at the bottom of the <strong>Create a new personal access token window</strong> window to see the complete list of scopes.</li><li>Then, Copy the token. You’ll use this token when you configure the agent.</li></ol><blockquote><strong><em>Note: Ensure you have the right permissions to add and configure an agent on your organizations azure devops portal.</em></strong></blockquote><p><strong>2. Download and configure the agent</strong></p><ol><li>Log in to your organizations azure devops portal. At the bottom right of the portal, you would see Organization settings.</li><li>Click on organization settings, then → Agent pools → select default pool and choose New agent.</li><li>On the <strong>Get the agent </strong>dialog select Linux, and copy the download click next to the download button.</li><li>Connect to your Virtual Machine(VM), the one you spun up at the beginning of this article, then run these commands, to create a folder called <strong>azureagent </strong>and download the agent using <em>wget;</em></li></ol><pre>$ mkdir myagent &amp;&amp; cd azureagent</pre><pre>$ sudo wget &lt;the link copied from the agent page on your azure devops portal&gt;</pre><pre>azureagent$ ./config.sh</pre><p>Running ./config.sh will open an interactive shell session where you can enter your configuration information.</p><ul><li>Select the PAT authentication mode and enter your <strong>PAT</strong> keys when prompted.</li></ul><blockquote><em>server url:https://dev.azure.com/{your-organization}</em></blockquote><ul><li>_work: This is the directory where the agents stores it installed files and caches build informations.you can set your work directory to the disk location mounted at the beginning of this article or use the default location.</li></ul><p><strong>Note that your _work directory will increase in size on every build.</strong></p><ul><li>Run Agent interractively;</li></ul><pre>./run.sh</pre><h3>Run agent as a systemd service</h3><p>If your agent is running on these operating systems you can run the agent as a linux systemd service:</p><ul><li><em>Ubuntu 16 LTS or newer</em></li><li><em>Red Hat 7.1 or newer</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KYv4rdquBrG1Y50tfU2Xkg.png" /><figcaption>Commands for running as a systemd service and updating environment variables.</figcaption></figure><p>Cheers!! we are done here! you can now navigate back to your azure devops portal → Organization settings → Agent Pool → default agents, to see your agent now live.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h2YndoaZG1NwJ2VkPzQHhQ.png" /></figure><p>In conclusion, Self-hosted agents give you more control to install dependent software needed for your builds and deployments. Also, machine-level caches and configuration persist from run to run, which boosts speed and it also helps reduce cost of using azure hosted agents.</p><p>Now, remember, this article is not only for experts in the DevOps space, even newbies could hop in and learn a lot and that is why everything is made clear both in layman and professional terms, so if you have any questions, shoot or <strong>you can also reach out to me on </strong><a href="https://twitter.com/_nosaJaphet_"><strong>Twitter</strong></a><strong> or find me on </strong><a href="https://github.com/OMO-NOSA"><strong>Github</strong></a><strong>.</strong></p><p><strong>Thanks for reading ❤️</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=443b242d4b28" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>