constellation/.github/runners/azure-cvm
Fabian Kammel 85f33b2140
ci: fix scorecard/pinned-dependencies findings (#967)
* fix scorecard/pinned-dependencies findings
* make renovate update go install
Signed-off-by: Fabian Kammel <fk@edgeless.systems>
2023-01-17 16:12:23 +01:00
..
azure-function ci: fix scorecard/pinned-dependencies findings (#967) 2023-01-17 16:12:23 +01:00
cvm-template.json AB#2413: Add Azure function for CVMs 2022-09-21 10:58:10 +02:00
README.md AB#2413: Add workflow for snp-report-verify 2022-09-21 10:58:10 +02:00

General

This folder contains the files to setup an Azure function and ARM template in order to deploy Azure CVMs with a webhook.

  • cvm-template.json: An ARM template that deploys one CVM and the required resources. It is deployed by the Azure Function
  • azure-function: All necessary files to redeploy the function. Changes in requirements.txt are installed during deployment of the function. cloud-init.txt is put into the CVM by supplying it as a parameter to the ARM template deployment.

Update cvm-template

In order to make the Azure function use your changes you will have to publish them in the cvm-template.json file. While developing you can point the template_id variable in __init__.py to a different location.

Doing the following you can debug your template changes:

  • Look for the Template spec resource in your Azure project (e.g. "snp-value-reporter-template").
  • Click on "Create new version".
  • Select the latest version available.
  • Use current_version+1 as new version.
  • Go to "Edit template" and make your changes.
  • Go to "Review + Save" and save your changes.

Deploy azure function

Background info can be found in the Azure docs. To deploy your Azure CLI needs to be authenticated and Azure Function Core Tools needs to be installed.

cd .github/runners/azure-cvm/azure-function
func azure functionapp publish edgeless-snp-reporter