Contoso - Configuring Cross Farm
Contoso - Configuring Cross Farm
Contoso - Configuring Cross Farm
Overview
SharePoint 2013 has a number of services that support cross-farm or federated architectures. In this session,
we will introduce you to these services, discuss when to implement them, and share with you best practices on
configuring them in your environment. We will examine the following:
Concepts of federation
Contents
Overview ..................................................................................................................................................... 1
Exploring the service application architecture ............................................................................................ 3
Key concepts ........................................................................................................................................... 3
Exploring service federation ....................................................................................................................... 4
Federated service applications across farms connected by WAN links ................................................... 7
Build an Enterprise and Consumer Farm ................................................................................................ 8
Build an Enterprise Services Farm ...................................................................................................................................................... 9
Build a Consumer Farm ...................................................................................................................................................................... 10
Provision an Enterprise Services Environment ............................................................................................................................ 11
Provision a Consuming Environment ............................................................................................................................................. 13
Configuring the Certificates .............................................................................................................................................................. 14
Microsoft introduced the existing service application architecture with the SharePoint 2010 product. It solved
many of the key issues that were present with the SharePoint Service Providers (SSPs) from the Microsoft Office
SharePoint Server 2007 product. Those of you who are familiar with how it worked in 2010 will find that the
architecture has remained intact. With the release of SharePoint 2013, some of the services have changed, but
the overall plumbing works just as it did both the good and the bad. While this presentation is focused on
federated (cross farm) services in SharePoint 2013, it is important to understand how the SharePoint service
application model works and you will need to understand the core components of the services. While many of
the services remain unchanged, some have been rebuilt from the ground up and others are completely new. As
you review the service applications that are available in SharePoint 2013, you will gain an understanding of what
these services do and some design considerations for each. With the architectures of SharePoint broadening
out into multiple farms, some organizations will find it useful to have services farms that support a number of
SharePoint implementations.
Key concepts
The term service application has been overused. This makes it difficult for people to understand where the
components live and how they function. To really get a handle on whats happening behind the scenes, its
important to know these terms:
Service Machine Instance The actual instance of the service running on the server. The service
instance also has a Log On As account associated with the instance.
Service Application The logical component that contains the service configuration and management
such as the service application configuration information and the database connection string.
Service Application Proxy The interface used by the service consumers for communicating with the
service and the load balancer. The proxy is required so the consumer knows which server to contact and
how to consume the actual service. Its important to note that the service application proxy is not a web
service or Windows Communication Foundation (WCF) proxy.
Service Consumer Any application or service that consumes the service. If you are using the service
application, you are a service consumer.
You can deploy services in a number of ways, including the Configuration Wizard, Central Administration, or
Windows PowerShell. The Configuration Wizard will configure many of the services with their default values.
You shouldnt use this for production environments, as there are many services that should be manually
configured to ensure success.
In Central Administration, you can configure several services by populating fields associated with them.
While you have a little more control than with the Farm Configuration Wizard, most SharePoint professionals
will opt to use Windows PowerShell.
Windows PowerShell gives you the most control over the deployment of your service applications into your
environment. The provisioning of some of the service applications can be very tricky, but you can still provision
them all through Windows PowerShell.
When you configure your SharePoint farms, you get two services created automatically. These are key
components for how the services work. These services include:
Service applications must expose a web endpoint because all of their communications take place over
HTTPS. Its also important to know that service applications communicate over TCP ports 32843 (HTTP) and
32844 (HTTPS).
Service applications are consumed by web applications, and each web application can have a specific set of
proxy groups assigned to it. In the Figure below, you can see that the default proxy group and the secondary
proxy group are getting consumed by different web applications and are sharing four service applications.
FIGURE 1
Having the ability to pick and choose which proxy groups are assigned to which web application allows you
to easily create a services architecture as complicated as required.
service farm to handle search for all of your farms. The primary reason for creating a services farm is to
consolidate services into one farm and share the resources across your organization. Another reason to
implement a services farm would be for the delegation of service management to different departments or
groups or even an entirely different organization. If you are going to set up a services farm that is going to be
accessing other Active Directory domains, a two way trust is required for UPAMMS does not require a trust
and the rest of the services will work with a one-way trust. Federating your services will also give you the ability
to scale out your services as your farm(s) grow. If you are thinking that you should create a services farm,
remember that you need to let the business requirements dictate your decision, not the technology. Just
because you can federate your services, does not mean that you need to create a services farm.
In SharePoint 2013, there are six services that will federate:
Machine Translation
Managed Metadata
Search
Secure Store
User Profile
There were six services that federated in SharePoint 2010 as well, however, the SharePoint 2010 Web
Analytics service was consumed by the new Search service. The Machine Translation service is new to service
federation with SharePoint 2013.
One advantage of using SharePoint 2013 for your cross-farm services is the ability of the service applications
to be consumed by SharePoint 2010. The SharePoint 2013 services that can be consumed by SharePoint 2010
are:
Managed Metadata
Search
Secure Store
User Profile
The way to create the consumption of a federated service application is the same in SharePoint 2013 as it
was in SharePoint 2010. The ability to have a SharePoint 2013 services farm consumed by another farm is
started by creating a trust between the two farms. While a lot of work has been done to create S2S trusts within
the new SharePoint app model, creating your trust between farms is still certificate based. There are three
certificates that must be used to create the trust. The SharePoint Root certificate, which signs the STS
certificates; the STS certificate, which signs the claims tokens; and a Secure Sockets Layer (SSL) certificate to
keep the service requests encrypted over HTTPS. The way to establish the trust between the two farms is to
exchange the Root certificate between servers, and to have the publisher trust the consumers STS certificate, as
illustrated in Figure 2.
Once you have set up your services farm, you can assign your default and custom application proxy groups,
as shown in Figure 3.
FIGURE 3
$objUser.setinfo()
$domainName = $env:USERDOMAIN
$LDAP = "LDAP://CN=Managed Service Accounts,DC=$domainName, DC=local"
$objCN = [ADSI]$LDAP
$objUser = $objCN.Create("user","CN=SharePoint User Profile Services
Sync")
$objUser.Put("sAMAccountName","spUPS")
$objUser.Setinfo()
$objUser.psbase.invokeset("AccountDisabled", "False")
$objUser.SetPassword("Passw0rd1")
$objUser.setinfo()
$domainName = $env:USERDOMAIN
$LDAP = "LDAP://CN=Managed Service Accounts,DC=$domainName, DC=local"
$objCN = [ADSI]$LDAP
$objUser = $objCN.Create("user","CN=SharePoint C2WTS")
$objUser.Put("sAMAccountName","spC2WTS")
$objUser.Setinfo()
$objUser.psbase.invokeset("AccountDisabled", "False")
$objUser.SetPassword("Passw0rd1")
$objUser.setinfo()
$domainName = $env:USERDOMAIN
$LDAP = "LDAP://CN=Managed Service Accounts,DC=$domainName, DC=local"
$objCN = [ADSI]$LDAP
$objUser = $objCN.Create("user","CN=SharePoint Farm")
$objUser.Put("sAMAccountName","spFarm")
$objUser.Setinfo()
$objUser.psbase.invokeset("AccountDisabled", "False")
$objUser.SetPassword("Passw0rd1")
$objUser.setinfo()
$farmAccountName = "Demo\spfarm"
$farmAccount = Get-Credential $farmAccountName
$passphrase = (ConvertTo-SecureString $passphrase -AsPlainText -force)
#will error, but fix the regkey...
psconfig.exe -cmd upgrade
Write-Host "Creating Configuration Database and Central Admin Content
Database..."
New-SPConfigurationDatabase -DatabaseServer $databaseServer DatabaseName $configDatabase `
-AdministrationContentDatabaseName $adminContentDB `
-Passphrase $passphrase -FarmCredentials $farmAccount
$spfarm = Get-SPFarm -ErrorAction SilentlyContinue -ErrorVariable err
if ($spfarm -eq $null -or $err) {
throw "Unable to verify farm creation."
}
Write-Host "ACLing SharePoint Resources..."
Initialize-SPResourceSecurity
Write-Host "Installing Services ..."
Install-SPService
Write-Host "Installing Features..."
Install-SPFeature -AllExistingFeatures
Write-Host "Creating Central Administration..."
New-SPCentralAdministration -Port 2013 -WindowsAuthProvider NTLM
Write-Host "Installing Help..."
Install-SPHelpCollection -All
Write-Host "Installing Application Content..."
Install-SPApplicationContent
Write-Host "Enterprise Farm Creation Complete!"
# BDC specifics
$bdcInstanceName = "Business Data Connectivity Service"
$bdcName = "Enterprise Farm Business Data Connectivity Service"
$bdcDBName = "Enterprise_Farm_BDC"
# Sets up Business Data Connectivity Service Application and Proxy and
Service Instance
Write-Host "Creating $bdcInstanceName Application and Proxy..."
$bdc = New-SPBusinessDataCatalogServiceApplication -Name $bdcName ApplicationPool $saAppPoolName -DatabaseName $bdcDBName
Write-Host "Starting the $bdcInstanceName Instance..."
Get-SPServiceInstance | where-object {$_.TypeName -eq $bdcInstanceName}
| Start-SPServiceInstance
Write-Host "Enterprise BDC Complete!"
# SSS Specifics
$sssInstanceName = "Secure Store Service"
$serverName = "SPC-Services"
$sssName = "Enterprise Farm Secure Store Service"
$sssDBName = "Enterprise_Farm_SecureStore"
# Sets up Secure Store Service Application & Proxy and Service Instance
Write-Host "Creating $sssName Application & Proxy..."
$sss = New-SPSecureStoreServiceApplication -Name $sssName ApplicationPool $saAppPoolName -DatabaseName $sssDBName auditingEnabled:$true -auditlogmaxsize 30 -Sharing:$false
$proxy = New-SPSecureStoreServiceApplicationProxy -Name "$sssName Proxy"
-ServiceApplication $sss -DefaultProxyGroup
Write-Host "Starting the $sssInstanceName Instance..."
$sssInstance = Get-SPServiceInstance | where-object{$_.TypeName -eq
"Secure Store Service" -and $_.Server.Address -eq $serverName} | StartSPServiceInstance
Write-Host "Enterprise SSS Complete!"
-MaxSiteCount 50 -WarningSiteCount
SPServiceApplicationSecurity
$claimProvider = (Get-SPClaimProvider System).ClaimProvider
$principal = New-SPClaimsPrincipal -ClaimType
"http://schemas.microsoft.com/sharepoint/2009/08/claims/farmid" ClaimProvider $claimProvider -ClaimValue $farmID
Grant-SPObjectSecurity -Identity $security -Principal $principal -Rights
"Full Control"
Get-SPTopologyServiceApplication | Set-SPServiceApplicationSecurity ObjectSecurity $security
Take note of the Publisher URL. There are a number of way we can use it;
each will be discussed when we configure the service from the Consumer Farm in
the next section.
urn:schemas-microsoftcom:sharepoint:service:1794d63150094e058fd73fb2a5c132b5#authority=urn:uuid:d5882dda1c0a
4f1291671dc4e847b1c7&authority=https://demosp1:32844/Topology/topology.svc
urn:schemas-microsoftcom:sharepoint:service:3884c36dcbaa4d76a864cc829594ec48
#authority=urn:uuid:b71719e7a4b448708535bfc8776e00c8&au
thority=https://DEMOSP1:32844/Topology/topology.svc
We will then hit OK and we will be presented with a specific service. This
is due to the service being specifically identified.
This is your certificates are set up correctly. We will visit this again in our
Troubleshooting section.
The final result is that we only see Services Applications of the originally
specified type, as indicated below.
Figure 13 - Troubleshooting
Notice that the error we see is The website declined to show this
webpage. We can correct this issue by visiting our Enterprise Farm and allowing
the Consumer Farm to use a particular service.
Figure 14 - Permissions
To configure the Consumer Farm permissions, highlight the service
application that you wish to configure and click Permissions. We will then get the
Farm ID of our Consumer Farm. If you recall from our PowerShell examples
discussed earlier, we created a text file that had the Consumer Farm ID and we
transferred it to the Publishing Farm. We can locate this file at c:\certs. Paste the
Farm ID into the Text Box and click Add. Then check the appropriate
permissions.