Chapter 4. Advanced SharePoint 2013 Installation and Scalability

The needs of most organizations are not going to be met by a simple single-server SharePoint farm. Indeed, the power of SharePoint 2013 is in its scalability, and the majority of organizations are going to want to take SharePoint to the next level in terms of functionality.

This chapter covers the more advanced installation scenarios that aren’t covered in Chapter 3, “Installing a Simple SharePoint Server 2013 Farm.” It is meant to build upon the simple farm deployment examples illustrated in the previous chapter, but take you into the realm of tasks that are often performed during the installation of larger and more complex environments, including Kerberos, Secure Sockets Layer (SSL) configuration, and scripted installations of an entire farm using PowerShell.

In addition, this chapter focuses on techniques and information necessary to scale a SharePoint implementation to organizations of varying sizes. Specific components that can be scaled are described and contrasted. In addition, examples of scalability in organizations of different sizes are presented.

Creating an Installation Checklist

Installation of a large and complex SharePoint environment can be a complicated task, and various subtasks and routines must be run before the environment is production ready. It is subsequently important to create a mental and physical checklist of the types of tasks required for rollout of a farm.

The following list of tasks represents a common large farm deployment routine and can be used as a starting point for determining the task list that is required for installation of your specific environment. It is not a definitive list of all tasks, and the order of tasks performed might vary depending on the environment.

Conceptualizing and Architecting a SharePoint Farm

The following list denotes the high-level steps that should be followed before architecting a SharePoint environment:

1. Define the business needs that should ideally be met by the project.

2. Map business needs to technical solutions in SharePoint 2013.

3. Define the number of farms required to satisfy business and technical needs and to provide for publishing and other features.

4. Define the number and scale of intranet versus extranet environments, using guidelines from Chapter 13, “Deploying SharePoint for Extranets and Alternate Authentication Scenarios.”

5. Define the physical architecture required to deploy the technical solutions.

6. Define the security requirements, including number of service accounts and the rights they require.

7. Define the number of third-party and other Microsoft solutions to properly secure and deploy.

See Chapter 2, “Architecting a SharePoint 2013 Deployment,” for more information on these tasks.

Installing SharePoint 2013

Most SharePoint environments follow the same general process for the installation of a farm. Use the following high-level checklist for advanced SharePoint installations:

1. Build the SQL Server Database environment for SharePoint.

2. Build the SharePoint Server environment, including all role servers, from an operating system (OS) perspective and also by installing the SharePoint binaries.

3. Create the SharePoint farms using the Configuration Wizard or (preferably) using PowerShell (as demonstrated in this chapter).

See Chapter 3 for more information on these tasks.

Configuring SharePoint 2013

Following the creation of the farm itself, use the following high-level checklist to continue the installation of an advanced SharePoint environment:

1. Create Web Applications required, configuring them for Kerberos, SSL, and load balancing (all best practices).

2. Configure the managed paths and content database structure, based on the parameters defined during the design phase.

3. Configure the SharePoint Central Administration web application as a load-balanced, SSL, and Kerberos-enabled web application for performance, security, and high availability.

4. Configure all service applications required for the farm, using either the web-based wizard or (preferably), PowerShell, as demonstrated in this chapter.

5. Configure the User Profile Service to pull information into user profiles. This can also be scripted, but requires very specific settings and configuration. Namely, it requires the account used for the service to be both a local admin on the server it is installed on as well as a farm admin in the forest. (These rights can be later modified after provisioning.) The account also needs Replicating Directory Changes rights within Active Directory.

6. Configure inbound mail settings, and configure them to be load balanced for availability of the service.

7. Configure outbound mail settings for alerts and other messages to be sent from SharePoint.

8. Create and configure My Sites personal sites.

9. Configure search (covered in more detail in Chapter 8, “Leveraging and Optimizing Search in SharePoint 2013,” including third-party iFilters, such as PDF iFilters, and FAST Search if needed.

10. Configure backup (third-party, Microsoft Data Protection Manager [DPM], or integrated backup). See Chapter 10, “Backing Up and Restoring a SharePoint Environment,” for more details.

11. Configure edge security (covered in Chapter 14, “Protecting SharePoint with Advanced Edge Security Solutions”).

12. Configure data and transport security options (covered in Chapter 17, “Safeguarding Confidential Data in SharePoint 2013”).

13. Configure SQL maintenance and optimization, using concepts defined in Chapter 9, “Managing and Maintaining SQL Server in a SharePoint Environment.”

14. Configure third-party product functionality as necessary.

15. Test, test, and retest before deploying into production.

16. Migrate content into SharePoint using third-party tools (if necessary).

Installing SharePoint 2013 Using PowerShell

PowerShell is a critical tool for SharePoint administrators that actually allows for options not available in the standard SharePoint Central Administration graphical user interface (GUI). For example, PowerShell is the only method that enables the creation of custom names for many of the databases created by SharePoint during the installation. In addition, creating a custom PowerShell script for installation of a new farm enables that farm to be repeatedly created, such as in the case of development farms.

Examining a PowerShell Script for Provisioning a Farm

When SharePoint binaries are installed in an environment, PowerShell can be used to provision any farm. Listing 4.1 illustrates a way to have PowerShell create a new farm based on input from the end user and have all databases from that farm use the name of the farm in the database name, to enable multiple farms to be created in a single environment.


Note

You can download this script and all scripts listed in this chapter at http://tinyurl.com/SP2013-Config.


LISTING 4.1 PowerShell Farm Provisioning Script


---------------------------------------
#
# SharePoint 2013 Unleashed - PowerShell farm config script
# http://www.amazon.com/Microsoft-SharePoint-2013-Unleashed-Michael/dp/0672337339
# Copyright: Toni Frankola, Michael Noel
# Version: 2.0, Jan 2013.
#
# Source: http://tinyurl.com/SP2013-Config
# Licensed under the MIT License:
# http://www.opensource.org/licenses/mit-license.php
#

$path = Get-Location
[xml]$settings = Get-Content ($path.Path + "settings.xml") -ErrorAction
SilentlyContinue

Function Get-SettingValue
{
       param([xml]$Xml,
                [string]$XPath,
                [string]$Prompt)

       if($Xml -ne $null -and $Xml.SelectSingleNode($XPath) -ne $null -and $Xml.
SelectSingleNode($XPath).InnerXml -ne "")
       {
              return $Xml.SelectSingleNode($XPath).InnerXml
       }
       else
       {
              $value = Read-Host $Prompt;
              return $value;
       }
}

$configType = Get-SettingValue -Xml $settings -XPath "/settings/NewFarm" -
Prompt "Do you wish to create a new farm? (Y/N)"
if ($ConfigType -eq "N") {
    $DatabaseServer = Get-SettingValue -Xml $settings -XPath
"/settings/DatabaseServer" -Prompt "Preparing to join existing farm. Please
specify the name of your SQL Server";
    $ConfigDB = Get-SettingValue -Xml $settings -XPath "/settings/ConfigDB"
-Prompt "Next, specify the name of your Farm Configuration Database";
    $Passphrase = Get-SettingValue -Xml $settings -XPath
"/settings/Passphrase" -Prompt "Finally, please enter your Farm passphrase"
} else {
    $DatabaseServer = Get-SettingValue -Xml $settings -XPath
"/settings/DatabaseServer" -Prompt "Preparing to create a new Farm. Please
specify the name of your SQL Server (ex SERVER or SERVERINSTANCE[,PORT])";
    $FarmName = Get-SettingValue -Xml $settings -XPath "/settings/FarmName"
-Prompt "Please specify a name for your Farm (ex. SP2013Dev)";
    $ConfigDB = $FarmName+"_ConfigDB";
    $AdminContentDB = $FarmName+"_CentralAdminContent";
    Write-Host "Please enter the credentials for your Farm Account (ex. COMPANYABC
SP_Farm)";
    $FarmAcct = Get-Credential -Message "Please enter the credentials for
your Farm Account (ex. COMPANYABCSP_Farm)";
    $Passphrase = Get-SettingValue -Xml $settings -XPath
"/settings/Passphrase" -Prompt "Enter a secure Farm passphrase (must meet
password complexity requirements)";
    $Port = Get-SettingValue -Xml $settings -XPath
"/settings/CentralAdminPort" -Prompt "Enter a port number for the Central
Administration Web App";
    $Authentication = Get-SettingValue -Xml $settings -XPath
"/settings/CentralAdminAuthentication" -Prompt "Finally, specify your
authentication provider (NTLM/Kerberos)";
}

$Passphrase = convertto-securestring $Passphrase -asplaintext -force

 if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq
$null) {
       Add-PSSnapin Microsoft.SharePoint.PowerShell;
}

$ErrorActionPreference = "Stop"

if ($ConfigType -eq "N") {
    Connect-SPConfigurationDatabase -DatabaseName $ConfigDB -DatabaseServer
$DatabaseServer -Passphrase $Passphrase
} else {
    Write-Host "Your SharePoint Farm is being configured..."

       New-SPConfigurationDatabase -DatabaseName $ConfigDB -DatabaseServer
$DatabaseServer -AdministrationContentDatabaseName $AdminContentDB
-Passphrase $Passphrase -FarmCredentials $FarmAcct
}

Initialize-SPResourceSecurity
Install-SPService
Install-SPFeature -AllExistingFeatures
New-SPCentralAdministration -Port $Port -WindowsAuthProvider $Authentication
Install-SPHelpCollection -All
Install-SPApplicationContent
Write-Host "Your SharePoint 2013 Farm has been created!"
if ($ConfigType -eq "Y") {
    $WebAppCreation = Get-SettingValue -Xml $settings -XPath
"/settings/WebApp" -Prompt "Would you like to provision a Web Application
using the default Team Site Template? (Y/N)";
    if ($WebAppCreation -eq "Y") {
        $HostHeaderQ = Get-SettingValue -Xml $settings -XPath
"/settings/WebAppHostHeaderQ" -Prompt "Would you like to specify a host
header? (Y/N)";
        if ($HostHeaderQ -eq "Y") {
            $HostHeader = Get-SettingValue -Xml $settings -XPath
"/settings/WebAppHostHeader" -Prompt "Please specify a host header for your
Web Application (ex. intranet.contoso.com)";
                     $URL = "http://"+$HostHeader;
              }
              else {
                     $URL = "http://"+$env:COMPUTERNAME;
              }

              Write-Host "Creating your Web Application...";
              $ap = New-SPAuthenticationProvider
              New-SPWebApplication -Name "SharePoint 2013 Team Site" -Port
80 -Url $URL -ApplicationPool "Content_AppPool" -ApplicationPoolAccount
(Get-SPManagedAccount $FarmAcct.UserName) -DatabaseServer $DatabaseServer -
DatabaseName ($FarmName + "_TeamSite_ContentDB_01") -AuthenticationProvider
$ap;
              New-SPSite $URL -OwnerAlias $FarmAcct.UserName -Language 1033
-Template "STS#0" -Name "Team Site";
              Write-Host "Configuration completed.";
    }
    else {
        Write-Host "Configuration completed.";
    }
}

$serviceAppsConfig = Get-SettingValue -Xml $settings -XPath
"/settings/Services/ServiceAppsConfig" -Prompt "Do you wish to configure
Service Applications? (Y/N)"

if($serviceAppsConfig -eq "Y") {
       PowerShell -File "Configure-ServiceApps.ps1" $FarmName
}
else {
       Write-Host "Press any key to continue..."
       $x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
}
---------------------------------------


Using concepts such as those demonstrated in this script, you can automate the creation of an entire custom farm and have more control over the entire farm creation process. This particular script utilizes a variables file (settings.xml) that allows for the input of variables. Customizing the commandlets illustrated in the script can enable further customization.

PowerShell for Provisioning Service Applications

Service application provisioning is a much more complex process than the installation of a single farm. Consequently, a PowerShell script to provision all service applications in a farm can be much longer and more complex. You can use the following script, available at the same http://tinyurl.com/SP2013-Config link, to provision nearly all available SharePoint 2013 service applications, and it walks the end user through the process and enables them to choose which service applications they want to install (as shown in Listing 4.2).

LISTING 4.2 SharePoint Installation PowerShell Script


---------------------------------------
#
# SharePoint 2013 Unleased - PowerShell farm config script
# Copyright: Toni Frankola, Michael Noel
# Version: 2.0, Jan 2013.
#
# Source: http://tinyurl.com/SP2013-Config
# Licensed under the MIT License:
# http://www.opensource.org/licenses/mit-license.php
#

cls
Remove-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null)
{
       Add-PSSnapin Microsoft.SharePoint.PowerShell;
}

$path = Get-Location
[xml]$settings = Get-Content ($path.Path + "settings.xml") -ErrorAction
SilentlyContinue

Function Get-SettingValue
{
       param([xml]$Xml,
                [string]$XPath,
                [string]$Prompt)

       if($Xml -ne $null -and $Xml.SelectSingleNode($XPath) -ne $null -and $Xml.
SelectSingleNode($XPath).InnerXml -ne "")
       {
              return $Xml.SelectSingleNode($XPath).InnerXml
       }
       else
       {
              $value = Read-Host $Prompt;
              return $value;
       }
}

function Start-SPService($ServiceInstanceTypeName) {
       $ServiceInstance = (Get-SPServiceInstance | Where {$_.TypeName -eq
$ServiceInstanceTypeName})

       if($ServiceInstance -ne $null -and $ServiceInstance.Status -ne "Online" -and $ServiceInstance.Status -ne "Provisioning") {
              $ServiceInstance | Start-SPServiceInstance
       }

       $i = 0;
       while(-not ($ServiceInstance.Status -eq "Online") -and $i -lt 10) {
              Write-Host -ForegroundColor Yellow "Waiting for the
$ServiceInstanceTypeName service to provision...";
              sleep 100;
              $ServiceInstance = (Get-SPServiceInstance | Where {$_.TypeName -eq $ServiceInstanceTypeName})

              $i += 1;

              if($i -eq 10) {
                     $continue = Read-Host "Service $ServiceInstanceTypeName has not
yet been provisioned. Would you like to wait? (Y/N)"

                     if($continue -eq "Y") {
                           $i = 0;
                     }
              }
       }
}

Function Configure-SPSearch  {
       PARAM($AppPool, $FarmName, $SearchServiceAccount)

       $searchServiceInstance = Get-SPEnterpriseSearchServiceInstance -local
       Start-SPEnterpriseSearchServiceInstance -Identity $searchServiceInstance

       $dbName = $FarmName + "_SearchServiceApplication"

       $searchApplication = New-SPEnterpriseSearchServiceApplication -Name
"$FarmName Search Service Application" -ApplicationPool $AppPool -DatabaseName
$dbName
       $searchApplicationProxy = New-SPEnterpriseSearchServiceApplicationProxy -name
"$FarmName Search Service
Application Proxy" -SearchApplication $searchApplication

       Set-SPEnterpriseSearchAdministrationComponent -SearchApplication
$searchApplication  -SearchServiceInstance $searchServiceInstance

       $crawlTopology = New-SPEnterpriseSearchCrawlTopology -
SearchApplication $searchApplication
       $crawlDatabase = Get-SPEnterpriseSearchCrawlDatabase -
SearchApplication $searchApplication

       New-SPEnterpriseSearchCrawlComponent -CrawlTopology $crawlTopology -
CrawlDatabase $crawlDatabase -SearchServiceInstance $searchServiceInstance

       while($crawlTopology.State -ne "Active")
       {
              $crawlTopology | Set-SPEnterpriseSearchCrawlTopology -Active
-ErrorAction SilentlyContinue
              if ($crawlTopology.State -ne "Active")
              {
                     Start-Sleep -Seconds 10
              }
       }

       $queryTopology = New-SPenterpriseSerchQueryTopology -
SearchApplication $searchApplication -partitions 1
       $searchIndexPartition = Get-SPEnterpriseSearchIndexPartition -
QueryTopology $queryTopology
       New-SPEnterpriseSearchQueryComponent -indexpartition
$searchIndexPartition -QueryTopology $queryTopology -SearchServiceInstance
$searchServiceInstance

       $propertyDB = Get-SPEnterpriseSearchPropertyDatabase -
SearchApplication $searchApplication

       Set-SPEnterpriseSearchIndexPartition $searchIndexPartition -
PropertyDatabase $propertyDB

       while ($queryTopology.State -ne "Active")
       {
              $queryTopology | Set-SPEnterpriseSearchQueryTopology -Active
-ErrorAction SilentlyContinue

              if ($queryTopology.State -ne "Active")
              {
                     Start-Sleep -Seconds 10
              }
       }
}

function Start-SPTimer {
       $spTimerService = Get-Service "SPTimerV4"

       if($spTimerService.Status -ne "Running") {
              Write-Host -ForegroundColor Yellow "SharePoint 2013 Timer Service is
not running. Atempting to start the timer."
              Start-Service "SPTimerV4"
              $spTimerService = Get-Service "SPTimerV4"

              while($spTimerService.Status -ne "Running") {
                     Start-Sleep -Seconds 10
                     Start-Service "SPTimerV4"
                     $spTimerService = Get-Service "SPTimerV4"
              }

              Write-Host -ForegroundColor Green "SharePoint 2013 Timer Service is
running."
       }
       else {
              Write-Host -ForegroundColor Green "SharePoint 2013 Timer Service is
running."
       }
}

Function Get-SPServiceApplicationPoolByName($SPApplicationPoolName, $ManagedAccount)
{

       $appPool = Get-SPServiceApplicationPool | Where {$_.Name -eq
$SPApplicationPoolName}

       if($appPool -eq $null) {
              $appPool = New-SPServiceApplicationPool -Name $SPApplicationPoolName
-Account $ManagedAccount
       }

       Return $appPool
}

Function Get-SPManagedAccountByName($AccountName) {
       $managedAccount = Get-SPManagedAccount | Where {$_.Username -eq
$AccountName}

       if($managedAccount -eq $null) {
              Write-Host "Please enter the credentials for your Managed
Account ($AccountName)";
       $managedAccountCredential = Get-Credential $AccountName -Message
"Please enter the credentials for your Managed Account ($AccountName)";
              $managedAccount = New-SPManagedAccount $managedAccountCredential
       }

       Return $managedAccount
}

Function Get-SPServiceApplicationByType($TypeName) {
       $serviceApplications = Get-SPServiceApplication | Where  {$_.TypeName -eq
$TypeName}

       if($serviceApplications -ne $null) {
              $true;
       }
       else {
              $false;
       }
}

Function New-SPUsageApplicationAndProxy($FarmName) {
       Write-Host -ForegroundColor Yellow "Configuring Usage and Health Data
Collection Service..."

       $dbName = $FarmName + "_UsageandHealthDataCollectionService"
       New-SPUsageApplication "$FarmName Usage and Health Data Collection
Service" -DatabaseName $dbName
       $usageApplicationProxy = Get-SPServiceApplicationProxy |
where{$_.Name -eq "$FarmName Usage and Health Data Collection Service"}

       if($usageApplicationProxy.Status -eq "Disabled") {
              $usageApplicationProxy.Status = "Online";
              $usageApplicationProxy.Update();
       }

       Write-Host -ForegroundColor Green "Installing Usage and Health Data
Collection Service installed."
}

Function New-SPStateServiceApplicationGroup($FarmName){
              $dbName = $FarmName + "_StateService"

              Write-Host -ForegroundColor Yellow "Installing State Service
Application..."

              New-SPStateServiceDatabase $dbName | New-
SPStateServiceApplication -Name "$FarmName State Service Application" | New-
SPStateServiceApplicationProxy -Name "$FarmName State Service Application
Proxy" -DefaultProxyGroup
              sleep 10;

              Write-Host -ForegroundColor Green "State Service Application
installed..."
}

#arguments from Config-Farm script
$FarmName=$args[0];

# Starting SP Timer Service
Start-SPTimer

if($appPoolName -eq $null -or $appPoolName -eq "") {
       $appPoolName = Get-SettingValue -Xml $settings -XPath
"/settings/Services/ServiceAppPool" -Prompt "Please specify a name for the
ServiceApp Application Pool (eg. ServiceAppPool)"
}

if($managedAccountName -eq $null -or $managedAccountName -eq "") {
       $managedAccountName = Get-SettingValue -Xml $settings -XPath
"/settings/Services/ManagedAccountName" -Prompt "Please enter service
account (eg. CompanyABCsp_serviceapps)"
}

if($FarmName -eq $null -or $FarmName -eq "") {
       $FarmName =  Get-SettingValue -Xml $settings -XPath "/settings/FarmName"
-Prompt "Please enter your farm name";
}

$managedAccount = Get-SPManagedAccountByName $managedAccountName
$appPool = Get-SPServiceApplicationPoolByName $appPoolName $managedAccount

$decision = Get-SettingValue -Xml $settings -XPath
"/settings/Services/StateServiceApplication" -Prompt "Would you like to
install State Service Application? (Y/N)"
if ($decision -eq "Y") {
       New-SPStateServiceApplicationGroup $FarmName
}

$decision = Get-SettingValue -Xml $settings -XPath
"/settings/Services/Access2010" -Prompt "Would you like to install Access
Services 2010? (Y/N)"
if ($decision -eq "Y") {
       Write-Progress -Activity "Access Service 2010 Service Installation"
-Status "Starting Access Database Service 2010 Service"
       Start-SPService("Access Database Service 2010")

       Write-Progress -Activity "Access Service 2010 Service Installation"
-Status "Creating Access Service 2010 Application"
       New-SPAccessServiceApplication -Name "$FarmName Access Services
2010" -ApplicationPool $appPool -Default

       Write-Progress -Activity "Access Service 2010 Service Installation"
-Status "Completed" -Completed $true
}

$decision = Get-SettingValue -Xml $settings -XPath "/settings/Services/BCS" -Prompt
"Would you like to install Business Data Connectivity Service? (Y/N)"
if ($decision -eq "Y") {
       Write-Progress -Activity "Business Data Connectivity Service Installation"
-Status "Starting Business Data Connectivity Service"
       Start-SPService("Business Data Connectivity Service")

       $dbName = $FarmName + "_BusinessDataConnectivityService"

       Write-Progress -Activity "Business Data Connectivity Service Installation"
-Status "Creating Business Data Connectivity Service Application"
       New-SPBusinessDataCatalogServiceApplication -Name "$FarmName Business Data
Connectivity Service" -ApplicationPool $appPool -databaseName $dbName

       Write-Progress -Activity "Business Data Connectivity Service Installation"
-Status "Completed" -Completed $true
}

$decision = Get-SettingValue -Xml $settings -XPath "/settings/Services/
UsageAndHealth" -Prompt "Would you like to configure Usage and Health Data
Collection Service? (Y/N)"
if ($decision -eq "Y") {
       Write-Progress -Activity "Usage and Health Data Collection Service
Configuration" -Status "Configuring Usage and Health Data Collection Service"
       New-SPUsageApplicationAndProxy $FarmName
       Write-Progress -Activity "Usage and Health Data Collection Service
Configuration" -Status "Completed" -Completed $true
}

$decision = Get-SettingValue -Xml $settings -XPath "/settings/Services/Excel"
-Prompt "Would you like to install Excel Services? (Y/N)"
if ($decision -eq "Y") {
       Write-Progress -Activity "Excel Services Installation" -Status "Starting
Excel Calculation Services"
       Start-SPService("Excel Calculation Services")

       Write-Progress -Activity "Excel Services Installation" -Status "Creating
Excel Service Application"
       New-SPExcelServiceApplication -Name "$FarmName Excel Services"
-ApplicationPool $appPool -Default
       Write-Host -ForegroundColor Green "Excel Services installed."

       Write-Progress -Activity "Excel Services Installation" -Status "Completed"
-Completed $true
}

$decision = Get-SettingValue -Xml $settings -XPath "/settings/Services/
ManagedMetadata" -Prompt "Would you like to install Managed Metadata Service? (Y/N)"
if ($decision -eq "Y") {
       Write-Progress -Activity "Managed Metadata Service Application
Installation" -Status "Starting Managed Metadata Web Service"
       Start-SPService("Managed Metadata Web Service")

       $dbName = $FarmName + "_ManagedMetadataService"

       Write-Progress -Activity "Managed Metadata Service Application Installation"
-Status "Creating Managed Metadata Service Application"
       $MetaDataServiceApp = New-SPMetadataServiceApplication -Name "$FarmName
Managed Metadata Service" -ApplicationPool $appPool -DatabaseName $dbName
       $MetaDataServiceAppProxy = New-SPMetadataServiceApplicationProxy -Name
"$FarmName Managed Metadata Service Proxy" -ServiceApplication $MetaDataServiceApp
-DefaultProxyGroup

       Write-Progress -Activity "Managed Metadata Service Application
Installation" -Status "Completed" -Completed $true
}

$decision = Get-SettingValue -Xml $settings -XPath
"/settings/Services/SecureStore" -Prompt "Would you like to install Secure
Store Service? (Y/N)"
if ($decision -eq "Y") {
       Write-Progress -Activity "Secure Store Service Application Installation"
-Status "Starting Secure Store Service"
       Start-SPService("Secure Store Service")

       $dbName = $FarmName + "_SecureStore"

       Write-Progress -Activity "Secure Store Service Application
Installation" -Status "Creating Secure Store Service Application"
       $secureStoreServiceApp = New-SPSecureStoreServiceApplication -Name
"$FarmName Secure Store Service Application" -ApplicationPool $appPool
-DatabaseName $dbName -AuditingEnabled:$true
       New-SPSecureStoreServiceApplicationProxy -ServiceApplication
$secureStoreServiceApp -Name "$FarmName Secure Store Service Application
Proxy" -DefaultProxyGroup

       Write-Progress -Activity "Secure Store Service Application Installation"
-Status "Completed" -Completed $true
}

$decision = Get-SettingValue -Xml $settings -XPath "/settings/Services/Visio"
-Prompt "Would you like to install Visio Graphics Service? (Y/N)"
if ($decision -eq "Y") {
       Write-Progress -Activity "Visio Graphics Service Application Installation"
-Status "Starting Visio Graphics Service"
       Start-SPService("Visio Graphics Service")

       Write-Progress -Activity "Visio Graphics Service Application Installation"
-Status "Creating Visio Graphics Service Application"
       New-SPVisioServiceApplication -Name "$FarmName Visio Graphics Service"
-ApplicationPool $appPool

       Write-Progress -Activity "Visio Graphics Service Application Installation"
-Status "Creating Visio Graphics Service Application Proxy"
       New-SPVisioServiceApplicationProxy -Name "$FarmName Visio Graphics Service
Proxy" -ServiceApplication "$FarmName Visio Graphics Service"

       Write-Progress -Activity "Visio Graphics Service Application Installation"
-Status "Completed" -Completed $true
}

$decision = Get-SettingValue -Xml $settings -XPath
"/settings/Services/Word" -Prompt "Would you like to install Word Automation
Services? (Y/N)"
if ($decision -eq "Y") {
       Write-Progress -Activity "Word Automation Services Application
Installation" -Status "Starting Word Automation Services"
       Start-SPService("Word Automation Services")

       $dbName = $FarmName + "_WordAutomationService"

       Write-Progress -Activity "Word Automation Services Application
Installation" -Status "Creating Word Automation Service Application"
       New-SPWordConversionServiceApplication -Name "$FarmName Word
Automation Service" -ApplicationPool $appPool -DatabaseName $dbName -Default

       Write-Progress -Activity "Word Automation Services Application
Installation" -Status "Completed" -Completed $true
}

$decision = Get-SettingValue -Xml $settings -XPath
"/settings/Services/MachineTranslation" -Prompt "Would you like to install
Machine Translation Service Application? (Y/N)"
if ($decision -eq "Y") {
       $dbName = $FarmName + "_MachineTranslationService"

       Write-Progress -Activity "Machine Translation Service Application
Installation" -Status "Starting Machine Translation Service"
       Start-SPService("Machine Translation Service")
       Write-Progress -Activity "Machine Translation Service Application
Installation" -Status "Creating Machine Translation Service Application"
       New-SPTranslationServiceApplication -Name "$FarmName Machine Translation
Service" -ApplicationPool $appPool -DatabaseName $dbName
       Write-Progress -Activity "Machine Translation Service Application
Installation" -Status "Completed" -Completed $true
}

$decision = Get-SettingValue -Xml $settings -XPath "/settings/Services/
PerformancePoint" -Prompt "Would you like to install PerformancePoint Service
Application? (Y/N)"
if ($decision -eq "Y") {
       $dbName = $FarmName + "_PerformancePoint"

       Write-Progress -Activity "PerformancePoint Service Application Installation"
-Status "Starting PerformancePoint Service"
       Start-SPService("PerformancePoint Service")
       Write-Progress -Activity "PerformancePoint Service Application Installation"
-Status "Creating PerformancePoint Service Application"
       New-SPPerformancePointServiceApplication -Name "$FarmName PerformancePoint
Service" -ApplicationPool $appPool -DatabaseName $dbName
       Write-Progress -Activity "PerformancePoint Service Application Installation"
-Status "Completed" -Completed $true
}

$decision = Get-SettingValue -Xml $settings -XPath "/settings/Services/Search"
-Prompt "Would you like to install Search Service? (Y/N)"
if ($decision -eq "Y") {
       Write-Progress -Activity "Search Service Application Installation" -Status
"Starting Search Service Application"

       $hostname = (Get-ChildItem env:computername).Value
       Start-SPEnterpriseSearchServiceInstance $hostname
       Start-SPEnterpriseSearchQueryAndSiteSettingsServiceInstance $hostname

       $dbName = $FarmName + "_SearchService"

       Write-Progress -Activity "Search Service Application Installation" -Status
"Creating Search Service Application"
       $SearchServiceApp = New-SPEnterpriseSearchServiceApplication -Name "$FarmName
Search Service Application" -ApplicationPool $appPool -DatabaseName $dbName
       $SearchServiceAppProxy = New-SPEnterpriseSearchServiceApplicationProxy
-Name "$FarmName Search Service Proxy" -ServiceApplication $SearchServiceApp
-DefaultProxyGroup

       Write-Progress -Activity "Search Service Application Installation" -Status
"Configuring Topology"
       $clone = $searchServiceApp.ActiveTopology.Clone()
       $searchServiceInstance = Get-SPEnterpriseSearchServiceInstance
       New-SPEnterpriseSearchAdminComponent –SearchTopology $clone
-SearchServiceInstance $searchServiceInstance
       New-SPEnterpriseSearchContentProcessingComponent –SearchTopology $clone
-SearchServiceInstance $searchServiceInstance
       New-SPEnterpriseSearchAnalyticsProcessingComponent –SearchTopology $clone
-SearchServiceInstance $searchServiceInstance
       New-SPEnterpriseSearchCrawlComponent –SearchTopology $clone
-SearchServiceInstance $searchServiceInstance
       New-SPEnterpriseSearchIndexComponent –SearchTopology $clone
-SearchServiceInstance $searchServiceInstance
       New-SPEnterpriseSearchQueryProcessingComponent –SearchTopology $clone
-SearchServiceInstance $searchServiceInstance
       $clone.Activate()

       Write-Progress -Activity "Search Service Application Installation" -Status
"Completed" -Completed $true
}

$decision = Get-SettingValue -Xml $settings -XPath "/settings/Services/
WorkManagement" -Prompt "Would you like to install Work Management Service
Application? (Y/N)"
if ($decision -eq "Y") {
       $dbName = $FarmName + "_WorkManagement"

       Write-Progress -Activity "Work Management Service Application Installation"
-Status "Starting Work Management Service"
       Start-SPService("Work Management Service")
       Write-Progress -Activity "Work Management Service Application Installation"
-Status "Creating Work Management Service Application"
       New-SPWorkManagementServiceApplication –Name "$FarmName Work Management
Service" –ApplicationPool $appPool
       Write-Progress -Activity "Work Management Service Application Installation"
-Status "Completed" -Completed $true
}

$decision = Get-SettingValue -Xml $settings -XPath "/settings/Services/UPA"
-Prompt "Would you like to install User Profile Service Application? (Y/N)"
if ($decision -eq "Y") {
       Write-Host -ForegroundColor Yellow "WARNING: This part of the script
needs to run under Farm account with elevated privileges. Farm admin must be
local admin while UPA is provisioning."
       $decision = Read-Host "Please confirm: SharePoint Farm admin account
is local admin and I want to proceed with UPA provisioning (Y/N)?"
       if ($decision -eq "Y") {

              Restart-Service SPTimerV4

              Write-Progress -Activity "User Profile Service Application
Installation" -Status "Starting User Profile Service"
              Start-SPService "User Profile Service"

              $username = ((Get-SPFarm).DefaultServiceAccount).Name;
              $farmAccount = Get-Credential $username;

              Start-Process $PSHOMEpowershell.exe -Credential $farmAccount
-ArgumentList "-Command Start-Process $PSHOMEpowershell.exe -ArgumentList
'$pathProvision-UPA.ps1',$farmName,$appPoolName -Verb Runas" -Wait

              $upa  = Get-SPServiceApplication | Where TypeName -eq "User Profile
Service Application"
              $ups = Get-SPServiceInstance | Where TypeName -eq "User Profile
Synchronization Service"
              $hostname = (Get-ChildItem env:computername).Value
              $upa.SetSynchronizationMachine($hostname, $ups.ID, $username,
$farmAccount.GetNetworkCredential().password)

              Write-Progress -Activity "User Profile Service Application
Installation" -Status "Starting User Profile Synchronization Service"
              Start-SPService "User Profile Synchronization Service"

              Write-Host "Please remove your farm account from local admins."
       }
}

iisreset

Write-Host -ForegroundColor Green "Installation completed."
---------------------------------------


Scripts such as these can be modified by administrators and customized as needed. The power of PowerShell is in this flexibility, because custom scripts can be used by administrators to build entire farms from scratch or simply perform everyday tasks.

For more information on using PowerShell with SharePoint 2013, see Chapter 7, “Leveraging PowerShell for Command-Line SharePoint Administration and Automation.”

Understanding Scalability for SharePoint

The first step in scaling a SharePoint environment is to understand the level of usage it will receive, both presently and in the future. After the level of usage is determined, understanding which specific components can be extended is vital to structuring the system to match the desired user load. The key is to match SharePoint functionality to the specific identified need.

Mapping SharePoint Functionality to Business Needs

When deploying SharePoint, the primary concern for scalability is how many users will use the system. For departmental collaboration, the numbers may be small. For large, publicly accessible portals, however, the numbers could scale up quickly. Scaling a SharePoint implementation based on the number of users is simple, but can be used as a starting point. In addition to total number of users, the following factors should be identified to more fully understand the load placed on a SharePoint server:

Image Number of users

Image Pages per user per work day

Image Length of work day (hours)

Image Type of work performed and level of office integration

Image Size of document repositories

Collecting this information and understanding who will be accessing a SharePoint environment is the first step toward properly scaling the environment.

Gauging Content Growth

In addition to the amount of data that initially is loaded into SharePoint, an understanding of how fast that content will grow is critical toward properly scaling an environment. Running out of storage space a year into a SharePoint deployment is not an ideal situation. You need to understand how quickly content can grow and how to control this inevitable growth.

Proper use of site quotas in SharePoint is an effective way to maintain control over the size that a SharePoint database can grow to. Implementing site quotas as they are created is a recommended best-practice approach and should be considered in most situations. It is easy to bloat SharePoint with unnecessary data, and site quotas help local site administrators make judicious use of their available space.

SharePoint’s SQL database can grow in size dramatically, depending on how heavily it is used and what type of content is included in it. Use of the Remote Binary Large OBject (BLOB) Storage application programming interface (API), covered extensively in Chapter 9, can help to keep the size of content databases under control by taking documents out of the database and storing them in other file formats.

Scaling Logical SharePoint Components

The key to SharePoint’s success is its capability to intelligently present information needed for each individual user, giving them quick and easy access to that information. SharePoint accomplishes this through various logical mechanisms that exist to help organize this content, structuring it in a way that pulls unstructured data together and presents it to the user. For example, a file server simply holds together a jumbling of documents in a simple file structure. Multiple versions of those documents further confuse the issue. SharePoint contains mechanisms to organize those documents into logical document libraries, categorized by metadata, which can be searched for and presented by the latest version.

In addition to the most obvious logical components, SharePoint enables sets of data to be scaled out to support groups of users. For example, by using different site collections with their own unique sets of permissions, you can configure SharePoint to host different groups of users on the same set of machines, increasing flexibility.

Scaling Out with Site Collections

Building on the success of previous versions of SharePoint, SharePoint sites in SharePoint Foundation enable various teams or groups of users to have access to particular information relevant to them. For example, sites can be set up for each department of a company to enable them to have access to information pertinent to their groups.

Sites can be scaled out to support various site collections for each group of users. This enables the data to be distributed across a SharePoint environment logically, allowing a much larger population of users to be distributed across a SharePoint server environment. Each site collection can be administered by a unique owner designated within the site structure, similar to the one shown in Figure 4.1. This allows for security to be scaled out across a SharePoint site.

Image

FIGURE 4.1 Examining the security options of a SharePoint site.

Scaling Out with Web Applications

SharePoint stores its data in SQL content databases but serves up access to that data via HTML and web services. The access to this data is served up to the user via the Windows Server Internet Information Services (IIS) service. IIS is composed of various logical structures known as websites, which are entry points to web content. Each website can be configured to point to various sets of information located on the web server or extended via SharePoint to be unique SharePoint web applications.

Utilizing unique web applications with SharePoint can help to further scale the functionality of an environment, allowing the flexibility to grant access to SharePoint using SSL encryption, or across different ports. In addition, deploying multiple virtual servers enables the use of multiple host headers for a SharePoint organization, such as sharepoint.companyabc.com, docs.companyabc.com, info.companyabc.com, sp.organizationa.com, and so on.

Summary

Although SharePoint 2013 is deceptively easy to install, it is also a sophisticated product that can be complex to install and configure. Using techniques such as scripted installations using PowerShell, installation checklists, and scalability options can help to ensure the longevity of SharePoint architecture and can make it easier to grow a SharePoint 2013 environment.

Best Practices

The following are best practices from this chapter:

Image Create installation checklists to manage the installation process for a complex SharePoint 2013 environment.

Image Use best practices for web applications, including configuring web applications for Kerberos security, SSL encryption, and load balancing using Windows Network Load Balancing (NLB) or hardware-based load balancers.

Image Manage content growth through site quotas and monitoring solutions, such as System Center or third-party products.

Image Use site collections to scale SharePoint to varying groups with different security needs.

Image Use IIS websites mapped to SharePoint web applications to manage varying types of web-based access to SharePoint sites, such as SSL-encryption or different host headers.

Image Use a different SharePoint farm for the ultimate layer of security for a SharePoint environment, beyond what is provided by different site collections or web applications.

Image Map SharePoint’s functionality with the specific user needs of the organization.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset