Skip to content

Commit

Permalink
Readmes
Browse files Browse the repository at this point in the history
  • Loading branch information
dalager committed Jun 15, 2024
1 parent 50bc4a9 commit ebbccd1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 31 deletions.
1 change: 0 additions & 1 deletion .github/workflows/deploy_functions_to_azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
24 changes: 2 additions & 22 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
11 changes: 3 additions & 8 deletions src/Function/readme.md
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit ebbccd1

Please sign in to comment.