automating site provisioning in sharepoint - presented 7/27/13 at sharepoint saturday nyc
DESCRIPTION
Automating Site Provisioning in SharePoint - Presented 7/27/13 at SharePoint Saturday NYC - by Bob German and Beatrice BaciuTRANSCRIPT
Automating Site Provisioningfor SharePoint 2010 and 2013
Beatrice Baciu – Sr. SharePoint Software EngineerBob German – SharePoint Principal Architect
SharePoint Principal Architect
@Bob1Germanhttp://blogs.msdn.com/BobGerman/
Meet the Presenters
Developer andAuthor
SharePoint Senior Developer
@BeatriceBaciuhttp://thebookofsharepoint.blogspot.com/
Some of us still miss the site directory, which was removed in SharePoint 2010…
The Challenge
How do you empower end-users to create SharePoint sites while making sites consistent, organized, and discoverable?
@BeatriceBaciu – @Bob1German
Agenda
Sites and Site Collections
“Out of the Box” Site Creation
Three models of success① Very simple: Client side
② Medium: Sandboxed workflow
③ Full featured: Farm solution
1
1
2
2
33
@BeatriceBaciu – @Bob1German
SharePoint Containers
Site Collection
Site Collection
Site Collection
Site Collection
SharePoint Containers
• Storage Management
• Independent Administration
• Connection to IIS and server URL(s)
• Authentication and high-level policy settings
• Shared Service Connections
Site Collection
Site Collection
Site Collection
Site Collection
• A set of servers in one location
• A common configuration database
Site Collections
SharePoint Groups
Root of permission inheritance
Storage and Sandbox Quotas
Navigation
Rollups with SPQuery or Content Query Web Part
Content Types and Site Columns*
Lookup lists
Galleries (Web parts, Solutions, Master Pages, etc.)
Many things are scoped at the Site Collection
Farm
Web Application
Site Collection Top Level Site
Site Collection Top Level Site
Web Application
Site Collection Top Level Site
Site Collection Top Level Site
Shared Service Provider
Content DB 1
Content DB 2
Content DB 3
A site collection cannot span content DB’s, butA content DB can have many site collections
@Bob1German
SharePoint Site Model
Intranet
Portal
Functional Portals
Groups & Teams
Projects & Workspaces
My Sites
Publishing• Employee Communications• Functional Portals (HR,
Finance, etc.)• Group and Team Portals• Information Repositories• Business Intelligence
Collaboration• Team / project
workspaces• Social
Networking• Personal
publishing
SharedServices• Search• Metadata• User Profile• BCS
@Bob1German
SharePoint Site Model
Intranet
Portal
Functional Portals
Groups & Teams
Projects & Workspaces
My Sites
SharedServices• Search• Metadata• User Profile• BCS • Created by IT
• Content managed by business
• Self-service
Customized
Standardized
@Bob1German
A Place for Everything
SharedServices• Search• Metadata• User Profile• BCS
Portal
PortalPortalPortalPortal
Dashboard
Dashboard
AppAppApp
RepositoryRepositoryRepository
StructuredCollaboratio
n
StructuredCollaboratio
n
StructuredCollaboratio
n
Ad-HocCollaboratio
n
Ad-HocCollaboratio
n
Ad-HocCollaboratio
n
My SiteMy SiteMy SiteMy SiteMy Site
= Site Collection
AppAppApp
Customized
Standardized
• Created by IT• Content
managed by business
• Self-service
@Bob1German
Out of the BoxSelf Service Site Provisioning• In SharePoint 2010 • In SharePoint 2013
demo@BeatriceBaciu – @Bob1German
Scenario 1: Simple Site Provisioning
• Creates child sites in a site collection
• Runs in Javascript on the browser- Access is via the Client Object Model
- Can run in a Content Editor Web Part inSharePoint 2010 or 2013(user must have permission to create)
- Can run as a SharePoint 2013 app(app must have permission to create)
• Lists sites directly – no separatedirectory
Simple: Client SideClient-side site listing and creation
demo@BeatriceBaciu – @Bob1German
Scenario 2: SharePoint 2013 Workflow
• Site is created by a SharePoint 2013 Workflow(Runs outside of SharePoint in Workflow Manager)
• In SharePoint 2010, this required a Sandboxed Solution(Reliability challenges on Office 365!)
• Workflow creates a site using RESTful services(No code but non-trivial setup)
• Workflow runs as under app permissions(App Step replaces Impersonation Step in SP2013)
Medium: Site Creation WorkflowWorkflow calls RESTful service
demo@BeatriceBaciu – @Bob1German
Site Definitions and Web Templates
Site Definitions SharePoint ships with several site definitions – team site, blank site, etc. A developer can build a site definition, but it’s not a good idea
Site Templates Earlier versions of SharePoint supported site templates (.stp files) when you clicked
“Save as a Template” Now you get a declarative web template (.wsp file)
Web Templates Contain the differences between a site definition and the site you want End users can get them with “Save as a Template” (sometimes) Developers can build them from scratch but it’s painful
WARNINGS: Do not fake out “Save as a Template” for publishing sites … it doesn’t work well Beware of the “Import .wsp file” option in Visual Studio to build web templates
Creating a Site Collection froma Custom Web Template
demo@BeatriceBaciu – @Bob1German
Scenario 3: Advanced Scenario
• Create site collections, not just child sites
• Use web templates to provide tailored and consistent sites
• Maintain metadata and directories for multiple site types
• Work robustly across farms
@BeatriceBaciu – @Bob1German
APPS FARM
Site DirectorySite Collection
Metadata
Site Collection
Metadata
Site Collection: Request and Creation
RequestList
RequestList
RequestList
WorkflowWorkflowWorkflow
COLLAB FARM
TimerJob
TimerJob
TimerJob
Site Collection
Metadata
Web app 1: Custom AppsWeb app 2: Community SitesWeb app 3: Project Sites
Full Featured: Farm SolutionMulti-farm solution
Uses any approval workflow
Maintains metadata and directory
Could create sites or site collections with this design
demo@BeatriceBaciu – @Bob1German
Full Featured: Farm SolutionMulti-farm solution
Uses any approval workflow
Maintains metadata and directory
Could create sites or site collections with this design
code@BeatriceBaciu – @Bob1German
Summary
Automate site creation to- Balance user empowerment with governance- Provision sites consistently- Maintain a directory and site metadata
Choose wisely between sites and site collections
In SharePoint Apps- Elevate privileges with workflow “App Steps”
In SharePoint 2013 apps- Elevate privileges via app identities
@BeatriceBaciu – @Bob1German
23 | SharePoint Saturday New York City 2013
Housekeeping
• Please remember to turn in your filled out bingo cards and event evaluations for prizes.
• SharePint is sponsored by Slalom at Whiskey Trader (Between 55th and 56th on 6th Avenue).
• Follow SharePoint Saturday New York City on Twitter @spsnyc and hashtag #spsnyc
Thanks to Our Sponsors!
Thank You!
BOSTON | NEW YORK | CHICAGO
44 Pleasant Street, Watertown, MA 02472
www.bluemetal.comBlog.bluemetal.com
@bluemetalinc
@BeatriceBaciu – @Bob1German