Giter Club home page Giter Club logo

azure-cost-reporting's Introduction

Azure Cost Reporting

A web app to help you monitor your Azure cost.

Requirements

  • Python 3.11

Running locally

# Create your virtual environment
python -m venv .venv
source .venv/bin/activate # or venv\Scripts\Activate.ps1 for PowerShell/Windows
pip -r requirements.txt

# Generate architecture diagram
cd docs/
python architecture.py

azure-cost-reporting's People

Contributors

caiocavalcanti avatar caiocavalcantirtl avatar

Watchers

 avatar  avatar

azure-cost-reporting's Issues

Show the different environments on the architecture diagram

Problem:
On the first session we have created the high level architecture using diagram as code, but we want to deploy this application in multiple environments to reproduce a real case scenario where we run automated tests on the CI/CD pipelines.

Change the diagram so we can show the different environments, with the following rules:

  • We have 3 environments (test, acceptance and production) with the prefixes tst, acc and prd
  • The CI pipeline should run automated tests in test environment
  • The CD pipeline should:
    • Deploy to acceptance
    • Run automated tests in acceptance
    • Deploy to production
    • Run smoke tests in production
  • The Azure Container Registry (ACR) is shared between environments

Setup cloud infrastructure on Azure with terraform

Describe the cloud infrastructure on Azure as code using Terraform.

  • Setup Azure for test:
    • Create test subscription
    • az login
  • Setup Terraform:
    • Initial backend on Storage Account
    • Configure provider
    • Resource group(s)
    • Azure Container Registry
    • Storage Account with Blob Containers bronze, silver and gold
  • Create CI pipeline:
    • Setup
    • Lint
    • Validate
    • Plan
  • Create CD pipeline:
    • Setup
    • Plan
    • Manual approval
    • Apply
  • Update docs:
    • Requirements
    • Step by step on how to setup from scratch
    • Architecture

Create a diagram describing the logical flow for the ELT and Web App

Problem:
We've created the diagram for the high level architecture, but it doesn't contain the details about the logical flow to actually Extract, Load and Transform data to be used by the Web App.

Create a diagram that shows the logical flow for the ELT cron job and how data is accessed on the Web App.

  • Data storage consists of three layers (all under the same Azure Storage Account, but in different Azure Blob Containers):
    • Bronze: raw data from source systems
    • Silver: filtered, cleaned and augmented data
    • Gold: aggregated data ready for reporting
  • The ELT cron job consists of three sequential tasks:
    • Extract:
      • Export data from Azure Cost Management REST API
      • Write raw data into Bronze layer
    • Load:
      • Read data from Bronze layer
      • Apply schema into dataset
      • Write data into Silver layer
    • Transform:
      • Reads data from Silver layer
      • Run transformations
      • Write data into Gold layer
  • The ELT cron job has an Azure Service Principal as Managed Identity, which has Storage Blob Data Contributor role on all blob containers
  • The Web App has an Azure Service Principal as Managed Identity, which has Storage Blob Data Reader role on the Gold blob container

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.