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
 
(7 intermediate revisions by 2 users not shown)
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, do the following:


Create a new IIS application:
1. Create a new IIS application:


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


Download these application packages, MDriven Server and MDriven Turnkey:
2. 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.
3. Make sure you understand how to make the IIS server use https and how you can either self-sign or acquire your own certificate. This is key for making the internal WCF communication in MDriven Turnkey work.


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


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


() x 4
[[File:Turnkey on premise image 4.png|frameless]]
 
[[File:Turnkey on premise image 5.png|frameless]]
 
[[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:


You will in the end have this:
[[File:Turnkey on premise image 8.png|frameless]]


()
In the end, you will have this:


Configure for https (not described in this book – IIS specific knowledge)
[[File:Turnkey on premise image 9.png|frameless]]


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”.
Configure for https (not described in this book IIS-specific knowledge)


To configure your system navigate to the __MDrivenServer application:
Notice the __MDrivenServer/logs catalog; things will work better if your application can access this. Find it in File Explorer and give read/write access to “IIS AppPool\NameOfTheAppPool”.


<nowiki>https://localhost/MyMDrivenTurnkeyApp1/__MDrivenServer/</nowiki>
To configure your system navigate to the __MDrivenServer application: <nowiki>https://localhost/MyMDrivenTurnkeyApp1/__MDrivenServer/</nowiki>  


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 the 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.


To tighten security for our MDrivenServer we are going to:
To tighten security for our MDrivenServer, we are going to:
# Assign the users we want to have access to the role SuperAdmin
# Check the box for Admin require Identification
# Check the box for Services require identification
Check the box for Turn off registration:


1.       Assign the users we want to have access the role SuperAdmin
[[File:Turnkey on premise image 15.png|frameless|306x306px]]


2.       Check the box for Admin require Identification
This way, we will enforce user identification and turn 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.


3.       Check the box for Services require identification
When you have accidentally locked yourself out, you can find the admin database, and 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.


Check the box for Turn off registration
[[File:Turnkey on premise image 16.png|frameless]]


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


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.
Now the MDrivenServer is fully configured and we will look at the MDriven Turnkey application that will use it.
 
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.


The database is located in __MDrivenServer\App_Data\DatabaseCompact.sdf
Pointing our browser at the Turnkey application will give us this: https://localhost/MyMDrivenTurnkeyApp1


Now the MDrivenServer is fully configured and we will look at the MDriven Turnkey application that will use it.
[[File:Turnkey on premise image 17.png|frameless]]


Pointing our browser at the Turnkey application will give us this:
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. 


https://localhost/MyMDrivenTurnkeyApp1
[[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”


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. 
This file is normally managed from the LicenseAndTicket website – 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 username and password you picked for MDriven:


As we see there is a template file “TurnkeySettings – NotInEffect.xml” – copy this and name it “TurnkeySettings.xml”
[[File:Turnkey on premise image 19 .png|frameless]]


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.
Once this is done, we try our app again (you must restart your app-pool so that the file is re-read):


Open the file and fill in the user name and password you picked for MDriven:
[[File:Turnkey on premise image 19.png|frameless]]


()
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 to the second page:


Once this is done we try our app again (you must restart your app-pool so that the file is re-read):
[[File:Turnkey on premise image 20.png|frameless]]


()
[[File:Turnkey on premise image 22.png|frameless|301x301px]]


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 check “Automated Deploy” – that means an upload of the model is automatically deployed. The server address is the same one we use to access MDriven Server: <nowiki>https://localhost/MyMDrivenTurnkeyApp1/__MDrivenServer</nowiki>


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


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>
To update the site with fresh binaries for MDriven Turnkey or MDriven server, we can simply reapply fresh packages from the build server. 


And now we have everything set up to run the development loop or production in house – nothing on in the cloud.
[[File:Turnkey on premise image 4.png|frameless|333x333px]]


To update the site with fresh binaries for MDriven Turnkey or MDriven server we can simply reapply fresh packages from the build server. 
[[File:Turnkey on premise image 24.png|frameless|333x333px]]


() x2
Just make sure to choose “Append files” – because if you “delete”, you will lose the settings we just set up and the database with any models.


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
[[File:Turnkey on premise image 25.png|frameless]]


()
The MDriven Book - See: [[BestPractices:MDriven Turnkey Architecture|MDriven Turnkey Architecture]]
[[Category:The MDriven Book]]
[[Category:MDriven Turnkey]]

Latest revision as of 06:21, 3 April 2024

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, do the following:

1. Create a new IIS application:

Turnkey on premise image 1.png

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

Turnkey on premise image 2.png

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

4. 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

In the end, you will 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 your application can access this. 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 the 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 to 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 turn 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 accidentally locked yourself out, you can find the admin database, and 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 website – 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 username 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):

Turnkey on premise image 19.png

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 to the second page:

Turnkey on premise image 20.png

Turnkey on premise image 22.png

We must fill in the user and password that has access to MDriven Server. We need to say it is slot A0 and check “Automated Deploy” – that means an upload of the model is automatically deployed. The server address is the same one 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. 

Turnkey on premise image 4.png

Turnkey on premise image 24.png

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

Turnkey on premise image 25.png

The MDriven Book - See: MDriven Turnkey Architecture

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