Setup the Second Node (Worker Node #2)

There are two options to setup the second node.

Option 1 – GUI Setup

The first way is to repeat the exact same steps for setting up the first worker node. If it is possible to sit in front of the console or the Remote Desktop Console and click through the installation wizard, this is very straight forward to install the second worker nodes.

_images/image042.jpg

Note

If GUI installer is all you need, you can skip the Options 2 section. Most of the small deployment (< 5000 users) can use the GUI installer because it is fast and simple. However, if you need to setup many worker nodes for big deployment, you may prefer command scripts as shown in Option 2 below.

Option 2 – Command Line Script Setup

There is also a second option to clone the first node to the second node. The second option is completely scriptable. In case you need to prepare 10+ worker nodes, the second option may be easier compared to sitting in front of the Graphic User Interface and clicking through the UI keys and buttons.

To explain scripting, we will break up the script into steps. Once you understand what each step does, you can put all the command lines together into a single script file.

For scripting we use PowerShell, so all the commands below will be executed inside PowerShell.

13.1 – Preparation on the Worker Node #1

We will clone the program files and the registry entry. This step will export the registry and save them as registry files first. Also, we will save the SSL certificate here as well. This is a one-time preparation step.

(The bold text with character shading indicate script commands to run.)

On worker node #1, first we will make a directory to store the registry file.

mkdir c:depot

After that, we will change directory into the folder.

cd c:depot

We will export the 64-bit of the registry key.

reg export HKEY_LOCAL_MACHINESOFTWAREGladinet gladinet64.reg /reg:64

The operation completed successfully.

We will export the 32-bit of the registry key.

reg export HKEY_LOCAL_MACHINESOFTWAREGladinet gladinet32.reg /reg:32

The operation completed successfully.

Now, we will verify the two registry files exported into our depot directory.

C:depot>dir

Directory of C:depot

07/19/2014 12:20 AM 762 gladinet32.reg

07/19/2014 12:20 AM 546 gladinet64.reg

_images/image043.jpg

Now copy the SSL certificate file into this folder as well

After copying in the SSL certificate in the depot directory, the directory structure will look like this:

Note

When you export the SSL certificate, also import the private key.

_images/image044.jpg

We will also need to get the SSL certificate’s Thumbprint for later use by using a PowerShell Command. The thumbprint string will be used in script to import SSL certificate to IIS automatically. For example, the thumbprint below will be used later.

E88BC131D403B9EF5AA44DC520D3BABDB93E5886

PS C:> Get-ChildItem -path cert:LocalMachineMy

Directory: Microsoft.PowerShell.SecurityCertificate::LocalMachineMy

Thumbprint Subject

E88BC131D403B9EF5AA44DC520D3BABDB93E5886 CN=*.gladinet.com, OU=COMODO SSL Wildcard, OU=Domain Control Validated

E50A764700D92D717E8CE21DCF99CAB5F5280198 CN=localhost

Clone Program Files

Now, on worker node #2, we will copy c:Program Files (x86)CentreStack from worker node #1 to worker node #2.

We will go to the worker node2’s administrative command prompt with PowerShell.

First change directory to the c:Program Files (x86)directory.

cd “C:Program Files (x86)”

Second, we will map a network drive to the worker node #1.

net use z: \node1.tsys.gladinet.comc$

Third, we will copy over the “CentreStack” folder.

robocopy “z:Program Files (x86)CentreStack” “CentreStack” /s

When it is done, the PowerShell Window looks like this:

_images/image045.jpg

Clone the Registry

Now we will copy over the registry file from worker node #1.

On worker node #2, first we will create a folder to receive the files.

C:> mkdir c:depot>dir

After that, we will change directory into the folder.

C:> cd c:depot

Now, we will copy over the registry files (the z: drive is already mapped to worker node #1’s c$ share)

C:depot>copy z:depot*.*

z:depotgladinet32.reg

z:depotgladinet64.reg

2 file(s) copied.

Now, import the registry files. 32-bit first

C:depot> reg import gladinet32.reg /reg:32

The operation completed successfully.

Now import the registry file. 64-bit second

C:depot> reg import gladinet64.reg /reg:64

The operation completed successfully.

_images/image046.jpg

Command Line Setup for the IIS ASP.NET and WCF applications.

Next, we need to make sure IIS WebServer role is enabled, WCF is activated and so on.

Enable IIS-WebServer first

dism /online /enable-feature /featurename:IIS-WebServer /all

_images/image047.jpg

Enable IIS Management Console

dism /online /enable-feature /featurename:IIS-ManagementConsole /all

_images/image048.jpg

Enable ASP.NET45

dism /online /enable-feature /featurename:IIS-ASPNET45 /all

_images/image049.jpg

Enable WCF

dism /online /enable-feature /featurename:WCF-HTTP-Activation45 /all

_images/image050.jpg

Setup Web Applications

Run the following command to set it up.

& “C:Program Files (x86)CentreStackAppConfigCmd.exe” configapp

_images/image051.jpg

Import SSL Certificate

First we copy over the SSL certificate from node1

cd c:depot

*copy /y z:depot**.pfx

Then we import the certificate, replace the <password> with the real password of the PFX file.

certutil -p <password> -importPFX wildcard_export_1_20_14.pfx

After that, we will use PowerShell command to set it up in IIS. First we need to import the WebAdministration module.

PS C:> Import-Module WebAdministration

After that, we will go to the SslBindings

PS C:> cd IIS:SslBindings

PS IIS:SslBindings> *del *

Now, we use the certificate and apply it to IIS. In the example below, the E88…886 thumbprint part matches the thumbprint string we had earlier on worker node #1.

PS IIS:SslBindings> get-item cert:LocalMachineMyE88BC131D403B9EF5AA44DC520D3BABDB93E5886 | New-Item 0.00.0!443

_images/image052.jpg

Now, Worker Node #2 will be ready after a reboot. Reboot now.

Sanity Check Worker Node #2

After worker node #2 is up, you can use the http://localhost on worker node to check that the worker node #2 is running.

_images/image053.png

Add the worker node 2 to the cluster

While we are doing sanity check for worker node #2, we can also register it to the cluster by log in as the Master Administrator. Go to the “Cluster Worker Nodes” page and do “Add New Worker Node”.

The Node Name will match the Host Name. The external URL will match the virtual IP or the DNS name for the load balanced DNS name. The internal URL will match the internal IP address or internal DNS name.

You can also repeat the same validation methods for the setup as we have done for worker node #1.

_images/image0054.png

After it is added.

_images/image055.jpg

Add the worker node #2 to the Load Balancer.

This step depends on the kind of load balancer you have.

Skip this if you are not using Windows 2012 NLB.

In the case of Windows 2012 R2 Network Load Balancer, You will add it in the “Network Load Balancing Management”.

_images/image056.jpg

After adding the Node2, it looks like this.

_images/image057.jpg

Pre-Compile ASP.NET Pages

It is not required to pre-compile ASP.NET pages because ASP.NET does just-in-time compile so the first user hitting a specific ASP.NET page will get the page compiled.

However, for best performance, we can precompile the ASP.NET pages.

PS C:WindowsMicrosoft.NETframework64v4.0.30319> .aspnet_compiler.exe /v portal | Out-Null

PS C:WindowsMicrosoft.NETframework64v4.0.30319> .aspnet_compiler.exe /v management | Out-Null