Installing MDriven Server and Turnkey on Microsoft Azure
No edit summary
No edit summary
Line 9: Line 9:


=== Setting Up Azure ===
=== Setting Up Azure ===
To start setting up your Turnkey application, go to [https://portal.azure.com '''https://portal.azure.com''']  and log in under your existing account or create the new one.
Go to [https://portal.azure.com '''https://portal.azure.com''']  and log in under your existing account or create a new one.


First, you need to create a '''new Web app''' to run your Turnkey application.
First, you need to create a '''new Web app''' to run your Turnkey and MDriven Server application.
 
Create two Azure apps, one to run the MDriven Server and one to run the MDriven Turnkey
 
To run both the MDriven Server and Turnkey in one Azure app continue below.
[[File:Create new Web app.png|none|thumb|528x528px|Create a new Web app on Azure]]Enter the name of your application and create or choose an existing App Services Plan.
[[File:Create new Web app.png|none|thumb|528x528px|Create a new Web app on Azure]]Enter the name of your application and create or choose an existing App Services Plan.
[[File:Name your app and choose App Services Plan.png|none|thumb|533x533px|Name your app and choose App Services Plan]]
[[File:Name your app and choose App Services Plan.png|none|thumb|533x533px|Name your app and choose App Services Plan]]
Line 17: Line 21:
=== Pushing App Files To Azure ===
=== Pushing App Files To Azure ===
Now, we need to download the publish profile - go to "'''Overview'''" and press "'''Get publish profile'''".[[File:Get publish profile from Azure.png|none|thumb|690x690px|Get the publish profile from Azure]]
Now, we need to download the publish profile - go to "'''Overview'''" and press "'''Get publish profile'''".[[File:Get publish profile from Azure.png|none|thumb|690x690px|Get the publish profile from Azure]]
Azure provides many different methods to publish your application files including Zip Deploy, One Drive, Github, FTP and many more.
=== Installing MDriven Turnkey ===
Download the latest MDriven Turnkey from https://mdriven.net/downloads
Push the App Files to <code>site\wwwroot</code> directory of your Azure App
=== Installing MDriven Server ===
Download the latest MDriven Server from https://mdriven.net/downloads
Push App Files to <code>site\wwwroot</code> directory of your other created Azure App
=== Running the Turnkey and MDriven Server in one Azure App ===
To the MDriven Server and Turnkey in one app
Upload the Turnkey app files to <code>site\wwwroot</code> directory
Upload the MDriven Server app files to <code>site\wwwroot\__MDrivenServer</code> directory
With the Azure App Panel  Goto Settings > Configuration > Path mappings
The MDriven Turnkey will run in the default directory <code>site\wwwroot</code>
Create a virtual app path for running the MDriven Server
Virtual path:  /__MDrivenServer
Physical Path: site\wwwroot\__MDrivenServer
The MDriven Server will now be accessible at  <Your Azure App Domain>/__MDrivenServer/
=== Setting up MDriven Server ===
Within the MDriven Server app files
Create a CommandLineOverride.xml  file in the location <code>App_Data/CommandLineOverride.xml</code> specifying the location of MDrivenServer. This a requirement of .NET Core applications using IIS.
Contents of CommandLineOverride.xml<syntaxhighlight lang="xml">
<root>
  <arg>iis=https://<Your Azure App domain>/__MDrivenServer</arg>
</root>
</syntaxhighlight>Reset the MDriven Server password for '''a'''  user using PwdReset file
Create a PwdReset.txt file with the new password in the location <code>App_Data/PwdReset.txt</code>
Push updates to the Azure App and try to login to the MDriven Server with User Name: '''a'''  and new password.
Delete PwdReset.txt file after testing the new password.
Upload the model to the MDriven Server with new set credentials




Line 28: Line 82:




When all these steps are done, we are ready to go to [https://portal.mdriven.net '''https://portal.mdriven.net''']
 
When all these steps are done, we are ready to go to[https://portal.mdriven.net '''https://portal.mdriven.net''']


'''NOTE:''' It is best to do at least the first deploy with Portal (as described below) since you then get the strong password set and init files updated for your installation - but after initial setup, you can easily deploy new code for Turnkey + server via OneDrive as described here: [[Deploy_Turnkey_on_your_own_Azure_with_OneDrive]]
'''NOTE:''' It is best to do at least the first deploy with Portal (as described below) since you then get the strong password set and init files updated for your installation - but after initial setup, you can easily deploy new code for Turnkey + server via OneDrive as described here: [[Deploy_Turnkey_on_your_own_Azure_with_OneDrive]]

Revision as of 15:43, 4 December 2024

This page was created by Lars.olofsson@mdriven.net on 2017-01-20. Last edited by Stephanie@mdriven.net on 2025-02-20.


This tutorial will help you set up MDriven Turnkey on Microsoft Azure.

All the components needed to run MDriven Turnkey (the latest versions of MDriven Server & MDriven Turnkey) are available here for MDrivenServer and here for MDrivenTurnkey - you will need both.

You can run MDriven Turnkey on your Azure account or set it up on your local IIS. To set up on a local IIS, see Installing MDriven Server on Windows.

Setting Up Azure

Go to https://portal.azure.com and log in under your existing account or create a new one.

First, you need to create a new Web app to run your Turnkey and MDriven Server application.

Create two Azure apps, one to run the MDriven Server and one to run the MDriven Turnkey

To run both the MDriven Server and Turnkey in one Azure app continue below.

Create a new Web app on Azure

Enter the name of your application and create or choose an existing App Services Plan.

Name your app and choose App Services Plan

Pushing App Files To Azure

Now, we need to download the publish profile - go to "Overview" and press "Get publish profile".

Get the publish profile from Azure

Azure provides many different methods to publish your application files including Zip Deploy, One Drive, Github, FTP and many more.

Installing MDriven Turnkey

Download the latest MDriven Turnkey from https://mdriven.net/downloads

Push the App Files to site\wwwroot directory of your Azure App

Installing MDriven Server

Download the latest MDriven Server from https://mdriven.net/downloads

Push App Files to site\wwwroot directory of your other created Azure App

Running the Turnkey and MDriven Server in one Azure App

To the MDriven Server and Turnkey in one app

Upload the Turnkey app files to site\wwwroot directory

Upload the MDriven Server app files to site\wwwroot\__MDrivenServer directory

With the Azure App Panel Goto Settings > Configuration > Path mappings

The MDriven Turnkey will run in the default directory site\wwwroot

Create a virtual app path for running the MDriven Server

Virtual path: /__MDrivenServer

Physical Path: site\wwwroot\__MDrivenServer

The MDriven Server will now be accessible at <Your Azure App Domain>/__MDrivenServer/

Setting up MDriven Server

Within the MDriven Server app files

Create a CommandLineOverride.xml file in the location App_Data/CommandLineOverride.xml specifying the location of MDrivenServer. This a requirement of .NET Core applications using IIS.

Contents of CommandLineOverride.xml

<root>
  <arg>iis=https://<Your Azure App domain>/__MDrivenServer</arg>
</root>

Reset the MDriven Server password for a user using PwdReset file

Create a PwdReset.txt file with the new password in the location App_Data/PwdReset.txt

Push updates to the Azure App and try to login to the MDriven Server with User Name: a and new password.

Delete PwdReset.txt file after testing the new password.

Upload the model to the MDriven Server with new set credentials


Now, we need to add a virtual directory, because two applications (MDriven Server & MDriven Turnkey) are running on one site.

Go to "Application Settings" and scroll down to "Virtual applications and directories" and create another application called “__MDrivenServer” (double underscore).

Don't forget to make sure the __MDrivenServer is an application of its own (the application check box next to the folder name must be checked).

Create another web app called "__MDrivenServer"


When all these steps are done, we are ready to go tohttps://portal.mdriven.net

NOTE: It is best to do at least the first deploy with Portal (as described below) since you then get the strong password set and init files updated for your installation - but after initial setup, you can easily deploy new code for Turnkey + server via OneDrive as described here: Deploy_Turnkey_on_your_own_Azure_with_OneDrive

Setting Up on MDriven Portal

Open https://portal.mdriven.net and log in under your account.

Go to "Views" -> "Show my Turnkey Sites" and "Register a New Site".

Name your application and upload the publish profile to MDriven Portal and press "Create Turnkey Site" and "Save".

Now, go back to "Show my Turnkey Sites" where you can see that your new site is registered, but not deployed. Click on it and choose "Manage Turnkey Site".

Manage your site from MDriven Portal

On the "Manage" page, you can request a deploy of your website. To request deploy, you need to press the "Request Deploy" button and save it. Deploy takes no more than 5 minutes. When the status of your site changes to "Deployed", press "Send Settings and Restart" and save.

After these steps, you can revisit your site and see your Turnkey application.

First look at the Turnkey app

NOTE! Each Turnkey app must have an Index ViewModel.

You can go back to https://portal.mdriven.net/ and open MDriven Designer to start modeling.

The MDriven Book - Next Chapter: Set up MDriven Turnkey on premise

Video Tutorial

To make your experience smooth, we set the main tags mentioned in the video to the right bar menu of this mini-player. Choose an interesting subtitle on the list and immediately get to the exact theme navigation item place in the video. Now you can pick any topic to be instructed on without watching the whole video.

Setting up MDriven Turnkey on Microsoft Azure Setting up on Microsoft Azure Setting up on MDriven Portal