-
-
Notifications
You must be signed in to change notification settings - Fork 7
4. Infrastructure Design
The infrastructure design for our project involves various components and services hosted on different platforms to ensure scalability, reliability, and performance. Here's an overview of our infrastructure setup:
The provided Bicep script defines the application components and their configurations for deploying various services within an Azure environment. Here's a description of the key elements and their roles:
-
Parameters:
-
registryName
: This parameter represents the name of the container registry. It defaults to a unique hashed ID prefixed with "profio," ensuring a unique and identifiable name for the registry. -
clusterName
: This parameter denotes the name of the AKS (Azure Kubernetes Service) cluster. It defaults to a unique hash prefixed with "profio."
-
-
Existing Resources:
-
containerRegistry
: This resource references an existing Azure Container Registry based on the providedregistryName
. -
aksCluster
: This resource references an existing Azure Kubernetes Service (AKS) cluster using theclusterName
.
-
-
Module Deployments:
- Several modules are deployed using the Bicep language, each representing a distinct component of the application infrastructure:
-
reverseproxy
: Deploys a reverse proxy component, providing routing and load balancing capabilities. -
api
: Deploys an API component responsible for serving application logic. -
website
: Deploys a customer-facing website component. -
cms
: Deploys a Content Management System (CMS) component. -
ingress
: Deploys an Ingress component responsible for managing HTTP application routing.
-
- Several modules are deployed using the Bicep language, each representing a distinct component of the application infrastructure:
-
Module Parameters:
- Each module receives parameters that are essential for configuration, including the container registry and Kubernetes configuration (
kubeConfig
). These parameters ensure that the modules are configured correctly to work within the defined Azure environment.
- Each module receives parameters that are essential for configuration, including the container registry and Kubernetes configuration (
In summary, this Bicep script is used to define and deploy application components necessary for hosting various services in an Azure environment. It leverages existing resources like the Azure Container Registry and Azure Kubernetes Service and deploys modules for specific application components, each with its respective configuration parameters. This script facilitates the setup and management of a complex application infrastructure in a standardized and repeatable manner.
The Bicep script is designed to deploy infrastructure resources in an Azure environment. It utilizes parameters and modules to customize and manage the deployment process based on specific configurations.
-
Parameters:
-
location
: This parameter represents the location or region where the infrastructure resources will be deployed. It defaults to the location of the current resource group. -
mode
: This parameter determines the deployment mode, with two allowed values:-
'cloud'
: Deploys all infrastructure resources as needed for production or cloud deployment. -
'dev'
: Deploys only the resources required for local development, optimizing the deployment for a development environment.
-
-
-
Modules:
-
registry
: This module deploys Azure Container Registry (ACR) resources. It is named 'registry' and takes thelocation
parameter as input. The ACR is typically used to store Docker container images. -
aks
: This module deploys Azure Kubernetes Service (AKS) resources, but only if themode
is set to 'cloud.' AKS is a managed Kubernetes service for orchestrating containerized applications. It takes thelocation
parameter as input. The conditional deployment ensures that AKS is deployed only when needed for cloud production.
-
In summary, this Bicep script allows for flexible infrastructure deployment in Azure, with the ability to choose between a full cloud deployment ('cloud' mode) or a streamlined development deployment ('dev' mode). The script leverages Azure modules to define and provision resources based on the specified mode, providing a customizable approach to infrastructure provisioning and management.
If you found this documentation helpful, please consider giving it a ⭐️ on GitHub.
🐛 Found a bug or have a suggestion? Report an issue.
📣 Have questions or need support? Visit our Support Section.