Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Implementing CI/CD Using Azure Pipelines

You're reading from   Implementing CI/CD Using Azure Pipelines Manage and automate the secure flexible deployment of applications using real-world use cases

Arrow left icon
Product type Paperback
Published in Dec 2023
Publisher Packt
ISBN-13 9781804612491
Length 326 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Roberto Mardeni Roberto Mardeni
Author Profile Icon Roberto Mardeni
Roberto Mardeni
Piti Champeethong Piti Champeethong
Author Profile Icon Piti Champeethong
Piti Champeethong
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1:Getting Started with Azure Pipelines
2. Chapter 1: Understanding Azure Pipelines FREE CHAPTER 3. Chapter 2: Creating Build Pipelines 4. Chapter 3: Setting Variables, Environments, Approvals, and Checks 5. Chapter 4: Extending Advanced Azure Pipelines Using YAML 6. Part 2:Azure Pipelines in Action
7. Chapter 5: Implementing the Build Pipeline Using Deployment Tasks 8. Chapter 6: Integrating Testing, Security Tasks, and Other Tools 9. Chapter 7: Monitoring Azure Pipelines 10. Chapter 8: Provisioning Infrastructure Using Infrastructure as Code 11. Part 3:CI/CD for Real-World Scenarios
12. Chapter 9: Implementing CI/CD for Azure Services 13. Chapter 10: Implementing CI/CD for AWS 14. Chapter 11: Automating CI/CD for Cross-Mobile Applications by Using Flutter 15. Chapter 12: Navigating Common Pitfalls and Future Trends in Azure Pipelines 16. Index 17. Other Books You May Enjoy

Setting up self-hosted agents

After you’ve created a PAT, you can create a new self-hosted agent under a new agent pool. To do this, follow these steps:

  1. Click on PacktAzureDevOps | Agent pools | General:
Figure 1.17 – Entering a new agent pool

Figure 1.17 – Entering a new agent pool

  1. Click on New agent:
Figure 1.18 – Entering a new agent

Figure 1.18 – Entering a new agent

  1. You can download a self-hosted agent based on your operating system. Three operating system options will show you how to download and set them up:
    • Windows users can download build agent software from the Windows tab. There are two options, as shown in the following screenshot: Windows 64-bit (x64) and Windows 32-bit (x86):
Figure 1.19 – The Windows agent for setting up a file

Figure 1.19 – The Windows agent for setting up a file

  • To set up a Windows agent, you need to run on PowerShell as an administrator.
  • Mac users can download build agent software from the macOS tab:
Figure 1.20 – macOS agent

Figure 1.20 – macOS agent

  • You don’t need to use the bash command in the administrator role to set up the macOS agent.
  • Linux users can download build agent software from the Linux tab. There are four options for computer architecture – x64, ARM, ARM64, and RHEL6:
Figure 1.21 – Linux agent

Figure 1.21 – Linux agent

  • You don’t need to use a root user for installation to set up a Linux agent.
  1. After configuring the agent in each operating system, you must enter the following information:
    Enter (Y/N) Accept the Team Explorer Everywhere license agreement now? (press enter for N) > Y
    Enter server URL > https://dev.azure.com/yourOrganization
    Enter authentication type (press enter for PAT) > [ENTER]
    Enter personal access token > [Personal Access Token]
    Enter agent pool (press enter for default) > General
    Enter agent name (press enter for [computer name]) > agent01
    Enter work folder (press enter for _work) > [ENTER]
  2. Once you start the service, you will see that agent01 is active:
Figure 1.22 – The agent status dashboard

Figure 1.22 – The agent status dashboard

  1. You can see the Online status of the build agent that has already been created:
Figure 1.23 – The action menu of the agent

Figure 1.23 – The action menu of the agent

  1. You can delete the agent and update to a new version of the agent by clicking on the button with the ellipses or three dots.

You are now ready to create the build and deployment on the agent01 build agent. However, you need to set up the deployment group so that you can deploy your application on a local web server such as Microsoft Internet and Information Services (IIS). We’ll do this in the next section.

You have been reading a chapter from
Implementing CI/CD Using Azure Pipelines
Published in: Dec 2023
Publisher: Packt
ISBN-13: 9781804612491
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime