Skip to content

This repository contains a two tire application with dotnet backend and frontend in angular. It has all of the files needed for deploying the application on azure AKS which includes deployment definitions, terraform code for infrastructure deployment etc

Notifications You must be signed in to change notification settings

Abaiz-khan/CICD-Gitlab

Repository files navigation

About

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.

Table of Contents

Features

  • 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.

Prerequisites

Before you begin, ensure you have met the following requirements:

Getting Started

Local Development

To start the application locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/your-username/your-repository.git
  2. Navigate to the project directory:

    cd your-repository
  3. Run Docker Compose to spin up the containers:

    docker-compose up
  4. Access the frontend at http://localhost:4200 and the backend at http://localhost:5000.

Deployment on Azure AKS

To deploy the application on Azure AKS, follow these steps:

  1. Create an Azure Kubernetes Service (AKS).

  2. Install kubectl for managing Kubernetes clusters.

  3. Authenticate with your Azure subscription using the Azure CLI:

    az login
  4. Navigate to the iac directory and initialize Terraform:

    cd iac
    terraform init
  5. Adjust the variables in terraform.tfvars according to your environment.

  6. Deploy the infrastructure:

    terraform apply
  7. Once the infrastructure is deployed, navigate to the DeploymentDefinitions directory.

  8. 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.

Directory Structure

.
├── Dotnet/                  # .NET backend code
├── Product-APP/             # Angular frontend code
├── DeploymentDefinitions/   # Kubernetes manifests
└── iac/                     # Terraform code for infrastructure deployment

GitLab Pipeline

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.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any bugs or feature requests.

License

This project is licensed under the MIT License.

About

This repository contains a two tire application with dotnet backend and frontend in angular. It has all of the files needed for deploying the application on azure AKS which includes deployment definitions, terraform code for infrastructure deployment etc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published