Windows Server 2016, IIS10, MSSQL 2016, PHP7.0 with Moodle 3.6.2+

Re: Windows Server 2016, IIS10, MSSQL 2016, PHP7.0 with Moodle 3.6.2+

by Usman Asar -
Number of replies: 4
Picture of Plugin developers Picture of Testers

Hello Craig,

Apologies for a delay, for in my mind I had replied already days back, just coming back to this post today I realised I hadn't. 

Anyway, regarding shared configurations, everything you do in IIS is written in XML files (applicationHost.config XML files), so when setting up a farm, I have to add a website to every instance of the farm. So if I have made some changes in configuration of the website, I have to run around making changes in every server, this is where shared configuration comes in, we share configuration files on a shared network. in your case you'll be sharing this configuration out of your main box and tells every other server to look for configuration changes. Concept is basically similar to shared content, but adding shared configuration, you'll be making changes (weather content or site) on main server to be replicated to all others in farm. 

In order to set up shared configurations, create a folder on main server (say sharedconfigurations)  <<-- this is where you'll be replicating the applicationHost.config file, give permission of domain admins (or whatever you have setup your domain as, you can as well create a dedicated user for that, for example wwwconfig user with read and write permissions to that shared configuration folder) 

Step 1 will be exporting the configuration file, go to IIS manager at server level and you'll find icon shared configurations


Once you open that, you'll find check box of "enable shared configuration" - dont check it yet, export file first to that shared configuration folder


Once you click export, it will ask you for the place to export to (your shared configuration folder) - use your wwwconfig user, enter password and you'll find encryption keys option - this key is used when you'll setup configuration on other servers, to confirm for shared configuration. 

Step 2 : Check that "enable shared configuration" enter wwwconfig user, password and encryption, and you'er done setting up shared configuration.

now you only have to do step 2 on other servers, same method, rather exporting configuration files, just enable shared configuration. 

when you create application pool and setup site on main server, all that will be replicated to other servers, you dont have to setup application pools and sites on other servers, this makes the site management very easy.

only thing, you have to take care of, if for example you're adding an application that you'll be keeping on one server only, then just take servers out of shared configurations and once you're done with setup, re-enable shared configurations again. 

Regarding database replication of ideal tables, do ask for advice of Ken Task, he has expertise in that area. 

some guide at the end would really be worth while, as setting this whole scenario isnt easy task, though Windows server makes the process easy, but its all the attention for setup details that makes a mess. I would have done it practically myself, but then due to hardware limitations I postponed the idea wink

In reply to Usman Asar

Re: Windows Server 2016, IIS10, MSSQL 2016, PHP7.0 with Moodle 3.6.2+

by Craig Gardner -
Usman,

Apologies also, I picked this up and subconsciously replied.

What exactly is the 'Shared Configuration' sharing with regards to the environment etc?

I'm under the impression after testing this element that the servers all need to be baseline'd to the same standard with regards to current configuration. For example, wwwroot requires the same vanilla moodle installation package, PHP configured with Fast CGI and the SQL drivers.

Am i right in this approach or does the shared configuration to some degree replicated the smaller piece of this puzzle?

I noticed i can create a virtual directory for example, and it will appear on the other servers configured for shared configuration.


Another Question:

I have setup a remote site with the;

For Now dB Config (until merge tables can be implemented)

  • dbtype - MSSQL
  • dbhost - SQLCluster01
  • Prefix -  mdl_     <---------- I want to use this better to ideally identify different portions of moodle installations at remote sites?


Issue:

At remote site, i hit the local address space and i'm aware that when i click through the courseware it points to the parent cluster for the URL Links. Will moodle still use local resource for moodle data or will the upstream parent manage the files as the database points the links to the parent environment and thus not use its locaaly stored repo for moodle data and webroot etc?


Cheers


\Craig

In reply to Craig Gardner

Re: Windows Server 2016, IIS10, MSSQL 2016, PHP7.0 with Moodle 3.6.2+

by Usman Asar -
Picture of Plugin developers Picture of Testers

Craig,


Absolutely right in terms of shared configuration. 

regarding DB, you can use any prefix, but be assured it remains same when merging tables, as on local installation moodle points to table name, and in case of difference once merged, it will create issue. 

moodledata is configured in config.php file, if some portion of the content are called in from central repository then it's ok, moodledata's local folder will serve images, parts of selected theme, user cache and anything uploaded on that instance (which will later be replicated on to other moodle sites's moodledata folder anyway). you can setup moodledata to be used from parent (central repository) but it will impact the speed of moodle. 

In reply to Usman Asar

Re: Windows Server 2016, IIS10, MSSQL 2016, PHP7.0 with Moodle 3.6.2+

by Craig Gardner -
Usman,

Great, I get the 'Shared Configuration' now and have implemented this into the design. Changes are being made at master and showing at remote sites.

How much do you know about Application Request Routing (AAR) and URL re-write?

So if i'm at the remote site and i have the copy of the master database locally, and i have the Config.php all pointing to the local server for SQL, WWWroot and MoodleData, then whats the best way to get this to rewrite the URL's pertaining to the master site without having to do it in the moodle admin console to change links everytime.

So i hit URL http://moodle/lms which has many IP addresses (HostA) assigned to it for all the sites. I don't wan't the copied database to redirect to the parent database at the master site. Does that make sense?

Cheers in advance Usman

\Craig
In reply to Craig Gardner

Re: Windows Server 2016, IIS10, MSSQL 2016, PHP7.0 with Moodle 3.6.2+

by Usman Asar -
Picture of Plugin developers Picture of Testers

Hi Chris, 

Hope you're getting well along with your setup, I can understand the situation, but weren't there 3 copies for DB in all across your farm? I haven't touched URL ReWrite to the extent that I can tell without referring to IIS documentation, but based on your requirements, you can look into this page

I believe ARR has settings to route incoming traffic to servers, but I haven't practically tested it (remember the limitation of my CPU), but will have a look into it if I can find something out.