Skip to content

alguadam/ie-bank-infra-old

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IE Bank infrastructure

Overview

This is the repository for the infrastructure code of the IE Bank web app

IE Bank app logical view

Requirements

This source code works under the following technologies:

Recommended tutorials

Configure your local environment

Install Prerequisites

  • Install Azure CLI. Install Azure CLI from here. Make sure to select the option to add Azure CLI to your PATH while installing.
  • Install Visual Studio Code and Bicep extension. Install Visual Studio Code from here. Install the Bicep extension from here. You can also follow the steps from the article Install Bicep tools

Repository organization

Main.bicep

The script that will deploy the infrastructure for IE Bank app is main.bicep.

The script deploys:

Resource Azure Documentation Bicep resource definition Description
PostgreSQL server Azure Database for PostgreSQL - Flexible Server Microsoft.DBforPostgreSQL flexibleServers 2022-12-01 PostgreSQL server for the IE Bank app
PostgreSQL database Azure Database for PostgreSQL - Flexible Server Microsoft.DBforPostgreSQL flexibleServers/databases 2022-12-01 PostgreSQL database for the IE Bank app
module modules/app-service See Module app-service.bicep - Bicep module that deploys the web app services for the IE Bank app

Module app-service.bicep

The main.bicep script uses the module modules/app-service.bicep to deploy the web app services for the IE Bank app.

The module deploys:

Resource Azure Documentation Bicep resource definition Description
App Service Plan Azure App Service plan overview Microsoft.Web/serverfarms 2021-02-01 App Service Plan for the IE Bank app
Linux App Service Azure App Service overview Microsoft.Web/sites 2021-02-01 Linux App Service to host the IE Bank app backend
Linux App Service Azure App Service overview Microsoft.Web/sites 2021-02-01 Linux App Service to host the IE Bank app frontend

Configuration variables

To determine different configuration options for each environment, we will make use of the files under the parameters folder.

Continuos Delivery

Learn more:

The file .github/workflows/ie-banc-infra.yml contains the configuration for the CI/CD pipeline.

GitHub secrets

The workflow uses the following GitHub secrets:

Secret name Description Learn more
AZURE_CREDENTIALS Azure credentials to authenticate to Azure via Service Principal Use the Azure login action with a service principal secret
DBPASS Password for the PostgreSQL server, configured as App Setting in the backend web server Environment variables and app settings in Azure App Service
DBUSER Username for the PostgreSQL server, configured as App Setting in the backend web server Environment variables and app settings in Azure App Service

GitHub variables

The workflow uses the following GitHub variables:

Variable name Description Learn more
DBHOST Hostname for the PostgreSQL server, configured as App Setting in the backend web server Environment variables and app settings in Azure App Service
DBNAME Name for the PostgreSQL database, configured as App Setting in the backend web server Environment variables and app settings in Azure App Service
ENV Environment name, configured as App Setting in the backend web server Environment variables and app settings in Azure App Service
FLASK_APP Name of the flask app to run, configured as App Setting in the backend web server Environment variables and app settings in Azure App Service
FLASK_DEBUG Debug option for the flask app, configured as App Setting in the backend web server Environment variables and app settings in Azure App Service

some new text

About

Infrastructure for IE bank web app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages