Setting up a CI/CD pipeline in Azure DevOps for Identity Server 4 and Deploy to Azure
Overview
PipelineSpace.com is a Cloud Development Platform for create, build, deploy, and manage multi-cloud application.
What is covered in this lab?
In this lab, you will
- Generate the Ecommerce project in your Azure DevOps Services organization with PipelineSpace.com tool.
- Generate the Build pipeline in Azure DevOps Organization.
- Generate the Release pipeline in Azure DevOps Organization.
- Deploy Web App .netcore in Azure portal.
- Destroy Web App.
Pre-requisites for the lab
- Refer the Getting Started page to know the prerequisites for this lab.
Exercise 1: Create Project in Azure DevOps Services
You can create projects quickly in the Azure DevOps account. The tool will help automate the tasks of connections to the cloud and git connections.
- Navigate to the Projects and click in the Create Project button.
- Now, We need associate a Git Provider. This step is important since it is where you will store the code of the services that we are going to use for the project.
- Now, We need associate an Agent Pool. These agents are loaded from the Azure DevOps account.
- Now, We need associate a Cloud Provider. This step is important since it is where the services that we are going to use for the project will be deployed.
- Now, We need select the project template. PipelineSpace.com, It has preloaded templates to accelerate the configuration of projects. For this lab we using the Empty Template.
- And finally, we give a name to our project and what will be its objective. The name of the project is very important and it has to be unique, since it is used to create the project in Azure DevOps Organization account.
When the project is created it is initialized in a state “Preparing”, this means that the tool is configuring tasks. This may take a few seconds.
- Now, click in the Continuous Integration Link, redirects you to the project created in Azure DevOps Organization Account.
Exercise 2: Create a Pipe and Deploy to Azure
You can create, build, deploy and destroy (Api Rest, Web App, Azure Functions) quickly in your Cloud Provider. The tool has preloaded templates that will help you quickly adopt the DevOps and Cloud concepts.
- Navigate to the projects and select the Ecommerce project and select the Pipe tab, a pipe can be a “Api Services, Web App”
- Now, should be select the pipe type, for this lab we select the Web App type and then the template “Identity Server 4 + SQL”. This template contains the pipeline for CI/CD.
- And finally, we give a name to our service and what will be its objective. The name of the pipe is very important and it has to be unique, since it is used to create the Azure Repo in Azure DevOps Organization account.
When the pipe is created it is initialized in a state “Preparing”, this means that the tool is configuring CI/CD. This may take a few seconds.
- Now, click in the Git Link, redirects you to the Azure Repo created in Azure DevOps Organization Account.
- Navigate to Pipelines/Builds. You can see that the tool automatically configured the CI and launched the first build.
- Navigate to Pipelines/Releases. You can see that the tool automatically configured the CD with 2 stages (Development and Production).
- Now, back to PipelineSpace Console and select the Pipeline tab. You can also see the status of the pipeline in the tool.
- Select the Environments tab and copy the ServiceUrl link.
Now we can visualize the web app deployed in Azure.
- Go to Azure Portal account, select the Resource Group option.
- Select the resource group detail. You can view the infrastructure that is provisioned based on the azure resource manager template.
Exercise 3: Eliminate pipe and destroy all deployed infrastructure.
You can quickly destroy all the infrastructure deployed in your cloud provider.
- Select the pipe and click in Delete pipe option.
- Confirm the deletion by typing the name of the pipe and then click on the Delete button. The tool will remove the Repositories, CI/CD Definitions and will also destroy the deployed infrastructure in the Cloud Provider.
You can see that Build Definition was deleted.
You can see that Release Definition was deleted.
Conclusion
We have shown how easy is to setup a CI/CD pipeline to deploy applications in Azure, and how to use PipelineSpace to do efficient development in the cloud. And what it is even more awesome, is that you have been able to efficiently develop, build and deploy a application without typing a single command.