
In Azure DevOps, Service Connections are a crucial feature that enables integration with external services like Azure, AWS, Docker HUB, facilitating automated workflows and pipelines.
There are different types of connections for most of the well-known services and Generic connections for HTTP-based services. They handle authentication securely. This means you can securely store credentials or access tokens within Azure DevOps, avoiding the need to hardcode sensitive information directly into your pipelines or scripts. By setting up service connections, you streamline the integration process between Azure DevOps and external services.
Once set up, service connections can be used within Azure Pipelines, allowing you to reference them in your pipeline definitions. This enables your pipelines to interact with external services seamlessly during build, test, and deployment stages. Service connections come with granular security controls and permissions. You can define who has access to create, view, or use specific connections, ensuring that sensitive resources are accessed only by authorized users and pipelines.
And in this lecture we will use Azure Resource manager connection and Docker HUB connection to setup our project.
I will speak about git remotes and repositories in this lecture, so here is a quick overview of remotes:
A Git remote is a pointer to another copy of the repository that exists elsewhere, typically on a remote server. For us, it will be the Azure DevOps repository.
Remotes enable collaboration and version control in distributed development environments. They allow multiple developers to work on the same codebase, share changes, and keep track of each other's work.
And a couple of notes about git in general:
When you clone a repository from a remote server, git automatically creates a remote called "origin" that points to the source repository.
Remote branches, such as "origin/main" or "origin/master," represent the state of branches in the remote repository. These can be tracked locally, allowing you to work on your changes while staying in sync with the remote repository.
Commands like git fetch, git pull, and git push interact with the remote repository, allowing you to synchronize changes between your local repository and the remote.
It's common to work with multiple remotes, especially in scenarios where you contribute to open-source projects or collaborate across different platforms. You can add additional remotes using the git remote add command, specifying a name for the remote and its URL.
Each remote is given a unique name (usually "origin" for the primary remote) to differentiate between them when performing Git operations.
Overview of Azure DevOps pipelines.
You can get useful information from Microsoft documentation by googling
What is azure pipelines
Azure devops build variables
Azure DevOps plugins, also known as extensions, enhance the functionality of Azure DevOps by integrating additional tools and services into your DevOps workflow. These plugins can be found in the Visual Studio Marketplace and can be used to add new tasks, build and release definitions, dashboards, and more.
We are going to install AquaSecurity Trivy extension to improve the quality of our infrastructure code (you can find it on github - in a repository called "trivy" by "aquasecurity")
I use this extension to run terraform commands - in the marketplace search for "azure-pipelines-tasks-terraform" by "JasonBJohnson"
And a small correction about trivy - if you want to run misconfiguration check, run "trivy fs --scanners misconfig ." locally. Or there is a link to my article on Medium on how to run it in pipeline
In this course, we will have a quick overview of the possible solution architecture for Azure Web Apps and create build and deployment pipelines from scratch.
It will be a hands-on exercise, and I will give a quick explanation of the Azure services that will be used, how to set up an Azure DevOps organization and project, what the purpose of pipelines is, and finally, describe stage-by-job pipelines that are production-ready. We will also discuss the differences between infrastructure and application codes and what can be shared for their respective pipelines.
To give a bit more details, we will check Terraform code to build web applications on Azure and use it between different environments. For the business application, we will have an Angular application that will be built as a Docker image, pushed to Docker Hub, and then deployed as a container.
The whole exercise is designed to be a real-life scenario, so we will not use IDE to deploy code to “production” – everything will be automated! Those pipelines we cover can be used as a jump-start for bigger enterprise projects (in fact, they are based on my experience and have evolved over many years). They are also a great learning exercise for understanding what DevOps brings to the business.
This course is intended for students who want to explore the possibilities of DevOps careers and learn how to build a solid foundation for their day-to-day work. There are no strong requirements to start this course; all the terms and ideas are explained. Even more, if there are any questions, I am happy to answer them!