Welcome to two-tire application deployment! This repository contains a two-tier application with a .NET backend and a frontend in Angular. It includes all the necessary files for deploying the application on Azure AKS (Azure Kubernetes Service), including deployment definitions, Terraform code for infrastructure deployment, Docker Compose files, and more. Additionally, the repository features a GitLab pipeline for automating the CI/CD process.
- Two-Tier Application: .NET backend and Angular frontend.
- Azure AKS Deployment: Infrastructure deployment using Terraform and application deployment using Kubernetes manifests.
- Dockerized: Docker Compose files for local development and Kubernetes YAMLs for production deployment.
- Scalable: Utilizes the power of Kubernetes for scalable and reliable deployment.
- GitLab Pipeline: Automates the CI/CD process for seamless integration and deployment.
Before you begin, ensure you have met the following requirements:
- Azure CLI installed.
- Terraform installed.
- Docker installed.
- Angular CLI installed for frontend development.
- .NET SDK installed for backend development.
To start the application locally, follow these steps:
-
Clone the repository:
git clone https://github.com/your-username/your-repository.git
-
Navigate to the project directory:
cd your-repository
-
Run Docker Compose to spin up the containers:
docker-compose up
-
Access the frontend at
http://localhost:4200
and the backend athttp://localhost:5000
.
To deploy the application on Azure AKS, follow these steps:
-
Install kubectl for managing Kubernetes clusters.
-
Authenticate with your Azure subscription using the Azure CLI:
az login
-
Navigate to the
iac
directory and initialize Terraform:cd iac terraform init
-
Adjust the variables in
terraform.tfvars
according to your environment. -
Deploy the infrastructure:
terraform apply
-
Once the infrastructure is deployed, navigate to the
DeploymentDefinitions
directory. -
Apply the Kubernetes manifests:
kubectl apply -f .
Ensure that you have the docker images in your acr and Aks has necessary pull authentications. 9. Access your application using the external IP address of the AKS cluster.
.
├── Dotnet/ # .NET backend code
├── Product-APP/ # Angular frontend code
├── DeploymentDefinitions/ # Kubernetes manifests
└── iac/ # Terraform code for infrastructure deployment
The repository includes a GitLab pipeline for automating the CI/CD process. The pipeline is configured to perform various tasks such as building Docker images, running tests, and deploying the application to Azure AKS.
Contributions are welcome! Please feel free to submit a pull request or open an issue for any bugs or feature requests.
This project is licensed under the MIT License.