getting started with the pnp provisioning engine
TRANSCRIPT
Getting started with the Office 365 Developer Patterns and Practices
Provisioning EngineERWIN VAN HUNEN, PRODUCT OWNER, RENCORE.COM
PAOLO PIALORSI, CEO, PIASYS.COM
SPONSORS
Erwin van Hunen• Project Owner• Many certifications• MCSM – Charter SharePoint• MVP Office Servers and Services• Office 365 Dev PnP Core Team
Member• Over 20 years of industry
experience• Speaker at main IT conferences
Paolo Pialorsi• Project Manager, Consultant, Trainer• About 50 Microsoft certification
exams passed• MCSM – Charter SharePoint• MVP Office Servers and Services• Office 365 Dev PnP Core Team Member
• Focused on SharePoint and Office 365 since the beginning• Author of many books about XML,
SOAP, .NET, LINQ, SharePoint, and Office 365• Speaker at main IT conferences
http://dev.office.com/
AgendaWhy remote provisioning?
The schema
The engine
http://dev.office.com/
Why remote provisioning?1
http://dev.office.com/
Old school provisioningSandboxed solutions / Web TemplatesLimited functionalityOnly declarative artifacts are currently supported
Full trust solutions / Site DefinitionsNot available in O365Many possible issues with on-premises solutions
Easy to create upgrade blocking solutionsONET.XML….
http://dev.office.com/
New school provisioningAdd-ins/SharePoint FrameworkFull access to CSOM, but limited automation functionality
PowerShellFull access to CSOM, easy to automate
Provisioning engineEmbeddable in an Add-in / Client side applicationReusable throughout different projectsPowerShell Cmdlets available
http://dev.office.com/
Provisioning enginesMany companies have their ownProvider hosted appsCommand line toolsJavaScript based
PnP released a provisioning engine in March 2015Based on templates, alike onet.xmlCan be used in a code-only approachCan be used with PowerShell
http://dev.office.com/
DemoPowerShell
http://dev.office.com/
The Schema2
http://dev.office.com/
The SchemaOpen SourceUpdates released every few monthsWe are currently at the 5th schema iteration: 201605
Earlier versions where 201503, 201505, 201508 and 201512
Community effortThe schema can be found at:https://github.com/OfficeDev/PnP-Provisioning-Schema
http://dev.office.com/
The Schema implementation flowWe always start with adding functionality to the schemaAfter approved by the PnP Core Team we implement the functionality in the engine
This means that if something is in the schema, it does not mean it is available in the engine
http://dev.office.com/
The Provisioning Engine3
http://dev.office.com/
Site Provisioning FrameworkC#
// Get template from existing sitetemplate = ctx.Web.GetProvisioningTemplate();
XMLFileSystemTemplateProvider
XMLAzureStorageTemplateProvider
XMLSharePointTemplateProvider
1
2
4
Site A
Site B
Connectors
3
// Save template using XML providerXMLFileSystemTemplateProvider provider = new XMLFileSystemTemplateProvider(@"c:\temp\", "");string templateName = "template.xml";provider.SaveAs(template, templateName);
// Load the saved model againProvisioningTemplate p2 = provider.GetTemplate(templateName);// Apply template to existing sitectxTarget.Web.ApplyProvisioningTemplate(template);
http://dev.office.com/
PnP Provisioning Engine Main FeaturesSP2013, SP2016 and SPODelta templatesXML, JSON formatterSite ColumnsContent TypesLists/Libraries InstancesFeatures (Site or Web)Custom Actions (Site or Web)Files/Pages (Wiki, WebPart)Taxonomies
Composed LookSite PoliciesWeb SettingsRegional SettingsUI LanguagesResource FilesAudit SettingsWorkflows (SPD only)Search SettingsPublishing (including Page Layouts)
http://dev.office.com/
InternalsModel
Provides an abstraction layer for object handlers and providers
Object HandlersTake care of extraction and provisioning
ProvidersProvide functionality for serialization and deserialization
ConnectorsProvider functionality for storing and retrieving serialized templates
http://dev.office.com/
Base TemplatesWe provide base templates to implement ‘delta handling’Base templates are available for all supported O365 site definitionsEmbedded in the engine‘Catch-up’ is required to stay in sync with changes to Office 365
http://dev.office.com/
Demos
aka.ms/OfficeDevPnP
https://github.com/OfficeDev/PnPhttps://github.com/OfficeDev/PnP-Sites-Corehttps://github.com/OfficeDev/PnP-PowerShellhttps://github.com/OfficeDev/PnP-Toolshttps://github.com/OfficeDev/PnP-Guidancehttps://github.com/OfficeDev/PnP-Transformationhttps://github.com/OfficeDev/PnP-OfficeAddInshttps://github.com/OfficeDev/PnP-Provisioning-Schema
https://aka.ms/OfficeDevPnPVideos
https://aka.ms/OfficeDevPnPMSDN
https://aka.ms/OfficeDevPnPYammer
https://aka.ms/OfficeDevPnPPartnerPack
@OfficeDevPnP
https://aka.ms/OfficeDevPnPCall
https://docs.com/OfficeDevPnP
thank youquestions?
live ratings@ERWINVANHUNEN @PAOLOPIA
spca.biz/VUJZ