MadiroGlobalHealth/UVL-EMR

Cloud Architecture Overview

michaelbontyes opened this issue · 5 comments

Assuming:

  • CD-CI coming from Github Actions (configurations, binaries, Ozone execution)
  • Database using MariaDB from Azure OR Docker images depending on costs/added value
  • Using K3s or K8s if avoiding using a full VM is possible
  • Nightly backups of patient data and files
  • Uptime and performance monitoring
  • Enabling HTTPS

Thanks @michaelbontyes for starting this. My Suggestion will begin from front to back
Frontend

  1. Setup Azure Application Gateway as a single entry point for the entire stack .
  • Involves configuring TLS termination with a domain of choice e.g (https://uvl-emr.org )
  • Uploading certificates for the domain to Key vault. from a 3rd party vendor of choice (i'd recommend namecheap), because it's simple to use / setup and cheap
  • Enabling cross-communication between Keyvault and Gateway
  1. Create github actions / azure pipelines manifests for CI / CD into test / prod servers
  2. Add / modify existing docker configuration for uvl-emr to suit the azure Infra
  3. Setup Container registry with to pick up latest images after azure-pipelines CI/CD builds
  4. Setup Azure Kubernetes Service (AKS) to run / manage all the containerised services in uvl-emr
  5. Create K8s manifest describing deployment and ingress structure
    Screenshot from 2024-08-27 04-35-22

Thank you very much @tendomart. Can you also share an estimate of the monthly cost to run such an infrastructure? Also, which part would you feel confortable to take care of if we move forward?

Thanks alot @michaelbontyes This is an approximate breakdown of total costs based on Azure official documentation
Using the Azure pricing Calculator

  1. Azure application gateway $0.0098 per capacity unit-hour (https://azure.microsoft.com/en-us/pricing/details/application-gateway/#pricing)

  2. AKS cluster a basic plan goes for $85.41 per month (compared to a VM which goes for around $137.24 per month)

  3. Storage accounts, for storing secrets $20.80 per month

  4. Mysql Database $124.83 USD / month

  5. Postgres $129.94 / month

  6. Container Registry $5.00 / month
    ExportedEstimate(1).xlsx

  7. Key Vault $0.00 / month
    Screenshot from 2024-08-28 22-34-28

I'd be comfortable to handle the AKS cluster if we moved on, though I can handle any part of the Infra implementation

Therefore the Approximate Monthly cost for the entire Infrastructure is approximately $368.17
Screenshot from 2024-08-28 23-33-07

Thank you @tendomart, today a Standard B2s VM cost < $50$ per month.

Ooh ok then we can use the cheaper option, those where just approximate estimates for running that kind of infra. @michaelbontyes above. Oh yea actually seen the B2s 2 Core costs $36.21 . Anyways with all that, it's your final decision then we can see what to implement

One more thing, since Mysql and Postgres are implemented as volumes in the current UVI-EMR there may not be need to destructure and rather go with volumes instead.