How to manually join a new Controller to an existing site

How to manually join a new Controller to an existing site

book

Article ID: CTX213386

calendar_today

Updated On:

Description

Joining a new controller to an existing site.


Instructions

  1. Create an instance Script for each service running on the new Controller:
    • Execute following PowerShell commands against the Site database. Copy C:\Temp\1-Join.sql to the SQL server and execute in CMD mode.
$DataBase = 'MySiteDatabaseName'   ## Replace with site database name
$Commands = Get-Command | Where-Object {$_.Name -like "*DBSchema"} | Get-Unique
Foreach ($Command In $Commands) {Out-File -FilePath C:\Temp\GetSchema.ps1 -InputObject "$Command -DatabaseName $DataBase -ScriptType Instance >> C:\Temp\1-Join.sql" -Append} 
TIMEOUT 10
Invoke-Command {C:\Temp\GetSchema.ps1}

 

  1. Set the DB connection string for each of the new controller services:
    • Execute following PowerShell commands on the new Delivery Controller.
$DatabaseConnectionString = "Server=SQLServer.domain.lab;Initial Catalog=MySiteDatabaseName;Integrated Security=True"  ## Replace with correct SQL server address and site database name, or copy database connection string from existing Delivery Controller and assign to variable $DatabaseConnectionString .
$Commands = Get-Command | Where-Object {$_.Name -like "Set*DBConnection"} | Get-Unique
foreach ($Command in $Commands) {Out-File -FilePath C:\Temp\2-SetDBConnectionString.ps1 -InputObject "$Command -DBConnection ""$DatabaseConnectionString"" -Force" -Append}
TIMEOUT 10
Invoke-Command {C:\Temp\2-SetDBConnectionString.ps1}

 

  1. Register the new controllers service instances with the existing Site Configuration Service:
    • Execute following PowerShell commands on the new Delivery Controller.
$Commands = Get-Command | Where-Object {$_.Name -like "Get*ServiceInstance"} | Where-Object {$_.Name -ne "Get-ConfigRegisteredServiceInstance"} | Get-Unique
Foreach ($Command in $Commands) {Out-File -FilePath C:\Temp\3-RegisterServiceInstance.ps1 -InputObject "$Command | Register-ConfigServiceInstance" -Append}
TIMEOUT 10
Invoke-Command {C:\Temp\3-RegisterServiceInstance.ps1}

 

  1. Reset the service group membership call for each service group:
    • Execute following PowerShell commands on the new Delivery Controller.
$Commands = Get-Command | Where-Object {$_.Name -like "Reset-*ServiceGroupMembership"} | Get-Unique 
Foreach ($Command in $Commands) {Out-File -FilePath C:\Temp\4-ResetServiceGroupMembership.ps1 -InputObject "Get-ConfigServiceInstance | $Command " -Append}
TIMEOUT 10
Invoke-Command {C:\Temp\4-ResetServiceGroupMembership.ps1}

Issue/Introduction

Joining a new controller to an existing site. Manually Joining A New Controller To An Existing Site.