Page 28 - MSDN Magazine, April 2018
P. 28
AZURE
Deploying Containerized
ASP.NET Core
Applications to Azure
Srikatan Sankaran
Azure Key Vault is a cloud-based service that organiza- tions can leverage to securely store sensitive business information. In the last issue of MSDN Magazine (msdn.com/magazine/mt845653), I explored a scenario in which insurance policies for vehicles generated by an agency could be stored securely in Azure Key Vault as secrets, and showed how additional features like asymmetric
encryption with keys and built-in versioning could be used to main- tain an audit trail of access to insurance policies. The applications that used Azure Key Vault were deployed to Azure App Service as Web apps. In this issue, I’ll be deploying the same applications to Azure Container Services for Kubernetes (AKS). Azure Container Services provides the ability to create and deploy Docker container-enabled applications to Azure.
Use-Case Scenario
There are two ASP.NET Core 2.0 Web applications in the solution accompanying this article, an admin portal used by the insurance companies, agencies and brokers, and a customer portal used by either the consumers who purchase the vehicle insurance policies or by regulatory authorities to ascertain the validity of the insurance policy. Refer to the previous article for more details on the busi- ness scenario addressed by the solution, and to learn how Azure Key Vault helped me meet those requirements.
Architecture of the Solution
Figure 1 represents the architecture of the solution, with minor changes from the previous article. Instead of Azure App Service, a single AKS cluster is used to host both Web applications on Linux, using Docker containers. Azure Application Gateway is used to expose an SSL-enabled endpoint to clients running in the browser and to the native Xamarin app, and routes requests to the Web applications deployed in AKS. Azure Active Directory (Azure AD)
Some of the products discussed in this article are in preview, so all information is subject to change.
This article discusses:
• UsingAzureContainerRegistrytostoreandpullDockercontainers
• Using Visual Studio 2017 Tools to create Docker images
• Using kubectl tools for Kubernetes to deploy containerized applications to Azure Container Service – AKS
• Using Azure CLI to push and pull container images to and from Azure Container Registry
Technologies discussed:
Azure Container Services for Kubernetes, Docker, Azure Application Gateway, ASP.NET Core 2.0, Azure Container Registry, Azure Active Directory, Azure Team Services, Visual Studio 2017 Tools for Docker, Azure Container Instance, Azure Web App for Containers
Code download available at:
bit.ly/2DRvwdh
22 msdn magazine