Set up MDriven Turnkey on premise
(Created page with "There can be several reasons for running the MDriven Turnkey software on premise rather in the cloud. And it is easy to achieve. To run MDriven Turnkey on your own IIS you ne...")
 
No edit summary
Line 1: Line 1:
There can be several reasons for running the MDriven Turnkey software on premise rather in the cloud. And it is easy to achieve.
There can be several reasons for running the MDriven Turnkey software on premise rather than in the cloud. And it is easy to achieve.


To run MDriven Turnkey on your own IIS you need to do the following:
To run MDriven Turnkey on your own IIS you need to do the following:
Line 5: Line 5:
Create a new IIS application:
Create a new IIS application:


()
[[File:Turnkey on premise image 1.png|frameless]]


Download these application packages, MDriven Server and MDriven Turnkey:
Download these application packages, MDriven Server and MDriven Turnkey:


()
[[File:Turnkey on premise image 2.png|frameless]]


1.      Make sure you understand how to make the IIS server use https and how you can either self-sign of acquire your own certificate. This is key for making the internal WCF communication in MDriven Turnkey to work.
1.      Make sure you understand how to make the IIS server use https and how you can either self-sign of acquire your own certificate. This is key for making the internal WCF communication in MDriven Turnkey to work.
Line 15: Line 15:
2.      Import the Application Package for MDriven turnkey into your IIS app
2.      Import the Application Package for MDriven turnkey into your IIS app


()
[[File:Turnkey on premise image 3.png|frameless]]
 
[[File:Turnkey on premise image 4.png|frameless]]
 
[[File:Turnkey on premise image 5.png|frameless]]


() x 4
[[File:Turnkey on premise image 6.png|frameless]]


Now import the package for MDriven Server into your first application:
Now import the package for MDriven Server into your first application:


()
[[File:Turnkey on premise image 7.png|frameless]]


Name the application __MDrivenServer – with two underscores :
Name the application __MDrivenServer – with two underscores :


()
[[File:Turnkey on premise image 8.png|frameless]]


You will in the end have this:
You will in the end have this:


()
[[File:Turnkey on premise image 9.png|frameless]]


Configure for https (not described in this book – IIS specific knowledge)
Configure for https (not described in this book – IIS specific knowledge)
Line 41: Line 45:
You should see this:
You should see this:


()
[[File:Turnkey on premise image 10.png|frameless]]


This is the server’s response to not finding the expected database – it creates it and sets things up to the best of its ability. Click Index to go back to default page:
This is the server’s response to not finding the expected database – it creates it and sets things up to the best of its ability. Click Index to go back to default page:


()
[[File:Turnkey on premise image 11.png|frameless]]


We are prompted with a login – but we need to register a user that the MDriven Turnkey app will use to access the MDriven Server. You will also want to access the MDriven Server in order to upload and evolve models – so create a user “b” and remember the password:
We are prompted with a login – but we need to register a user that the MDriven Turnkey app will use to access the MDriven Server. You will also want to access the MDriven Server in order to upload and evolve models – so create a user “b” and remember the password:


()
[[File:Turnkey on premise image 12.png|frameless]]


Now log into MDriven Server with this user:
Now log into MDriven Server with this user:


()
[[File:Turnkey on premise image 13.png|frameless]]


In the admin area choose user admin:
In the admin area choose user admin:


()
[[File:Turnkey on premise image 14.png|frameless]]


In UserAdmin you can control the existing users on your MDrivenServer – we need an account to be used by your turnkey site.
In UserAdmin you can control the existing users on your MDrivenServer – we need an account to be used by your turnkey site.
Line 71: Line 75:
Check the box for Turn off registration
Check the box for Turn off registration


()
[[File:Turnkey on premise image 15.png|frameless]]


This way we will enforce user identification and we have turned off the ability to register as a new user. It is important that you remember the password for the users you have – otherwise you will be locked out.
This way we will enforce user identification and we have turned off the ability to register as a new user. It is important that you remember the password for the users you have – otherwise you will be locked out.


When you have accidently locked yourself out you can find the admin database, open it with SqlServerCompact tools. Find table admin_GlobalSettings and set column TurnOffRegistration to 0 (false) – now you may register a new user and regain control.
When you have accidently locked yourself out you can find the admin database, open it with SqlServerCompact tools. Find table admin_GlobalSettings and set column TurnOffRegistration to 0 (false) – now you may register a new user and regain control.
[[File:Turnkey on premise image 16.png|frameless]]


The database is located in __MDrivenServer\App_Data\DatabaseCompact.sdf
The database is located in __MDrivenServer\App_Data\DatabaseCompact.sdf
Line 81: Line 87:
Now the MDrivenServer is fully configured and we will look at the MDriven Turnkey application that will use it.
Now the MDrivenServer is fully configured and we will look at the MDriven Turnkey application that will use it.


Pointing our browser at the Turnkey application will give us this:
Pointing our browser at the Turnkey application will give us this: https://localhost/MyMDrivenTurnkeyApp1
 
https://localhost/MyMDrivenTurnkeyApp1


()
[[File:Turnkey on premise image 17.png|frameless]]


The reason is that the turnkey application expects to find a file with information about what user and password to use to access __MDrivenServer. The file should be in the App_Data folder and its name must be TurnkeySettings.xml. 
The reason is that the turnkey application expects to find a file with information about what user and password to use to access __MDrivenServer. The file should be in the App_Data folder and its name must be TurnkeySettings.xml. 


()
[[File:Turnkey on premise image 18.png|frameless]]


As we see there is a template file “TurnkeySettings – NotInEffect.xml” – copy this and name it “TurnkeySettings.xml”
As we see there is a template file “TurnkeySettings – NotInEffect.xml” – copy this and name it “TurnkeySettings.xml”
Line 97: Line 101:
Open the file and fill in the user name and password you picked for MDriven:
Open the file and fill in the user name and password you picked for MDriven:


()
[[File:Turnkey on premise image 19 .png|frameless]]


Once this is done we try our app again (you must restart your app-pool so that the file is re-read):
Once this is done we try our app again (you must restart your app-pool so that the file is re-read):
()


When we use MDriven Designer we will also need to enter the address to our MDriven Server manually – so skip the first login page and go for the second page:
When we use MDriven Designer we will also need to enter the address to our MDriven Server manually – so skip the first login page and go for the second page:
() x2


We must fill in the user and password that has access to MDriven Server, we need to say it is slot A0 and we need to check “Automated Deploy” – that means an upload of model is automatically deployed. The server address is the same we use to access MDriven Server: <nowiki>https://localhost/MyMDrivenTurnkeyApp1/__MDrivenServer</nowiki>  
We must fill in the user and password that has access to MDriven Server, we need to say it is slot A0 and we need to check “Automated Deploy” – that means an upload of model is automatically deployed. The server address is the same we use to access MDriven Server: <nowiki>https://localhost/MyMDrivenTurnkeyApp1/__MDrivenServer</nowiki>  
Line 118: Line 118:


()
()
[[Category:The MDriven Book]]
[[Category:MDriven Turnkey]]

Revision as of 07:55, 15 June 2023

There can be several reasons for running the MDriven Turnkey software on premise rather than in the cloud. And it is easy to achieve.

To run MDriven Turnkey on your own IIS you need to do the following:

Create a new IIS application:

Turnkey on premise image 1.png

Download these application packages, MDriven Server and MDriven Turnkey:

Turnkey on premise image 2.png

1.      Make sure you understand how to make the IIS server use https and how you can either self-sign of acquire your own certificate. This is key for making the internal WCF communication in MDriven Turnkey to work.

2.      Import the Application Package for MDriven turnkey into your IIS app

Turnkey on premise image 3.png

Turnkey on premise image 4.png

Turnkey on premise image 5.png

Turnkey on premise image 6.png

Now import the package for MDriven Server into your first application:

Turnkey on premise image 7.png

Name the application __MDrivenServer – with two underscores :

Turnkey on premise image 8.png

You will in the end have this:

Turnkey on premise image 9.png

Configure for https (not described in this book – IIS specific knowledge)

Notice the __MDrivenServer/logs catalog; things will work better if you application can access this – so find it in File Explorer and give read/write access to “IIS AppPool\NameOfTheAppPool”.

To configure your system navigate to the __MDrivenServer application:

https://localhost/MyMDrivenTurnkeyApp1/__MDrivenServer/

You should see this:

Turnkey on premise image 10.png

This is the server’s response to not finding the expected database – it creates it and sets things up to the best of its ability. Click Index to go back to default page:

Turnkey on premise image 11.png

We are prompted with a login – but we need to register a user that the MDriven Turnkey app will use to access the MDriven Server. You will also want to access the MDriven Server in order to upload and evolve models – so create a user “b” and remember the password:

Turnkey on premise image 12.png

Now log into MDriven Server with this user:

Turnkey on premise image 13.png

In the admin area choose user admin:

Turnkey on premise image 14.png

In UserAdmin you can control the existing users on your MDrivenServer – we need an account to be used by your turnkey site.

To tighten security for our MDrivenServer we are going to:

1.       Assign the users we want to have access the role SuperAdmin

2.       Check the box for Admin require Identification

3.       Check the box for Services require identification

Check the box for Turn off registration

Turnkey on premise image 15.png

This way we will enforce user identification and we have turned off the ability to register as a new user. It is important that you remember the password for the users you have – otherwise you will be locked out.

When you have accidently locked yourself out you can find the admin database, open it with SqlServerCompact tools. Find table admin_GlobalSettings and set column TurnOffRegistration to 0 (false) – now you may register a new user and regain control.

Turnkey on premise image 16.png

The database is located in __MDrivenServer\App_Data\DatabaseCompact.sdf

Now the MDrivenServer is fully configured and we will look at the MDriven Turnkey application that will use it.

Pointing our browser at the Turnkey application will give us this: https://localhost/MyMDrivenTurnkeyApp1

Turnkey on premise image 17.png

The reason is that the turnkey application expects to find a file with information about what user and password to use to access __MDrivenServer. The file should be in the App_Data folder and its name must be TurnkeySettings.xml. 

Turnkey on premise image 18.png

As we see there is a template file “TurnkeySettings – NotInEffect.xml” – copy this and name it “TurnkeySettings.xml”

This file is normally managed from the LicenseAndTicket web site – but since we are now installing Turnkey locally the LicenseAndTicket has no access to help us with this. We need to edit it manually.

Open the file and fill in the user name and password you picked for MDriven:

Turnkey on premise image 19 .png

Once this is done we try our app again (you must restart your app-pool so that the file is re-read):

When we use MDriven Designer we will also need to enter the address to our MDriven Server manually – so skip the first login page and go for the second page:

We must fill in the user and password that has access to MDriven Server, we need to say it is slot A0 and we need to check “Automated Deploy” – that means an upload of model is automatically deployed. The server address is the same we use to access MDriven Server: https://localhost/MyMDrivenTurnkeyApp1/__MDrivenServer

And now we have everything set up to run the development loop or production in house – nothing on in the cloud.

To update the site with fresh binaries for MDriven Turnkey or MDriven server we can simply reapply fresh packages from the build server. 

() x2

Just make sure to choose “Append files” – because if you “delete” you will lose the settings we just did and the database with any models and

()

This page was edited 47 days ago on 04/03/2024. What links here