Introduction to Red Dog Demo: Azure Container Apps Deployment
Background
The Red Dog Demo project is designed to demonstrate how to deploy a complex, microservice-based application using Azure Container Apps. This project is built on the Reddog codebase available on GitHub and aims to help users understand the deployment of serverless container applications on Azure.
Azure Container Apps offers a cloud-native platform to deploy modern containerized applications without the need for managing traditional infrastructure like Kubernetes clusters. It provides integrations with the Distributed Application Runtime (Dapr) to assist with distributed application challenges such as state management and service invocation. The platform also incorporates Kubernetes Event Driven Autoscaling (KEDA), allowing applications to scale based on event triggers from services such as Azure Service Bus and Redis.
Architecture
The architecture consists of a single Container Apps Environment that hosts ten microservices built using .NET Core. These microservices are integrated with Azure resources via building blocks provided by Dapr and utilize KEDA for automatic scaling. The deployment process uses Bicep templates, which is a language for declaratively deploying Azure resources.
Key Components
-
Traefik: This reverse proxy and load balancer manages the routing of network traffic to backend services. It enables path-based routing from the user interface, allowing seamless internal API calls.
-
Microservices: Each service is carefully set up to handle specific tasks and integrates with Dapr and KEDA as needed. For instance, the Order Service uses Azure Service Bus for communication, while the Accounting Service utilizes Azure SQL for data management.
-
Bootstrapper Service: This service initializes the necessary database structures in Azure SQL Database, setting up the environment for other services to operate smoothly.
Infrastructure Components
The Red Dog Demo incorporates several Azure services to support the needs of the application:
- Azure Service Bus: Acts as a message broker for communications between services.
- Azure CosmosDB: Used for storing customer loyalty data.
- Azure Cache for Redis: Provides in-memory caching for efficient data retrieval.
- Azure SQL Database: Stores relational data for the Accounting Service.
- Azure Blob Storage: Used by the Receipt Service for storing order receipts.
- Azure Monitor & Application Insights: Allow for extensive monitoring and logging of the application.
Deployment Instructions
To set up the Red Dog Demo on Azure, you need an Azure subscription with permissions to create a Resource Group. You can clone the repository and use Azure CLI commands to deploy the infrastructure and services. The deployment utilizes a Resource Group called "reddog" and can take approximately 25 minutes to complete. Upon successful deployment, you get URLs to access the application components.
Cleaning Up
When you no longer need the deployment, you can remove it by deleting the associated Resource Group. However, beware that this will remove all resources within that group.
Contributing
The project welcomes contributions from the community. Contributors need to sign a Contributor License Agreement (CLA) to ensure the rights to use their contributions are granted to the project. Microsoft’s Open Source Code of Conduct applies to all contributors to promote a respectful and collaborative environment.
The Red Dog Demo offers an in-depth look into deploying robust microservices architectures using Azure Container Apps, serving as a valuable resource for developers looking to leverage cloud-native solutions.