You can use Microsoft Azure to host an MDriven application on your own Azure account, making an application built in MDriven Designer available through an Azure web address for users on desktop and mobile devices.
Azure and MDriven
Microsoft Azure is Microsoft's cloud platform. In an MDriven deployment, Azure can provide the Web App environment that runs MDriven Turnkey and MDrivenServer.
Example: You can publish a Turnkey application for users at an Azure Web App address instead of running it only on a local development machine. The Turnkey application presents the user interface, while MDrivenServer hosts the model and supports the application.
Azure deployment is one option in the wider deployment documentation. If you need an on-premise deployment instead, use the applicable IIS or other deployment guidance from that section.
Choose a deployment approach
Use the approach that matches how you want to deploy and operate the application.
| Goal | Use this guidance |
|---|---|
| Publish an application from MDriven Designer to an Azure account | Documentation:Hosting turnkey on my own Azure account |
| Install and configure MDrivenServer and MDriven Turnkey files in Azure Web Apps | HowTos:Install MDriven Server and Turnkey on Microsoft Azure |
| Learn the Azure WebApp installation route referenced by the documentation | Documentation:Installing TurnKey as an Azure WebApp |
| Run more than one Turnkey instance or investigate Azure scale-out considerations | Documentation:Scaling out Turnkey on Azure |
| Set up HTTPS certificates with Let's Encrypt | Documentation:Lets encrypt |
| Use Azure Active Directory authentication to obtain Office 365 or Microsoft Graph access tokens | Documentation:Office365 accesstoken |
Deploy MDriven Turnkey and MDrivenServer
You can run MDriven Turnkey and MDrivenServer as two Azure apps, or place both in one Azure app. The detailed installation procedure, downloads, and configuration are maintained in HowTos:Install MDriven Server and Turnkey on Microsoft Azure.
Use two Azure apps
Use one Azure app for MDriven Turnkey and another for MDrivenServer when you want them hosted as separate applications.
- In the Azure portal, create a Web App for MDriven Turnkey and a second Web App for MDrivenServer.
- Create or select an App Service Plan for the apps.
- Download each app's publish profile from its Azure Overview page by selecting Get publish profile.
- Upload the MDriven Turnkey application files to the Turnkey app's
site\wwwrootdirectory. - Upload the MDrivenServer application files to the MDrivenServer app's
site\wwwrootdirectory. - Complete the MDrivenServer and Turnkey configuration described in the installation guide.
Run both components in one Azure app
You can also host both components in one Azure app. In this layout, Turnkey is in the Web App root and MDrivenServer is a virtual application beneath it.
- Upload the MDriven Turnkey files to
site\wwwroot. - Upload the MDrivenServer files to
site\wwwroot\__MDrivenServer. - In the Azure App panel, open Settings > Configuration > Path mappings.
- Create a virtual application with these values:
- Virtual path:
/__MDrivenServer - Physical path:
site\wwwroot\__MDrivenServer
- Virtual path:
- Ensure that
__MDrivenServerhas type Application. Do not select the checklist items for that virtual application.
With this configuration, Turnkey runs from the default root directory and MDrivenServer is available at:
https://<your-Azure-app-domain>/__MDrivenServer/
Example: If the Azure Web App domain is myapplication.azurewebsites.net, the MDrivenServer path is https://myapplication.azurewebsites.net/__MDrivenServer/.
Configure the deployed applications
Azure hosting still requires application configuration after the files are uploaded.
Configure MDrivenServer
For an IIS-hosted .NET Core application, create App_Data/CommandLineOverride.xml in the MDrivenServer application files and specify the MDrivenServer location as described in HowTos:Install MDriven Server and Turnkey on Microsoft Azure.
To reset the password for the MDrivenServer user name a:
- Create
App_Data/PwdReset.txtin the MDrivenServer application files. - Put the new password in the file.
- Push the update to the Azure app.
- Sign in to MDrivenServer with user name
aand the new password. - Delete
PwdReset.txtafter you have verified the new password.
Then upload the model to MDrivenServer using the new credentials.
Configure MDriven Turnkey
Configure the Turnkey application as described in HowTos:Install MDriven Server and Turnkey on Microsoft Azure. A deployed Turnkey application requires an Index ViewModel—the ViewModel that serves as the application's entry view.
Example: Before requesting a deployment from the MDriven Portal, ensure that the model contains an Index ViewModel. Without it, the Turnkey app does not have the required entry view.
Publish through the MDriven Portal
MDriven Designer includes an Azure publishing flow for deploying an application to an Azure slot. The workflow uses the Azure publish profile to register a Turnkey site in the MDriven Portal.
- Obtain the publish profile from the Azure Web App.
- Upload the publish profile to the MDriven Portal.
- Select Create Turnkey Site and then Save.
- Open Show my Turnkey Sites, select the registered site, and choose Manage Turnkey Site.
- Select Request Deploy and save the change.
- When the site status is Deployed, select Send Settings and Restart and save.
- Open the site URL to verify that the Turnkey application is available.
The documented deployment request takes no more than five minutes. For the full publishing walkthrough, including Azure account and App Service Plan setup, see Documentation:Hosting turnkey on my own Azure account.
Operational considerations
When you choose an Azure server tier or App Service Plan, review its cost and capacity for the application you are hosting. Azure plans can differ, including free and premium options.
Keep the Azure app configured so that it remains active when that is required for your application. Also plan for the number of applications you intend to host; for example, a production application and a separate demo instance may need separate deployment decisions.
If increased load requires more than one Turnkey instance, follow Documentation:Scaling out Turnkey on Azure rather than treating file upload as the complete scale-out configuration.
Related Azure integrations
MDrivenServer uses Microsoft.Data.SqlClient in place of System.Data.SqlClient. This change enables Azure SQL connection strings that use ActiveDirectoryIntegrated; see Documentation:Microsoft.data for the background.
For Azure Active Directory-based access to Office 365 or Microsoft Graph APIs, Azure requires an app registration, client ID, tenant ID, client secret, redirect endpoint, and appropriate permissions. Follow Documentation:Office365 accesstoken for the required MDriven configuration and token flow.
