Page MenuHomeSoftware Heritage

azure: add a tool to generate a billing report
AbandonedPublic

Authored by vsellier on Mar 16 2022, 9:54 AM.

Details

Summary

It's a working POC generating the following reports for a one year range
starting from the current day:

  • Daily global cost + a graph
  • Monthly global cost + a graph
  • Per service daily cost
  • Per service monthly cost

Related to T4045

We will need to find a place to run it somewhere in our private space

Diff Detail

Repository
rDSNIP Code snippets
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 27458
Build 42967: arc lint + arc unit

Event Timeline

vsellier created this revision.

Remove useless commented code

btw: This is some examples of the output of the script: P1312

great, i'll need to have another look ;)
No idea where to put this yet.

sysadmin/azure-billing/Readme.md
4
sysadmin/azure-billing/compute_stats.py
27

we usually put the code block inside an:

if __name__ == '__main__':

And then indent the remaining part of the snippets below.

  • Review feedbacks
  • Add a report generation in html + an index page
  • Add a nginx container to export the html files
  • Use a docker volume to avoid permission issues in the output directory
  • Ensure the csv is downloaded each time a docker-compose up is launched
  • use the requirements.txt file to install the dependencies in the image
This revision is now accepted and ready to land.Mar 28 2022, 1:32 PM

the scripts finally land in the puppet repository (D7456)