diff --git a/.github/workflows/deploy_functions_to_azure.yml b/.github/workflows/deploy_functions_to_azure.yml index dc4b2c8..a6d4066 100644 --- a/.github/workflows/deploy_functions_to_azure.yml +++ b/.github/workflows/deploy_functions_to_azure.yml @@ -37,4 +37,3 @@ jobs: app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }} package: "${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}/output" publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }} -# For more samples to get started with GitHub Action workflows to deploy to Azure, refer to https://github.com/Azure/actions-workflow-samples diff --git a/readme.md b/readme.md index 2c77f2c..c9f63a4 100644 --- a/readme.md +++ b/readme.md @@ -7,29 +7,9 @@ This is the middle layer of the CommitStore system. It is responsible for retrie ## Deployment Deploys with github actions to Azure Functions. -See [deploy_functions_to_azure.yml](.github/workflows/deploy_functions_to_azure.yml) - -#### Against Azure Storage Queue - -Role: Storage Queue Data Message Processor -https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles#storage-queue-data-message-processor - -### Against Azure Cosmos DB - -https://learn.microsoft.com/en-us/azure/cosmos-db/how-to-setup-rbac -- grant data reader -- grant data contributor +Using this guide: https://github.com/Azure/actions-workflow-samples -https://learn.microsoft.com/en-us/azure/cosmos-db/managed-identity-based-authentication - -### Monitoring - -The function should be monitored with Application Insights. -Alerts should be configured for the following metrics: - -- Number of failed executions against the Database -- Number of failed executions against the Queue -- Number of successful executions +See [deploy_functions_to_azure.yml](.github/workflows/deploy_functions_to_azure.yml) ![Azure Deployed](https://github.com/dalager/gitcommitstore/actions/workflows/deploy_functions_to_azure.yml/badge.svg) diff --git a/src/Function/readme.md b/src/Function/readme.md index 84aeadf..06146b2 100644 --- a/src/Function/readme.md +++ b/src/Function/readme.md @@ -1,15 +1,10 @@ # Azure function - Commitstore -## overview +## CommitTrigger function - will be triggered by a message in azure commtstorage queue - will write the json in the message payload to cosmos db -## Setup trigger +## SearchCommit function -- create a new function app -- create a new function -- select "Azure Queue Storage trigger" -- select the queue you want to listen to - -## create function app with az +- is a search endpoint returning the commits from cosmos db