Deploying a container to ACI with a CI/CD pipeline

One of the reasons Docker has quickly become attractive to developers and operations teams is that the deployment of Docker images and containers has made CI and CD pipelines for enterprise applications easier.

To automate the deployment of our application, we will create a CI/CD pipeline that deploys the Docker image that contains our application in ACI.

ACI is a managed service from Azure that allows you to deploy containers very easily, without having to worry about the hardware architecture.

To learn more about ACI, head to the official page: https://azure.microsoft.com/en-us/services/container-instances/.

In addition, we will use Terraform for Infrastructure as a Code, which we discussed in Chapter 2Provisioning Cloud Infrastructure with Terraform, using the Azure ACI resource and its integration with the Docker image.

We will, therefore, divide this section into two parts:

  • The Terraform code of the Azure ACI and its integration with our Docker image
  • An example of a CI/CD pipeline in Azure Pipelines, which allows you to execute the Terraform code

To start, we will write the Terraform code that allows you to provision an ACI resource in Azure.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.222.240.21