How to deploy mountebank in Azure?

269 views Asked by At

just worked through the basic mountebank tutorial. worked great!! next step is to deploy mountebank in Azure.

i am wondering if anyone has successfully deployed mountebank into azure? which PAAS/SAAS did you use?

1

There are 1 answers

0
Sourav On

For calling your mountebank external API or for Integration testing you can make use of Azure functions or Azure APIM Mock API policies.

There’s no inbuilt Azure service or Azure marketplace image that supports Mountebank as that is a third-party package. But you can make use of Azure Functions to trigger the Mountebank endpoint or make use of Mock API in Azure API management and create different Inbound and Outbound policies for your mock test.

  1. Azure Functions :- I referred this blog for Integrating Mouneblank with Azure functions:-

https://devkimchi.com/2019/08/07/azure-functions-integration-testing-with-mountebank/

Git-hub repo of same blog - https://github.com/devkimchi/Mountebank-Integration-Testing

I cloned the repo in my Azure Repo and updated the code runtime to .Net 6.0 and updated all the dependencies to their latest supported nuget versions as the github repo is using deprecated version. enter image description here enter image description here I ran this repo via a pipeline in Azure Devops to deploy this project to the Function app. enter image description here After running the pipeline, the Build and Deployment to Azure function was successful: enter image description here enter image description here Now, this function app is integrated with your Mounteblank API enter image description here You can make use of Function app proxies to configure your Mounteblank API according to your requirements.

  1. You can make use of Azure API management Service.

I deployed one Azure APIM service and created one API to initiate HTTP request to Mounteblank API running on port 2525 locally. enter image description here References:

https://devkimchi.com/2019/08/07/azure-functions-integration-testing-with-mountebank/ by [Justin Yoo]

https://learn.microsoft.com/en-us/azure/api-management/mock-api-responses?tabs=azure-portal