rcpch / digital-growth-charts-server

RCPCH's open source Digital Growth Chart API
https://growth.rcpch.ac.uk/
GNU Affero General Public License v3.0
16 stars 11 forks source link

Set up a 'Staging' API backend for dGC API Server #203

Closed pacharanero closed 7 months ago

pacharanero commented 8 months ago

Currently in Azure we have our live API server running on an Azure Web App Service (serverless Python runtime type of thing), deployed automatically upon a new Release tag created in the dGC server repository. This is rcpch-dgc-server-live

That is configured as a backend for the Azure API Management Platform (APIM)

I think it would be worth creating a second Web App Service called something like rcpch-dgc-server-staging which deploys from the staging branch, and we could then mount this to the APIM at a testing URL. This would enable us to properly soak-test any new changes to the API in terms of testing, deployment, python versions, and the interplay with the Azure Python runtime. Only when we're happy do we then move that code into live and make a Release.

URL scheme comes mostly from config in the APIM. Currently the baseUrl is https://api.rcpch.ac.uk/growth/v1. Options for scheme could be

This pattern could then be repeated across other APIs, as necessary, so we would have a live server and a staging server, with a regular naming scheme for the Azure resources, and a regular URL scheme for how they are mounted to the APIM.

pacharanero commented 7 months ago

This has now been done: rcpch-dgc-server-staging https://portal.azure.com/#@rcpch.ac.uk/resource/subscriptions/99e313f5-79fe-4480-b867-8daf2800cf22/resourcegroups/RCPCH-Dev-API-Growth/providers/Microsoft.Web/sites/rcpch-dgc-server-staging/appServices