62
Bringing it all together with host named site collections #SPSOSLO Thomas Vochten May 31 th , 2014

Bringing it all together with Host Named Site Collections

Embed Size (px)

DESCRIPTION

SharePoint Saturday Oslo 2014

Citation preview

Page 1: Bringing it all together with Host Named Site Collections

Bringing it all togetherwith host named site collections

#SPSOSLOThomas VochtenMay 31th, 2014

Page 2: Bringing it all together with Host Named Site Collections

Platinum

SharePint

Raffle

Platinum

Gold

Thanks to our Sponsors!

Page 3: Bringing it all together with Host Named Site Collections

About Me

Thomas Vochten SharePoint MVP. Platform architect. Speaker. Trainer. Involuntary DBA. Consultant at Xylos. V-TSP at Microsoft.

@thomasvochtenhttp://[email protected]

Page 4: Bringing it all together with Host Named Site Collections

Agenda 1. What’s the Problem?

2. SharePoint & IIS

3. Consolidation

4. Host Named Site Collections

5. Advanced Topics

Page 5: Bringing it all together with Host Named Site Collections

Platform HygieneWhat’s the Problem?

Page 6: Bringing it all together with Host Named Site Collections

In the Wild Undocumented installations Scripts, tools and installation media lying around

How old is this farm exactly? No monitoring whatsoever Dubious configurations Admins just hacking around Miserable performance

Page 7: Bringing it all together with Host Named Site Collections

But,… we’re doing DevOps!

Page 8: Bringing it all together with Host Named Site Collections

Are you serious?

Page 9: Bringing it all together with Host Named Site Collections

The G-Word

Page 10: Bringing it all together with Host Named Site Collections
Page 11: Bringing it all together with Host Named Site Collections

What we need Simplicity Predictability Scalability Portability Compatibility Supportability

Page 12: Bringing it all together with Host Named Site Collections

Product Line Architecture Prescriptive guidance Relatively easy to implement Based on rulesets Tools, scripts & modules Office365 Alignment

Through Microsoft Services only :-/

Page 13: Bringing it all together with Host Named Site Collections

Basic Building Blocks

SharePoint

Farm

Web Application

Site Collections

Service Application

sServers

IIS

Web Sites

Bindings

Application Pools

Identity

Page 14: Bringing it all together with Host Named Site Collections

Living Apart TogetherSharePoint & IIS

Page 15: Bringing it all together with Host Named Site Collections

SharePoint doesn’t care about IIS Initial web application configuration is set in stone

Extending & unextending may be your friendCertificat

esHost

Headers

Advanced Bindings

IP Addresse

s

Page 16: Bringing it all together with Host Named Site Collections

Host Headers to the rescue?

Most wanted scenario not supported by SharePoint:

Multiple web applications using the same bindingsrequire the use of host headers

Page 17: Bringing it all together with Host Named Site Collections

The problem with Host Headers They don’t scale They limit the URLs we can use Cannot be configured from within SharePoint

Problems when publishing

Page 18: Bringing it all together with Host Named Site Collections

Web Applications vs Web Sites

Web Application

• SharePoint• Logical

Concept

Web Sites

• IIS• Physical Concept

One-to-Many

Zones

Page 19: Bringing it all together with Host Named Site Collections

Support Limits How many web applications in a farm?

20

How many web sites per web application?

5

Page 20: Bringing it all together with Host Named Site Collections

Web Sites

Out of the Box:

SharePoint Central Administration v4 SharePoint Web Services

Page 21: Bringing it all together with Host Named Site Collections

Application Pools

Application Pool

• Worker Process (w3wp.exe)

• CPU/Memory• Identity

Web Sites

One-to-Many

Page 22: Bringing it all together with Host Named Site Collections

Support Limits How many application pools in a farm?

10

Page 23: Bringing it all together with Host Named Site Collections

Application Pools

Out of the Box:

SharePoint Central Administration v4 SharePoint Web Services Root SecurityTokenServiceApplicationPool [Insert random GUID here]

Application Discovery and Load Balancer Service Application

Page 24: Bringing it all together with Host Named Site Collections

Application Pools

Custom Created:

Services Application Pool(s) Content Application Pool(s)

How many of these do you create?

Page 25: Bringing it all together with Host Named Site Collections

Accounts Farm Services Content

• Setup• Search• Search crawl• Profile import

Page 26: Bringing it all together with Host Named Site Collections

Good Practice: Cleaning Up Remove unused web sites Remove unused application pools

Page 27: Bringing it all together with Host Named Site Collections

DemoExploring SharePoint & IIS

Page 28: Bringing it all together with Host Named Site Collections

Less is moreConsolidation

Page 29: Bringing it all together with Host Named Site Collections

Design Principles Single farm Single content application pool Single content web application Single apps web application

Page 30: Bringing it all together with Host Named Site Collections

Application Pool Content Application Pool

Central Administration Content Apps

Application Pool Application Pool

App Disc & LB Svc

Services Application Pool

Service ApplicationsSecurity Token Svc

Page 31: Bringing it all together with Host Named Site Collections

Content Web Application Only one Host Named Site Collections Scale by adding more web servers

Page 32: Bringing it all together with Host Named Site Collections

• Often needed for routing app requests

• Separate domain

• Wildcard DNS record

• Wildcard SSL certificate

Apps Web Application

Page 33: Bringing it all together with Host Named Site Collections

$webService =

[Microsoft.SharePoint.Administration.SPWebService]::ContentServi

ce

$pool = $webService.ApplicationPools["blah"]

$app = Get-SPWebApplication http://bleh

$app.ApplicationPool = $pool

$app.Update()

$app.ProvisionGlobally()

Consolidating Application Pools

Page 34: Bringing it all together with Host Named Site Collections

Consolidating Web Applications Possible, but consider very carefully Migrate to Host Named Site Collections

Page 35: Bringing it all together with Host Named Site Collections

Living without host headersHost Named Site Collections

Page 36: Bringing it all together with Host Named Site Collections

“Host-named site collections are the preferred method to deploy sites in

SharePoint 2013”

From: TechNet

Page 37: Bringing it all together with Host Named Site Collections

Confusion

Host Header + Host Named = Incompatible!

yet…New-SPSite … -HostHeaderWebApplication …New-SPManagedPath … -HostHeader …

Page 38: Bringing it all together with Host Named Site Collections

Path Based Site Collections Traditional way of addressing in SharePoint DNS name determined by the Web Application

https://intranet.contoso.com

Every site collection has a unique path

https://intranet.contoso.comhttps://intranet.contoso.com/sites/teamAhttps://intranet.contoso.com/dep/departmentA

Page 39: Bringing it all together with Host Named Site Collections

Path Based Site Collections Default option in SharePoint Single root site collection Managed Paths to scale Multiple URLs via zones

Page 40: Bringing it all together with Host Named Site Collections

Host Named Site Collections The better way Unique DNS name per site collection

https://intranet.contoso.com https://mysites.contoso.com https://community.contoso.com

You can still have managed paths

https://intranet.contoso.com/sites/benefits https://teams.contoso.com/sites/it

Page 41: Bringing it all together with Host Named Site Collections

Marchitecture

Page 42: Bringing it all together with Host Named Site Collections

Why Host Named Site Collections? Office365 uses them Best tested Some features expect them Scalability

Request Management, Multi-Tenancy, SharePoint Apps, more to come…

Page 43: Bringing it all together with Host Named Site Collections

Create Host Named Site Collections

New-SPSite -Url https://intranet.contoso.com -owneralias domain\username -HostHeaderWebApplication https://content.contoso.com -Template STS#0

Page 44: Bringing it all together with Host Named Site Collections

Living without host headers

• Host headers don’t work with HNSC• Host headers just don’t scale• Requires a bit of a mind shift at first• Think multiple IP addresses

Page 45: Bringing it all together with Host Named Site Collections

The good, the bad, the uglyPath Based Host Named

Site Creation Central Admin or PowerShell PowerShell

Out of the box self service site creation

Custom self service site creation needed

URLs & Structure Inherits Web Application URL Unique URL per site collection

Multiple URLs with AAM Multiple URLs without AAM

Managed Paths at web application level

Managed Paths at farm level

Database Mgmt Managed out of the box at the web application level

Custom site creation provider recommended

Page 46: Bringing it all together with Host Named Site Collections

Multiple URLs

Path Based Site Collections

Up to 5 zones with different URLs For use with all site collections

Host Named Site Collections

Up to 5 URLs per site collection

Page 47: Bringing it all together with Host Named Site Collections

PowerShell Support for Multiple URLs Set-SPSiteUrl Remove-SPSiteUrl Get-SPSiteUrl

$site = Get-SPSite https://intranet.contoso.comSet-SPSiteURL -Identity $site -Url https://extranet.contoso.com -Zone Default

Page 48: Bringing it all together with Host Named Site Collections

Zones Still available for implementing different authentication, protocols or policies

Alternate Access Mappings are not used

Multiple URLs work even without multiple web application zones!

Page 49: Bringing it all together with Host Named Site Collections

Managed Paths Still available to create a structure or hierarchy

Set at the farm level (PowerShell) No unique managed paths for every site collectionhttps://intranet.contoso.com/projects/projectAhttps://teams.contoso.com/projects/projectB

Page 50: Bringing it all together with Host Named Site Collections

Certificates

Typically you need:

• Wildcard certificate for content webapp• Wildcard certificate for apps webapp

Or a SAN certificate with both wildcards in it

Page 51: Bringing it all together with Host Named Site Collections

Mixing Path & Host

Just because you can, doesn’t mean you should

Page 52: Bringing it all together with Host Named Site Collections

Migrating to Host Named Site Collections

$webApp = Get-SPWebapplication 'https://portal.contoso.com' foreach($spSite in $webApp.Sites) {

if ($spSite.HostHeaderIsSiteName) { Write-Host $spSite.Url 'is host-named' }

else { Write-Host $spSite.Url 'is path based' }

}

Page 53: Bringing it all together with Host Named Site Collections

Migrating to Host Named Site Collections

Backup-SPSite -Identity 'https://portalOld.contoso.com' -Path 'c:\Backup\portalContoso.bak'

Restore-SPSite -Identity 'https://portal.contoso.com' -Path 'c:\Backup\portalContoso.bak' -DatabaseName 'portal_content' -HostHeaderWebApplication 'https://content.contoso.com'

Page 54: Bringing it all together with Host Named Site Collections

Good Practices Create (empty) root site collection Create mysite host site collection Develop a custom site creation provider

Page 55: Bringing it all together with Host Named Site Collections

Considerations DNS record for each HNSC Be aware of webapp-scoped features

Page 56: Bringing it all together with Host Named Site Collections

DemoHost Named Site Collections

Page 57: Bringing it all together with Host Named Site Collections

Going BeyondAdvanced Topics

Page 58: Bringing it all together with Host Named Site Collections

SSL Offloading

Reverse Proxy server

• Terminates the SSL request• Forwards an HTTP request to SharePoint• SharePoint renders with HTTPS in the response

Requirement:Support for custom HTTP Header “Front-End-Https:On”

Page 59: Bringing it all together with Host Named Site Collections

SSL Offloading You don’t need AAM and zones for HNSC At least one IIS site should have a binding on port 80

The SSL terminator or reverse proxy must preserve the original HTTP host header from the client

The protocol used for a host-named site collection depends on the URL set by Set-SPSiteURL

Page 60: Bringing it all together with Host Named Site Collections

Using multiple webapps with HNSC• Not recommended• Manual steps: IP addresses in IIS to have

multiple sites listening on same port without host header

• DNS records point to different IP addresses

Page 61: Bringing it all together with Host Named Site Collections

Summary Maintain strict platform hygiene Understand the relationship between IIS & SP

Keep it simple - consolidate! Consider Host Named Site Collections Be aware of limitations & confusing terminology

Ideal for green field projects Use SSL - Everywhere!

Page 62: Bringing it all together with Host Named Site Collections

Thank you!@thomasvochten#SPSOslo