Installing Azure Webhook Infrastructure(Automation)
Azure webhook infrastructure for high availability of the webhook functionality that means if Insights is down for sometime, payloads from devops tools should not be missed.
Official Link – portal.azure.com
Step - by - step guide on how to Install Azure Webhook Infrastructure
In the Azure portal, Search for Deploy a custom template or visit link https://portal.azure.com/#create/Microsoft.Template
Click on Build your own template in the editor.
Click on Load File and select the InsightsWebhookAzureDeploy.json file from the local system or paste the contents of the file in the portal.
Click on Save Button.
Select Subscription and Resource Group. Tick the Terms checkbox and click on Purchase button.
Click on Bell icon on top where you can see the deployment. Click on deployment to track the status.
It will take around 40 minutes deploy all your resources.
After successful completion of deployment of resources.
Click on Outputs from the left hand side menu.
Two outputs are available in the Outputs section.
apim-InsightsWebhook: Key to authorize https calls from API Management to Azure Functions.
webhookUrl: Url which you will give in the webhook section of devops tools.
Open a new tab and leave this tab opened.
Go to Storage accounts page in the azure portal or visit link: https://portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.Storage%2FStorageAccounts
Click on InsightsWebhookStorage name from the list.
Click on containers tab in the overview section or select from left menu.
Download the zip file from the nexus repository(PlatformInsightsAzureWebhook.zip) to your local system.
Follow the steps to upload zip file into the container:
Click on functionapp container to go inside container.
Click on upload button.
Select the zip file from the local system.
Select checkbox Overwrite if files already exist.
Click on advanced and change the Blob type to Block Blob and Block size to 100 MB.
Click on Upload button.
You need to manually set apim-InsightsWebhook in the function app.
Copy the value of apim-InsightsWebhook from the Outputs.
Go to Function App page from left menu or visit link https://portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.Web%2Fsites/kind/functionapp
Click on function app named InsightsWebhookApp.
Click on Function app settings under Configured features.
Click on Add new host key button.
Fill the name and value as follows:
Name: apim-InsightsWebhook
Value: “Paste the value of apim-InsightsWebhook from Outputs“
Click on Save button
Click on Overview tab
Click on configuration under configured features
Click on + New application setting button
Fill the name and values from Insights application as follows:
Copy the webhook name and webhook url provided by Insights Application by clicking on the highlighted part
Name : <Webhook Name>
Value: <Webhook Url>
Copy the webhookUrl from the outputs section of deployment and append the name of the webhook(eg - AzureGitWebhook) as endpoint value.
Example:
webhook Name: AzureGitWebhook
Final step, paste the final API URL in the webhook section of the devops tool(example - github).
©2021 Cognizant, all rights reserved. US Patent 10,410,152