CHAPTER 3
In the previous chapter, you created a pipeline for a simple application to see the basic features of Azure Pipelines. In this chapter, I will introduce the main project of the book, the GalaxyHotel project, which we will use from now on to take a closer look at Azure Pipelines features. The approach I’m going to use is practical: using this sample project, I will create a build and release pipeline definition for each application, showing you features and best practices. This way, you have a list of recipes and scenarios to reference for your day-to-day work.
The solution used in this book is a system that helps manage a hotel. The system is composed of two web applications—one for the customers, and one for the helpdesk—and a couple of libraries. The applications simulate the booking of the room.
To deploy these applications, you are going to configure a specific pipeline for each project and see the features available in Azure Pipelines in detail.
All projects are based on the .NET Core Framework. They are written using C#, and are distributed under the MIT License on:
Note: In the GitHub repository, you will find all projects in the same repository.
You can fork the repository or download it to try the example illustrated later. If you notice any problem during its use, please open an issue or contact me.
Part of the core architecture of the solution is inspired by the eShopOnWeb project. I consider this project an excellent example of how you can organize your code following modern app architecture principles.
The following table shows how projects are organized in the Azure DevOps project.
Table 3.1: Project organization in Azure DevOps
Project name | Repository name | Solution/project file |
|---|---|---|
Shared Libraries | Libraries | GalaxyHotel.Libraries.sln GalaxyHotel.Core.csproj GalaxyHotel.Dto.csproj GalaxyHotel.Infrastructure.csproj GalaxyHotel.Infrastructure.IntegrationTests.csproj GalaxyHotel.Core.Services.Tests.csproj |
GalaxyHotel Website | Website | GalaxyHotel.Website.sln GalaxyHotel.Website.csproj GalaxyHotel.UITests.csproj |
GalaxyHotel Helpdesk | Helpdesk | GalaxyHotel.HelpDesk.sln GalaxyHotel.HelpDesk.csproj |
To open and modify the projects, you need a stable version of Visual Studio, available here. Regarding the .NET Core Framework, install the version 3.1 available here.
Projects are split into multiple repositories for the following reasons:
The next chapters explain step by step how to build and deploy each project.
Tip: If you want to import these repositories into your Azure Repos account, you can follow this guide.
All the projects in the solution are deployed to Microsoft Azure, and you need an active subscription to create the resources. It is possible to create a free subscription (with a few limitations) here.
The following table summarizes the list of resources used in this book.
Table 3.2: Azure resources
Type of resource | Name | Notes |
|---|---|---|
Resource group | succinctly | |
App services | galaxyhotel-dev, galaxyhotel-qa, galaxyhotel | Runtime Stack: .NET Core 3.1 |
Azure SQL databases | galaxyhotel-dev, galaxyhotel-qa, galaxyhotel | Choose the less expensive plan, no elastic pool. Allow Azure Services to access the server. |
Microsoft Windows 10 virtual machines | helpdesk-test, helpdesk1, helpdesk2 | Enable IIS and install the ASP.NET Core Hosting Bundle on each VM. One of these machines can also be used to execute UI tests in Chapter 5. A software requirement is the latest version of Google Chrome. |