This is the companion repository for this blogpost:
http://case.schollaart.net/2019/10/31/device-offline-detection-with-durable-entities.html
You have 2 options:
- Create infrastructure with ARM Template and then 'Right Click Deploy' the Function App to it
- Fork the repository, use the Azure Pipelines YAML to do all the work
-
Click the Button below to create the infrastructure in your Azure Subscription
-
Clone this repository to your machine
-
Right Click Deploy via an IDE with Azure Functions Tooling installed a. VS Code with read more (screenshot) b. Visual Studio 2019 read more (screenshot)
-
Continue reading 'Running it'
- Fork the repository and clone it to your machine
- Go to (or create) an Azure DevOps project where you want the pipline to live
- Make sure you have a Service Connection to an Azure Subscription read here how to create one
- Remember the exact name of this Service Connection
- Create the pipeline in Azure DevOps based on azure-pipelines.yaml. Read how here how to 'Get your first run'
- Step by Step screenshots 1, 2, 3, 4, 5
- Update the variables in the azure-pipelines.yaml, there will be a screen to do that during the Azure DevOps pipeline creation wizard (screenshot 5)
- azureSubscription: The name of the Service Connection
- functionAppName: the name of your test project, make it lowercase no special characters and it has to be globally unique
- resourceGroupName: the resource group to deploy to
- Make sure the build and deploy were succesfull (screenshot)
- Go to https://{functionAppName}.azurewebsites.net/api/dashboard, here you should see a Header called 'Devices'
- Update the ConnectionString to the Storage Queue in the TestDevice project
- Go to the Azure Portal and go to the
{functionAppName}st
Storage Account resource (dont mistake it for the storage account ending opdst
) - Click on 'Access Keys' and copy the Connection String
- Open this cloned repository/solution on your machine with VS Code or Visual Studio and go to the TestDevice project
- Edit the appsettings.json and update the
StorageConnectionString
- Go to the Azure Portal and go to the
- Run the TestDevice console app [src/TestDevice] (
dotnet run
) and observe the status in the dashboard, for example, start with 200 devices and then change it to 100